In an earlier mail we reported an error with the access mode set to
"db-locked" and the caching set to "unlimited".
The workaround we are using now is to set the caching to "none".
But this leads to a different error.
The scenario is the following:
Two transactions (T1 and T2) in two different threads want to modify an
object concurrently.
T1 locks and gets the object (via load).
T2 has to wait to get the lock on the object (in Database.load()).
T1 modifies the object and commits the transaction.
This leads to the object being removed from the cache (and the object being
unlocked).
T2 gets a ObjectDeletedWaitingForLockException:
org.exolab.castor.persist.ObjectDeletedWaitingForLockException: object
deletedde.kelman.savant.appserver.sequence.Sequence/200108241244296676180000
00/0 by org.exolab.castor.jdo.engine.TransactionContextImpl@76438d
at
org.exolab.castor.persist.ObjectLock.acquireLoadLock(ObjectLock.java:422)
at
org.exolab.castor.persist.LockEngine$TypeInfo.acquire(LockEngine.java:1043)
at
org.exolab.castor.persist.LockEngine$TypeInfo.access$300(LockEngine.java:939
)
at org.exolab.castor.persist.LockEngine.load(LockEngine.java:351)
at
org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:49
1)
at
org.exolab.castor.jdo.engine.DatabaseImpl.load(DatabaseImpl.java:258)
at
de.kelman.savant.appserver.AppServerLightImpl.getInstance(AppServerLightImpl
.java:336)
at
de.kelman.savant.jobserver.task.external.ExternalServiceTask.getSequenceData
(ExternalServiceTask.java:98)
at
de.kelman.savant.jobserver.task.external.ExternalServiceTask.run(ExternalSer
viceTask.java:325)
at
de.kelman.savant.jobserver.task.TaskDataManager.start(TaskDataManager.java:3
27)
at
de.kelman.savant.jobserver.server.TaskThread.run(TaskThread.java:149)
The only workaround that I can imagine now is to build an own lock system
that prevents T2 to call Database.load() for the object while it is still
loaded by a different transaction.
Any help would be greatly appreciated.
Thanks in advance
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev