[Pellet-users] Concurrency from Jena

Taylor Cowan taylor_cowan at yahoo.com
Fri May 30 13:47:03 UTC 2008


Here's how I do it:
try {
  model.enterCriticalSection(Lock.WRITE);
...
//code goes here
...
} finally {
  model.leaveCriticalSection();
} 
It's important to call leaveCriticalSection() from a finally block.  I believe the first thread to call enterCriticalSection(Lock.WRITE) obtains a lock write on Jena.
Taylor


----- Original Message ----
From: Paolo Bussotti <paolo.bussotti at unifi.it>
To: pellet-users at lists.owldl.com
Sent: Friday, May 30, 2008 8:05:58 AM
Subject: [Pellet-users] Concurrency from Jena


Hello everybody,
 
I use Pellet 1.4 through Jena, and make any ABox-level change be followed by a call to prepare() (from the ontModel or from the PelletInfGraph: this should also cause kb.prepare() to be called, is it correct?)   
I have read the FAQ about concurrency, and I would like to know if an external form of synchronisation, allowing only a single thread 
to modify the KB or to make queries, may suffice for not corrupting data.
 
I thank you in advance,
Paolo Bussotti           


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.owldl.com/pipermail/pellet-users/attachments/20080530/8e4a547e/attachment.htm 


More information about the Pellet-users mailing list