thanks Paolo, I will try this. Also thanks for the tests. I'll check those 
first if I have further questions

Simon




From:
Paolo Castagna <[email protected]>
To:
[email protected]
Date:
08/05/2011 10:55 AM
Subject:
Re: transaction API



Simon Helsen wrote:
> Hi all,
> 
> while testing TDB-TX, I noticed that the transaction API as documented 
in 
> http://openjena.org/wiki/TDB/Transactions seems to require SPARQL 
Insert. 
> At least, it is not clear if write transactions would also work via the 
> Jena Model APIs. 

As far as I understand, the answer is yes. Once you begin a write 
transaction
you can change data as you prefer. However, I could be wrong and I'd like
Andy to confirm that. :-)

> Also, in the API, there is mention of sConn, but it is not clear to me 
> where that comes from. In the past, I used to create a DataSet using the 

> TDBFactory.createDataSet(location) method

Documentation can always be improved. In the meantime, use:

  Location location = new Location ("/your/path/to/tdb");
  StoreConnection sConn = StoreConnection.make(location);
  ...

You can also look at the current test suite [1], which has examples of how
to do these sort of things.

Paolo

 [1] 
https://svn.apache.org/repos/asf/incubator/jena/Experimental/TxTDB/trunk/src/test/java/com/hp/hpl/jena/tdb/transaction/


> 
> thanks,
> 
> Simon


Reply via email to