2 Replies Latest reply on Jan 28, 2005 12:32 PM by pally1978

    problem with timeout on BeanLockTransactions.

    joshua.kolash

      I've been getting this error below running my application under high stress loads:

      15:24:53,156 INFO [STDOUT] Caused by: javax.ejb.TransactionRolledbackLocalException: Application deadlock detected, resource=org.
      jboss.ejb.plugins.lock.QueuedPessimisticEJBLock@15ed777, bean=PersonBean, id=1, refs=2, tx=TransactionImpl:XidImpl[FormatId=257, G
      lobalId=Pcharles/1044, BranchQual=, localId=1044], synched=Thread[http-0.0.0.0-8080-Processor16,5,jboss], timeout=5000, queue=[],
      holder=TransactionImpl:XidImpl[FormatId=257, GlobalId=Pcharles/1087, BranchQual=, localId=1087], waitingResource=org.jboss.ejb.plu
      gins.lock.QueuedPessimisticEJBLock@be7488, bean=OrganizationBean, id=1, refs=2, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=
      Pcharles/1087, BranchQual=, localId=1087], synched=null, timeout=5000, queue=[TXLOCK waitingTx=TransactionImpl:XidImpl[FormatId=25
      7, GlobalId=Pcharles/1044, BranchQual=, localId=1044] id=0 thread=Thread[http-0.0.0.0-8080-Processor49,5,jboss] queued=true], wait
      ingResourceHolder=TransactionImpl:XidImpl[FormatId=257, GlobalId=Pcharles/1087, BranchQual=, localId=1087]; CausedByException is:
      Application deadlock detected, resource=org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock@15ed777, bean=PersonBean, id=1
      , refs=2, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=Pcharles/1044, BranchQual=, localId=1044], synched=Thread[http-0.0.0.0
      -8080-Processor16,5,jboss], timeout=5000, queue=[], holder=TransactionImpl:XidImpl[FormatId=257, GlobalId=Pcharles/1087, BranchQua
      l=, localId=1087], waitingResource=org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock@be7488, bean=OrganizationBean, id=1, refs=2
      , tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=Pcharles/1087, BranchQual=, localId=1087], synched=null, timeout=5000, queue=[
      TXLOCK waitingTx=TransactionImpl:XidImpl[FormatId=257, GlobalId=Pcharles/1044, BranchQual=, localId=1044] id=0 thread=Thread[http-
      0.0.0.0-8080-Processor49,5,jboss] queued=true], waitingResourceHolder=TransactionImpl:XidImpl[FormatId=257, GlobalId=Pcharles/1087
      , BranchQual=, localId=1087]
      15:24:53,156 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:232)
      15:24:53,156 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
      15:24:53,156 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
      15:24:53,156 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
      15:24:53,156 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      15:24:53,156 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      15:24:53,156 INFO [STDOUT] at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
      15:24:53,156 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:854)
      15:24:53,172 INFO [STDOUT] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:413)
      15:24:53,172 INFO [STDOUT] at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:44)
      15:24:53,172 INFO [STDOUT] at $Proxy212.getPersonID(Unknown Source)

      I want to change the value of timeout to somthing other than 5000, unfortunately I've looked through the jboss source code and found in
      org.jboss.ejb.BeanLockManager.java
      on line 37 int txTimeout = 5000;
      Is there any way to set this value with an xml file? I plan on submitting a bug report as well.

        • 1. Re: problem with timeout on BeanLockTransactions.
          hariv

          You can increase the transaction time-out in jboss-service.xml under the conf directory under your server. But from the exception it lookslike jboss detected a dead lock and killed one of the transaction. Are you using entity beans ? If so please make sure the sequence of your datbase operations are in the same order. Please look at jboss documentation, they talk about when deadlocks occur and your options

          • 2. Re: problem with timeout on BeanLockTransactions.
            pally1978

            Did you guys crack this problem. I am having the same problem using JBOSS 3.2.3, I am using CMP Beans with CMR.

            17:21:44,762 ERROR [STDERR] EXCEPTION Application deadlock detected, resource=org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock@1b65439, bean=CartoColourEJB,id={displays toString method of EJB that caused deadlock, this is just the data output of the feilds}

            PLEASE HELP.