just tested it, and it works. thanks =)

-----Original Message-----
From: Thomas Yip [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 26, 2001 6:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] concurrent access with lazy loading broken?



Thank Dominik,

Your insight helped me pinpointed the bug.

Also, thanks Ned Wolpert for reporting the problem a week ago.


Please try the cvs and let me know if the changes fixed the problem you guys
reported.



Thomas

-----Original Message-----
>From: Dominik Baranowski [mailto:[EMAIL PROTECTED]]
>Sent: Monday, November 26, 2001 1:47 PM
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] concurrent access with lazy loading broken?
>
>
>here's what happens.
>two threads read a lazy loaded object graph at the same time and print it.
>The first thread exits and the commit works just fine. The next thread gets
>a LockNotGrantedException when trying to commit. The problem is that the
>objects were not modified at all, and yet castor seems to think that it
>needs a write lock.
>turning off lazy loading or reading the object with a readonly flag fixes
>the problem, but lazy loading is important to us. Has anyone else run this
>problem?
>
>here's the stack trace
> ERROR [org.jboss.jdo.castor.CastorJDOImpl]
>org.exolab.castor.jdo.LockNotGrantedException: persist.deadlock4
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.ObjectLock.detectDeadlock(ObjectLock.java:932)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.ObjectLock.upgrade(ObjectLock.java:723)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.LockEngine$TypeInfo.upgrade(LockEngine.java:1154)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.LockEngine$TypeInfo.access$600(LockEngine.java:96
7
>)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.LockEngine.writeLock(LockEngine.java:809)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.TransactionContext.writeLock(TransactionContext.j
a
>va:1183)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.ClassMolder.preStore(ClassMolder.java:1504)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.LockEngine.preStore(LockEngine.java:727)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.persist.TransactionContext.prepare(TransactionContext.jav
a
>:1360)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.exolab.castor.jdo.engine.DatabaseImpl.beforeCompletion(DatabaseImpl.jav
a
>:542)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1210)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.tm.TxCapsule.commit
>(TxCapsule.java:304)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>com.saltare.server.jboss.TxCustomTimeoutInterceptorCMT.runWithTransaction(T
x
>CustomTimeoutInterceptorCMT.java
>:377)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>com.saltare.server.jboss.TxCustomTimeoutInterceptorCMT.invoke(TxCustomTimeo
u
>tInterceptorCMT.java:116)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:1
2
>8)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.ja
v
>a:286)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainer
I
>nvoker.java:483)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericP
r
>oxy.java:335)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(Stateles
s
>SessionProxy.java:123)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>$Proxy29.distributeEventOnSameThread(Unknown Source)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>com.saltare.server.jmx.RegistryService$EventPropagator.sendEvent(RegistrySe
r
>vice.java:283)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>com.saltare.server.jmx.RegistryService$EventPropagator.run(RegistryService.
j
>ava:224)
>ERROR [org.jboss.jdo.castor.CastorJDOImpl]      at
>java.lang.Thread.run(Thread.java:484)
>INFO  [Default] Release
>com.saltare.server.dao.EventTypeData/com.saltare.core.event.CastorEvent/0
>R/- by org.exolab.castor.jdo.engine.TransactionContextImpl@a9d2a
>INFO  [Default] Acquired on
com.saltare.server.dao.EventTypeData/com.saltare
>.cor
>e.event.CastorEvent/0 R/- by
>org.exolab.castor.jdo.engine.TransactionContextImpl
>@34cd65
>INFO  [Default] [Castor] LockEngine: Object name =
>com.saltare.server.dao.EventI
>dxFieldsData
>INFO  [Default] Delete com.saltare.server.dao.EventIdxFieldsData/122/5 -/W
>by or
>g.exolab.castor.jdo.engine.TransactionContextImpl@a9d2a
>INFO  [Default] Release com.saltare.server.dao.EventIdxFieldsData/122/5 -/W
>by o
>rg.exolab.castor.jdo.engine.TransactionContextImpl@a9d2a
>INFO  [Default] Release com.saltare.server.dao.UserData/User/2 R/- by
>org.exolab
>.castor.jdo.engine.TransactionContextImpl@a9d2a
>INFO  [Default] Release com.saltare.server.dao.EventData/4/3 R/- by
>org.exolab.c
>astor.jdo.engine.TransactionContextImpl@a9d2a
>INFO  [Default] Release
>com.saltare.server.dao.EventTypeData/com.saltare.core.ev
>ent.StockOutAlert/4 R/- by
>org.exolab.castor.jdo.engine.TransactionContextImpl@a
>9d2a
>ERROR [server.jmx.RegistryService$EventPropagator] Error in
>EventPropagator.run(
>) (thread=1).
>javax.transaction.RollbackException: Unable to commit, tx=XidImpl
>[FormatId=257,
> GlobalId=dominik//9, BranchQual=] status=STATUS_ROLLEDBACK
>        at org.jboss.tm.TxCapsule.commit(TxCapsule.java:350)
>        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
>        at
>com.saltare.server.jboss.TxCustomTimeoutInterceptorCMT.runWithTransac
>tions(TxCustomTimeoutInterceptorCMT.java:377)
>        at
>com.saltare.server.jboss.TxCustomTimeoutInterceptorCMT.invoke(TxCusto
>mTimeoutInterceptorCMT.java:116)
>        at
>org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
>java:128)
>        at
>org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
>        at
>org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContai
>ner.java:286)
>        at
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPCon
>tainerInvoker.java:483)
>        at
>org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(Ge
>nericProxy.java:335)
>        at
>org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(St
>atelessSessionProxy.java:123)
>        at $Proxy29.distributeEventOnSameThread(Unknown Source)
>        at
>com.saltare.server.jmx.RegistryService$EventPropagator.sendEvent(Regi
>stryService.java:283)
>        at
>com.saltare.server.jmx.RegistryService$EventPropagator.run(RegistrySe
>rvice.java:224)
>        at java.lang.Thread.run(Thread.java:484)
>INFO  [Default] [Castor] LockEngine: Object name =
>com.saltare.server.dao.UserDa
>ta
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-dev
>

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to