No that is correct, TDB has not been designed/tested for concurrent use of the database across multiple JVMs
Doing so will likely void your warranty ;) Rob On 11/20/12 10:55 AM, "David Jordan" <[email protected]> wrote: >I may be wrong, but I don't believe the ConcurrentModificationException >has anything to do with database-level concurrency. Does TDB allow >multiple separate JVMs to concurrently access/modify a specific >datastore? It has been awhile since I used TDB, I did not think it >supported this. > > >-----Original Message----- >From: Emmanuelle [mailto:[email protected]] >Sent: Tuesday, November 20, 2012 1:50 PM >To: [email protected] >Subject: Re: Concurrency problems with TDB > >Hi again, > >It's fixed I think. I was reading the model before starting the >transaction... >Sorry for the inconvenience. > > >On Tue, Nov 20, 2012 at 6:30 PM, Emmanuelle <[email protected]> wrote: >> Hi all, >> >> I'm currently working on my master thesis that's related to tracking >> students activities to provide adapted services and recommendations to >> help their learning. I have implemented an ontology using Protege and >> loaded it into a TDB directory. The ontology models students, learning >> resources and stores the activity of the students on those resources >> at a learning platform. In the background, the learning platform sends >> those events to the ontology using a webservice interface implemented >> in Axis which is the one accessing the TDB ontology for reading and >> writing. >> >> I started to stress test sending concurrent requests to the webservice >> and I'm getting concurrency errors as follow: >> java.util.ConcurrentModificationException: Reader = 3, Writer = 1 >> at >>com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.policyError(DatasetControlMRSW >>.java:157) >> at >>com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.policyError(DatasetControlMRSW >>.java:152) >> at >>com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.checkConcurrency(DatasetContro >>lMRSW.java:79) >> at >>com.hp.hpl.jena.tdb.sys.DatasetControlMRSW.startRead(DatasetControlMRSW.j >>ava:46) >> ...... >> (versions listed at the end of this note) >> >> I understand that jena-TDB handles transactions and I'm using it in my >> code, and on the other side, that the axis2 webservice is using a >> single JVM with multiple threads (I hope not to be wrong on that one) >> but it seems that TDB doesn't lock the dataset for writing. Can you >> please confirm? Should I take care of locking? >> >> I've been searching this list and the internet for similar problems, I >> have found several posts but couldn't find a solution for it. I'm new >> to semantic web technologies, it's the first time I'm using jena and >> TDB so probably I've missed something. Any help will be greatly >> appreciated. >> >> Thanks in advance, >> Emmanuelle >> >> Versions: >> I've tried to update to jena-2.7.4 + tdb-0.9.4 but was getting errors >> in tomcat with them so I gave up. >> - jena-core-2.7.0-incubating >> - jena-tdb-0.9.0-incubating >> - pellet 2.3.0 >> - java version "1.6.0_35": >> Java(TM) SE Runtime Environment (build 1.6.0_35-b10) Java HotSpot(TM) >> 64-Bit Server VM (build 20.10-b01, mixed mode) >> - tomcat5.5.35 >> - axis2 1.5.6 >
