Sorry my misreading - but you are stil putting one SDB model into a general dataset. If you want to create new models, yo uneed to use a dataset.
(untested):

joseki:dataset <#mydata> ;

<#mydata> rdf:type sdb:DatasetStore ;
    sdb:store <#store> .

<#store> rdf:type sdb:Store  ;
    rdfs:label "SDB" ;
    sdb:layout         "layout2" ;
    sdb:connection ....


(From joseki-config-sdb.ttl)

http://openjena.org/wiki/SDB/Dataset_Description

        Andy


On 17/05/11 10:42, Rob Stewart wrote:
Hi Andy,

Thanks for your input. I can't see in my configuration where I am
pointing to "RDB" at all... Could you highlight my error.

Looking at the fragment below, I would have thought that I am indeed using SDB ?
%%%%%
_:ProfileDatabase   rdf:type    ja:SDBModel ;
   ja:connection
   [
       ja:dbType "MySQL" ;
       ja:dbURL          "jdbc:mysql://localhost/MyDB?autoReconnect=true" ;
       ja:dbUser         "" ;
       ja:dbPassword     "" ;
       ja:dbClass        "com.mysql.jdbc.Driver" ;
   ] ;
   ja:modelName "UserProfiles"
   .
%%%%
thanks,

Rob

On 17 May 2011 10:28, Andy Seaborne<[email protected]>  wrote:
Hi Rob,

You have one model backed by Jena's old database layer (AKA RDB) in MySQL.
  That model is put into a general purpose, in-memory dataset.

Any further models you create will be in-memory, not in MySQL.

You need to use SDB or TDB to get a persistent dataset, rather than a single
persistent model.

Currently, DBS provides transactions; TDB scales better.

Fuseki is "Joseki4" and may be easier to use for you.

        Andy

On 17/05/11 01:25, Rob Stewart wrote:

Hi,

I'm currently having an issue with Joseki. I have created a mySql
database, and added 1 Jena model, with a small number of triples.

I can SPARQL query them with the use of the sparql.html form, and I
receive all the of the results that I would expect. My problem is with
SPARQL Update, through the use of the update.html form.

I can:
1) CREATE GRAPH's
2) INSERT DATA INTO these graphs
3) Go to the sparql.html form, and query these inserted triples, in
each of these graphs. So - the data is going into memory.

However - I am monitoring the mySql database as I run the INSERT INTO
calls, and no triples are added in `jena_g1t1_stmt', and no graphs are
added in `jena_graph'. Indeed, when I kill Joseki and restart it, all
of my inserted triples dissapear, and cannot be found with a SPARQL
query. Perhaps this is down to an incorrect configuration file? Here
it is, minus sensitive information:

%%%%%%%%%%%%%%

<#server>     rdf:type joseki:Server ;
    # Example of some initialization code.
    joseki:initialization
        [ module:implementation
            [ module:className<java:org.joseki.util.ServiceInitSimple>    ;
              rdfs:label "Example initializer" ; ]
        ] ;
    .

<#mydata>    rdf:type ja:RDFDataset ;
        rdfs:label "DSpaceImage" ;
        ja:defaultGraph _:ProfileDatabase
        .

_:ProfileDatabase   rdf:type    ja:SDBModel ;
    ja:connection
    [
        ja:dbType "MySQL" ;
        ja:dbURL          "jdbc:mysql://localhost/MyDB?autoReconnect=true"
;
        ja:dbUser         "" ;
        ja:dbPassword     "" ;
        ja:dbClass        "com.mysql.jdbc.Driver" ;
    ] ;
    ja:modelName "UserProfiles"
    .

<#service1>
    rdf:type            joseki:Service ;
    rdfs:label          "service point" ;
    joseki:serviceRef   "sparql" ;  # web.xml must route this name to
Joseki
    joseki:processor    joseki:ProcessorSPARQL ;
    joseki:dataset<#mydata>    ;
    .

<#serviceUpdate>
    rdf:type            joseki:Service ;
    rdfs:label          "SPARQL/Update" ;
    joseki:serviceRef   "update/service" ;
    # dataset part
    joseki:dataset<#mydata>;
    # Service part.
    # This processor will not allow either the protocol,
    # nor the query, to specify the dataset.
    joseki:processor    joseki:ProcessorSPARQLUpdate
    .

<#serviceRead>
    rdf:type            joseki:Service ;
    rdfs:label          "SPARQL" ;
    joseki:serviceRef   "sparql/read" ;
    # dataset part
    joseki:dataset<#mydata>    ;     ## Same dataset
    # Service part.
    # This processor will not allow either the protocol,
    # nor the query, to specify the dataset.
    joseki:processor    joseki:ProcessorSPARQL_FixedDS ;
    .

joseki:ProcessorSPARQL
    rdfs:label "General SPARQL processor" ;
    rdf:type joseki:Processor ;
    module:implementation joseki:ImplSPARQL ;

    # Parameters - this processor processes FROM/FROM NAMED
    joseki:allowExplicitDataset       "true"^^xsd:boolean ;
    joseki:allowWebLoading            "true"^^xsd:boolean ;
    ## And has no locking policy (it loads data each time).
    ## The default is mutex (one request at a time)
    joseki:lockingPolicy                joseki:lockingPolicyNone ;
    .

joseki:ProcessorSPARQL_FixedDS
    rdfs:label "SPARQL processor for fixed datasets" ;
    rdf:type joseki:Processor ;
    module:implementation joseki:ImplSPARQL ;

    # This processor does not accept queries with FROM/FROM NAMED
    joseki:allowExplicitDataset       "false"^^xsd:boolean ;
    joseki:allowWebLoading            "false"^^xsd:boolean ;
    joseki:lockingPolicy              joseki:lockingPolicyMRSW ;
    .

joseki:ProcessorSPARQLUpdate
    rdfs:label "SPARQL Update processor" ;
    rdf:type joseki:Processor ;
    module:implementation joseki:ImplSPARQLUpdate ;
    joseki:lockingPolicy              joseki:lockingPolicyMRSW ;
    .

joseki:ImplSPARQL
    rdf:type   joseki:ServiceImpl ;
    module:className
        <java:org.joseki.processors.SPARQL>    .

joseki:ImplSPARQLUpdate
    rdf:type   joseki:ServiceImpl ;
    module:className
        <java:org.joseki.processors.SPARQLUpdate>    .


%%%%%%%%%%%%%%%

Anything that I've missed? I'm also not sure whether to opt for SDB or
TDB, and what the implications of either, are?

--
Rob Stewart

Reply via email to