Deadlock around OM.enlistInTransaction and OM.findObject

Resulted from "test.jdo.general" MultithreadTest on very rare occasions (usually just worked).

Found one Java-level deadlock:
=============================
"Thread-5042":
waiting to lock monitor 0x09c86500 (object 0x8a09fd58, a org.datanucleus.jdo.JDOPersistenceManager),
which is held by "Thread-3044"
"Thread-3044":
waiting to lock monitor 0x09c87310 (object 0x87350000, a org.jpox.samples.models.company.Employee),
which is held by "Thread-3043"
"Thread-3043":
waiting to lock monitor 0x09c87f90 (object 0x8a0a1ac0, a org.datanucleus.ObjectManagerImpl),
which is held by "Thread-3044"

Resulted from "test.jdo.general" MultithreadTest on very rare occasions (usually just worked).
Found one Java-level deadlock:
=============================
"Thread-5042":
waiting to lock monitor 0x09c86500 (object 0x8a09fd58, a org.datanucleus.jdo.JDOPersistenceManager),
which is held by "Thread-3044"
"Thread-3044":
waiting to lock monitor 0x09c87310 (object 0x87350000, a org.jpox.samples.models.company.Employee),
which is held by "Thread-3043"
"Thread-3043":
waiting to lock monitor 0x09c87f90 (object 0x8a0a1ac0, a org.datanucleus.ObjectManagerImpl),
which is held by "Thread-3044"
Java stack information for the threads listed above:
===================================================
"Thread-5042":
at org.datanucleus.jdo.JDOPersistenceManager.evictAll(JDOPersistenceManager.java:418)
- waiting to lock <0x8a09fd58> (a org.datanucleus.jdo.JDOPersistenceManager)
at org.datanucleus.tests.MultithreadTest$5.run(MultithreadTest.java:289)
at java.lang.Thread.run(Thread.java:619)
"Thread-3044":
at org.jpox.samples.models.company.Person.jdoReplaceDetachedState(Person.java)
- waiting to lock <0x87350000> (a org.jpox.samples.models.company.Employee)
at org.datanucleus.jdo.state.JDOStateManagerImpl.resetDetachState(JDOStateManagerImpl.java:5022)
at org.datanucleus.ObjectManagerImpl.getObjectFromCache(ObjectManagerImpl.java:4072)
- locked <0x8a0a1ac0> (a org.datanucleus.ObjectManagerImpl)
at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2659)
- locked <0x8a0a1ac0> (a org.datanucleus.ObjectManagerImpl)
at org.datanucleus.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1662)
- locked <0x8a09fd58> (a org.datanucleus.jdo.JDOPersistenceManager)
at org.datanucleus.tests.MultithreadTest$4.run(MultithreadTest.java:277)
at java.lang.Thread.run(Thread.java:619)
"Thread-3043":
at org.datanucleus.ObjectManagerImpl.enlistInTransaction(ObjectManagerImpl.java:693)
- waiting to lock <0x8a0a1ac0> (a org.datanucleus.ObjectManagerImpl)
at org.datanucleus.jdo.state.JDOStateManagerImpl.enlistInTransaction(JDOStateManagerImpl.java:1047)
at org.datanucleus.state.LifeCycleState.changeState(LifeCycleState.java:117)
at org.datanucleus.jdo.state.Hollow.transitionWriteField(Hollow.java:151)
at org.datanucleus.state.AbstractStateManager.transitionWriteField(AbstractStateManager.java:570)
- locked <0x87350000> (a org.jpox.samples.models.company.Employee)
at org.datanucleus.jdo.state.JDOStateManagerImpl.preWriteField(JDOStateManagerImpl.java:4592)
at org.datanucleus.jdo.state.JDOStateManagerImpl.setStringField(JDOStateManagerImpl.java:2458)
at org.jpox.samples.models.company.Person.jdoSetlastName(Person.java)
at org.jpox.samples.models.company.Person.setLastName(Person.java:150)
at org.datanucleus.tests.MultithreadTest$4.run(MultithreadTest.java:278)
at java.lang.Thread.run(Thread.java:619)