On 16/03/14 06:42, Fajar Juang Ekaputra wrote:
Hi Andy,

Thank you for the information, I manage to do this with the following code:

“
Model spec = FileManager.get().loadModel(config);
Resource root = spec.createResource( spec.expandPrefix( rootDS ));
dataset = DatasetFactory.assemble(root) ;
“

I have a following question, rather out of curiosity, that it seems that if I 
use this code, I can’t use transaction (throwing 
java.lang.UnsupportedOperationException). Is there possible that model with 
inference could support transaction?

If you want transactions, at least without a working .abort, you can use DatasetGraphWithLock, which wraps another DatasetGraph with some code provide transaction semantics (.begin/.commit/.end) using MRSW locking, so no true parallel writer and readers.

There is some experimental code that provides .abort() as well, done by replaying a log backwards

https://svn.apache.org/repos/asf/jena/Experimental/rdfpatch/

class DatasetGraphPatchTransaction

but that isn't integrated into truck at the moment. It should work, it's finished except for the integration.

        Andy


Best regards,
--
Fajar J. Ekaputra

Reply via email to