[ 
https://issues.apache.org/jira/browse/JENA-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15410647#comment-15410647
 ] 

ASF GitHub Bot commented on JENA-1221:
--------------------------------------

Github user afs commented on the issue:

    https://github.com/apache/jena/pull/162
  
    Example of the application sharing the dataset with Fuseki. This also shows 
using java.util.logging for application and embedded Fuseki.
    
    ```
    public static void example6() {
            LogCtl.setJavaLogging();
            Logger LOG = LoggerFactory.getLogger("example6") ;
            DatasetGraph dsg = DatasetGraphFactory.createTxnMem() ;
            FusekiEmbeddedServer server = FusekiEmbeddedServer.make(3330, 
"/ds", dsg) ;
            server.start() ;
            
            LOG.info("Remote 1") ;
            try (QueryExecution qExec = 
                
QueryExecutionFactory.sparqlService("http://localhost:3330/ds/query";, "SELECT * 
{ ?s ?p ?o}") ) {
                // Empty table
                QueryExecUtils.executeQuery(qExec); 
            }
    
            // Transaction-protected update.
            Txn.execWrite(dsg,  ()->{
                Quad q = SSE.parseQuad("(_ :s :p _:b)") ;
                dsg.add(q); 
            }) ;
            
            LOG.info("Remote 2") ;
            try (QueryExecution qExec = 
                
QueryExecutionFactory.sparqlService("http://localhost:3330/ds/query";, "SELECT * 
{ ?s ?p ?o}") ) {
                // One row.
                QueryExecUtils.executeQuery(qExec); 
            }
            server.stop() ;
        }
    ```


> Provide an embedded Fuseki server for use from java.
> ----------------------------------------------------
>
>                 Key: JENA-1221
>                 URL: https://issues.apache.org/jira/browse/JENA-1221
>             Project: Apache Jena
>          Issue Type: New Feature
>          Components: Fuseki
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>
> The command line standalone server can be launched from Java - that is a full 
> server.
> An embedded server would be without dependencies on the filing system (the 
> {{run/}} area). It will run without UI, web pages, admin servlets or external 
> configuration files. 
> In other words - just the services on datasets, configured from java.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to