Is it possible to share an in memory Dataset between threads?
According to the Jena documentation on the Web site I can use two threads
to access the same Dataset that has a TDB backend like this:

Thread 1:

 Dataset dataset = TDBFactory.createDataset(location) ;
 dataset.begin(ReadWrite.WRITE) ;
 try {
   ...
   dataset.commit() ;
 } finally { dataset.end() ; }

Thread 2:

 Dataset dataset = TDBFactory.createDataset(location) ;
 dataset.begin(ReadWrite.READ) ;
 try {
   ...
 } finally { dataset.end() ; }

Is it possible to do this with an in-memory dataset?

Reply via email to