1 Reply Latest reply on Mar 11, 2005 2:58 PM by Alex Paransky

    What TX attribute to read for READ-ONLY operation?

    Alex Paransky Newbie

      Dear Members:

      I have an READ operation which returns Entity objects. This operation is currently marked with a TX of Required. In actuality I don't need a TX in this case, however, when I attempted to change TX to Supports/NotSupported I experienced a SELECT from the DB for every getXXX operation which occured on an Entity.

      This was last tested sometime ago with JBOSS 3.2.3 server.

      I get an exception during my READ operation when system is under load (attached at the end).

      What I would like to do, is not lock the Entity, however, not refresh it during this READ operation.

      What should I do in the ejb-jar.xml, jbosscmp.xml or another deployment descriptor to make this happen? Can this be done? Am I approaching this problem incorrectly?

      Here is the exception which I get:

      org.jboss.util.deadlock.ApplicationDeadlockException: Application deadlock detected, resource=org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock@a16f15, bean=ComponentType, id=com.standardset.ejb.common.base.EntityKey@dd905cfe id: picture, refs=3, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=web1//720555, BranchQual=], synched=Thread[TP-Processor8,5,jboss], timeout=5000, queue=[TXLOCK waitingTx=TransactionImpl:XidImpl [FormatId=257, GlobalId=web1//720589, BranchQual=] id=0 thread=Thread[TP-Processor4,5,jboss] queued=true], holder=TransactionImpl:XidImpl [FormatId=257, GlobalId=web1//720599, BranchQual=], waitingResource=org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock@8bb4d3, bean=Component, id=com.standardset.ejb.common.base.EntityKey@3042fb4 id: 56346, refs=2, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=web1//720589, BranchQual=], synched=null, timeout=5000, queue=[], waitingResourceHolder=TransactionImpl:XidImpl [FormatId=257, GlobalId=web1//720589, BranchQual=]
      at org.jboss.util.deadlock.DeadlockDetector.deadlockDetection(DeadlockDetector.java:48)


      Thanks.
      -AP_