I'm having some problems around the use of implicit recursive locking in ODMG.  
I am using 0.9.8, though I had the same problems in 0.9.7.  I'm using 
isolation-level="read-uncommitted", ImplicitLocking=true, and 
LockAssociations=WRITE.

The first problem is that I sometimes get a ConcurrentModificationException in 
commit:

java.util.ConcurrentModificationException
        at 
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:440)
        at java.util.AbstractList$Itr.next(AbstractList.java:413)
        at org.apache.ojb.odmg.ObjectEnvelopeTable.commit(Unknown Source)
        at org.apache.ojb.odmg.TransactionImpl.doCommitOnObjects(Unknown Source)
        at org.apache.ojb.odmg.TransactionImpl.prepare(Unknown Source)
        at org.apache.ojb.odmg.TransactionImpl.commit(Unknown Source)

I think this is happening because I've explicitly locked an object which is 
reachable from another object which also has been locked to the transaction, 
i.e.:

  tx.lock(anObject, tx.WRITE);
  tx.lock(anObject.getRelationship().getAnotherRelationship());

A second, presumably related problem is that ODMG doesn't seem to allow cycles 
in my instance graph - i.e., I have a Study object which has a collection of 
Contacts, and each Contact points back to its Study.  When I try to lock a 
Study, OJB goes off and locks each Contact, and in turn tries to lock each 
Contact's study - which consistently fails.  I confess that I haven't verified 
this in 0.9.8, but it was very consistent in 0.9.7.

I assume that there's something fundamental that I'm misunderstanding.  Can 
anybody shed some light on this?

thanks in advance,
-steve

Steve Clark
Technology Applications Team
Natural Resources Research Center/USGS
[EMAIL PROTECTED]
(970)226-9291




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to