users@glassfish.java.net

Thread deadlocks in TopLink after commit ???

From: <glassfish_at_javadesktop.org>
Date: Thu, 24 Jan 2008 18:42:16 PST

We're getting thread deadlocks in TopLink (Glassfish V2UR1). The thread seem to block after commit, these are the last logs of that Thread:

[i][#|2008-01-24T15:58:40.812+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=25;_ThreadName=p: thread-pool-1; w: 9;ClassName=RegisteredResources;MethodName=distributeCommit();_RequestID=3551c4e8-24b5-4fae-95b1-8326cc268254;|After invoking commit on resource = OTSResource : XAResource com.sun.messaging.jms.ra.DirectXAResource_at_bcd560 XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(0F000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C01)}|#]

[#|2008-01-24T15:58:40.812+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=25;_ThreadName=p: thread-pool-1; w: 9;ClassName=TransactionState;MethodName=setState();_RequestID=3551c4e8-24b5-4fae-95b1-8326cc268254;|Releasing read lock on freeze : state Illegal state |#]

[#|2008-01-24T15:58:40.812+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=25;_ThreadName=p: thread-pool-1; w: 9;ClassName=TransactionState;MethodName=setState();_RequestID=3551c4e8-24b5-4fae-95b1-8326cc268254;|Released read lock on freeze|#]

[#|2008-01-24T15:58:40.812+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=25;_ThreadName=p: thread-pool-1; w: 9;ClassName=TransactionState;MethodName=setState();_RequestID=3551c4e8-24b5-4fae-95b1-8326cc268254;|Released read lock on freeze : state Illegal state |#]

[#|2008-01-24T15:58:40.812+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=25;_ThreadName=p: thread-pool-1; w: 9;ClassName=RegisterdSyncs;MethodName=distributeAfter();_RequestID=3551c4e8-24b5-4fae-95b1-8326cc268254;|Before invoking after_completion() on synchronization object com.sun.jts.jta.SynchronizationImpl_at_145094f|#]

[#|2008-01-24T15:58:40.812+0100|FINER|sun-appserver9.1|oracle.toplink.essentials.session.file:/D:/Debug/Sun/GlassFish.V2.R1/glassfish/domains/domain1/applications/j2ee-apps/EAppADIF/lib/EAppADIF-Entities.jar-EAppADIF-EntitiesPU.transaction|_ThreadID=25;_ThreadName=p: thread-pool-1; w: 9;ClassName=null;MethodName=null;_RequestID=3551c4e8-24b5-4fae-95b1-8326cc268254;|TX afterCompletion callback, status=COMMITTED|#]

[#|2008-01-24T15:58:40.812+0100|FINE|sun-appserver9.1|javax.enterprise.resource.jta|_ThreadID=25;_ThreadName=p: thread-pool-1; w: 9;ClassName=com.sun.enterprise.distributedtx.J2EETransactionManagerImpl;MethodName=delistResource;_RequestID=3551c4e8-24b5-4fae-95b1-8326cc268254;|TM: delistResource|#]
[/i]

The sequence of operations of thread "thread-pool-1; w: 9" were:
 1- Received a detached entity 'e' of type 'Alarm' from a remote client
 2- Call bean 'A' through local interface (that bean simply sends a SNMP command)
 3- Set one field of the entity (update the entity)
 4- Call bean 'B' through local interface (that bean simply publish the updated entity in a Topic)
 5- Call bean 'C' through local interface (that bean simply publish a message in a Topic, the payload is an object that is not an entity bean)
 6- Remove the entity 'e' and persist a new one
 7- Call bean 'B' through local interface (that bean simply publish the deleted entity in a Topic)
 8- Call bean 'C' through local interface (that bean simply publish a message in a Topic, the payload is an object that is not an entity bean)

Concurrent to step 7 the OnMessage of a MDB is called ("thread-pool-1; w: 10"), this bean inserts a new entity of type 'Alarm' too, and publish two messages in the Topic (one with the new entity and another with an object that is not an entity bean), similar to "thread-pool-1; w: 9". This thread throws the exception:

[i][#|2008-01-24T15:58:40.734+0100|FINER|sun-appserver9.1|oracle.toplink.essentials.session.file:/D:/Debug/Sun/GlassFish.V2.R1/glassfish/domains/domain1/applications/j2ee-apps/EAppADIF/lib/EAppADIF-Entities.jar-EAppADIF-EntitiesPU.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=null;MethodName=null;_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|begin unit of work commit|#]

[#|2008-01-24T15:58:40.734+0100|FINER|sun-appserver9.1|oracle.toplink.essentials.session.file:/D:/Debug/Sun/GlassFish.V2.R1/glassfish/domains/domain1/applications/j2ee-apps/EAppADIF/lib/EAppADIF-Entities.jar-EAppADIF-EntitiesPU.cache|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=null;MethodName=null;_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Thread "p: thread-pool-1; w: 10" encountered deadlock when attempting to lock : com.inelcom.icor.adif.entities.equipos.ModuloURTAM_at_1{id=1,indice=0,numentradas=16,numsalidas=8,urtam={com.inelcom.icor.adif.entities.equipos.URTAM_at_1{id=1,nombre=URTAMX,tipo=URTAM,estado=CON_LATIDO,fechaUltimoCambioEstado=Thu Jan 24 12:42:52 CET 2008,estacion=INELCOMX,alineado=true},direccionip=172.30.194.107,mascara=0.0.0.0,puertaenlace=0.0.0.0,ipgestor1=0.0.0.0},tipo=URTAM,estado=null,versionhw=null,versionsoft=null,numserie=null,codproducto=null,checksumCfg=null,cntCfg=null,enviotraps=0,descripcion=null}. Entering deadlock avoidance algo!
 rithm.|#]

[#|2008-01-24T15:58:40.812+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisterdSyncs;MethodName=distributeBefore();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|After invoking before_completion() on synchronization object com.sun.jts.jta.SynchronizationImpl_at_53a8b3|#]

[#|2008-01-24T15:58:40.812+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=TransactionState;MethodName=setState();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Acquiring read lock on freeze : state PREPARING|#]

[#|2008-01-24T15:58:40.812+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=TransactionState;MethodName=setState();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Acquired read lock on freeze : state PREPARING|#]

[#|2008-01-24T15:58:40.812+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=prepare();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Before invoking prepare() on resource:OTSResource : XAResource com.sun.messaging.jms.ra.DirectXAResource_at_5bc154 XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C00)}|#]

[#|2008-01-24T15:58:40.812+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=prepare();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|After invoking prepare() on resource:OTSResource : XAResource com.sun.messaging.jms.ra.DirectXAResource_at_5bc154 XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C00)};This resource voted : org.omg.CosTransactions.Vote_at_dc580e|#]

[#|2008-01-24T15:58:40.812+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=prepare();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Before invoking prepare() on resource:OTSResource : XAResource com.sun.gjc.spi.XAResourceImpl_at_41d3ee XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C01)}|#]

[#|2008-01-24T15:58:40.843+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=prepare();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|After invoking prepare() on resource:OTSResource : XAResource com.sun.gjc.spi.XAResourceImpl_at_41d3ee XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C01)};This resource voted : org.omg.CosTransactions.Vote_at_dc580e|#]

[#|2008-01-24T15:58:40.843+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=prepare();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Before invoking prepare() on resource:OTSResource : XAResource com.sun.messaging.jms.ra.DirectXAResource_at_bcd560 XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C02)}|#]

[#|2008-01-24T15:58:40.843+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=prepare();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|After invoking prepare() on resource:OTSResource : XAResource com.sun.messaging.jms.ra.DirectXAResource_at_bcd560 XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C02)};This resource voted : org.omg.CosTransactions.Vote_at_dc580e|#]

[#|2008-01-24T15:58:40.843+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=TransactionState;MethodName=setState();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Releasing read lock on freeze : state Illegal state |#]

[#|2008-01-24T15:58:40.843+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=TransactionState;MethodName=setState();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Released read lock on freeze|#]

[#|2008-01-24T15:58:40.843+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=TransactionState;MethodName=setState();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Released read lock on freeze : state Illegal state |#]

[#|2008-01-24T15:58:40.859+0100|FINE|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=TopCoordinator;MethodName=commit();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Within TopCoordinator.commit()GTID is :10000000926B4DAC77326B7370636572612C7365727665722C5033373030|#]

[#|2008-01-24T15:58:40.859+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=TransactionState;MethodName=setState();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Acquiring read lock on freeze : state COMMITTING|#]

[#|2008-01-24T15:58:40.859+0100|FINEST|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=TransactionState;MethodName=setState();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Acquired read lock on freeze : state COMMITTING|#]

[#|2008-01-24T15:58:40.859+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=distributeCommit();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Before invoking commit on resource = OTSResource : XAResource com.sun.messaging.jms.ra.DirectXAResource_at_5bc154 XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C00)}|#]

[#|2008-01-24T15:58:40.859+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=distributeCommit();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|After invoking commit on resource = OTSResource : XAResource com.sun.messaging.jms.ra.DirectXAResource_at_5bc154 XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C00)}|#]

[#|2008-01-24T15:58:40.859+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=distributeCommit();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Before invoking commit on resource = OTSResource : XAResource com.sun.gjc.spi.XAResourceImpl_at_41d3ee XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C01)}|#]

[#|2008-01-24T15:58:40.906+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=distributeCommit();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|After invoking commit on resource = OTSResource : XAResource com.sun.gjc.spi.XAResourceImpl_at_41d3ee XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C01)}|#]

[#|2008-01-24T15:58:40.906+0100|FINER|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=RegisteredResources;MethodName=distributeCommit();_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|Before invoking commit on resource = OTSResource : XAResource com.sun.messaging.jms.ra.DirectXAResource_at_bcd560 XID {XID: formatID(4871251), gtrid_length(30), bqual_length(24), data(10000000 926B4DAC 77326B73 70636572 612C7365 72766572 2C503337 30307732 6B737063 6572612C 73657276 65722C50 33373030 2C02)}|#]

[#|2008-01-24T15:58:40.906+0100|SEVERE|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|commitTransaction (XA) on JMSService:jmsdirect failed for connectionId:209724886455219968 and onePhase:false due to unkown JMSService server error.|#]

[#|2008-01-24T15:58:40.906+0100|FINE|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=com.sun.jts.jtsxa.OTSResourceImpl;MethodName=commit;_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|An XAException occurred in twopc commit
javax.transaction.xa.XAException
        at com.sun.messaging.jms.ra.DirectXAResource.commit(DirectXAResource.java:233)
        at com.sun.jts.jtsxa.OTSResourceImpl.commit(OTSResourceImpl.java:114)
        at com.sun.jts.CosTransactions.RegisteredResources.distributeCommit(RegisteredResources.java:795)
        at com.sun.jts.CosTransactions.TopCoordinator.commit(TopCoordinator.java:2111)
        at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:403)
        at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
        at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
        at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
        at com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1226)
        at com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1197)
        at com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:79)
        at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:139)
        at $Proxy154.afterDelivery(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:324)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:76)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Caused by: com.sun.messaging.jmq.jmsservice.JMSServiceException: CommitTransaction: commit failed. Connection ID: 209724886455219968, Transaction ID: 0
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.commitTransaction(IMQDirectService.java:1744)
        at com.sun.messaging.jms.ra.DirectXAResource.commit(DirectXAResource.java:201)
        ... 19 more
Caused by: com.sun.messaging.jmq.jmsserver.util.BrokerException: Unknown Transaction 0
        at com.sun.messaging.jmq.jmsserver.data.protocol.ProtocolImpl.commitTransaction(ProtocolImpl.java:630)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.commitTransaction(IMQDirectService.java:1735)
        ... 20 more
|#]

[#|2008-01-24T15:58:40.906+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe;commit;_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation.|#]

[#|2008-01-24T15:58:40.906+0100|FINE|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=com.sun.ejb.containers.BaseContainer;MethodName=completeNewTx;_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;|EJB5102:Unable to complete container-managed transaction
javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
        at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:321)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
        at com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1226)
        at com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1197)
        at com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:79)
        at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:139)
        at $Proxy154.afterDelivery(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:324)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:76)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
|#]

[#|2008-01-24T15:58:40.906+0100|FINE|sun-appserver9.1|javax.enterprise.resource.jta|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;ClassName=com.sun.enterprise.distributedtx.J2EETransactionManagerImpl;MethodName=ejbDestroyed;_RequestID=b10259cf-9f50-4583-8c5e-94885010dc28;| ejbDestroyed: com.sun.ejb.containers.MessageBeanContextImpl_at_18721e8|#]

[#|2008-01-24T15:58:40.906+0100|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;EAppADIF:ReceptorAlarmasBean;javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No;|MDB00037: [EAppADIF:ReceptorAlarmasBean]: Message-driven bean invocation exception: [javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No]|#]

[#|2008-01-24T15:58:40.906+0100|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=27;_ThreadName=p: thread-pool-1; w: 10;|javax.ejb.EJBException
javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
        at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:321)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
        at com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1226)
        at com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1197)
        at com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:79)
        at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:139)
        at $Proxy154.afterDelivery(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:324)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:76)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3803)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
        at com.sun.ejb.containers.MessageBeanContainer.afterMessageDeliveryInternal(MessageBeanContainer.java:1226)
        at com.sun.ejb.containers.MessageBeanContainer.afterMessageDelivery(MessageBeanContainer.java:1197)
        at com.sun.ejb.containers.MessageBeanListenerImpl.afterMessageDelivery(MessageBeanListenerImpl.java:79)
        at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:139)
        at $Proxy154.afterDelivery(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:324)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:76)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
|#]
[/i]

I'm totaly lost and the problem is important because the Transaction never ends, and the subsequents threads that try to adquire the lock that the blocked thread did not release hang!

Could anybody help me with these, please? Am I doing something wrong? Is it a Glassfish Bug?

P.D.: All methods run in Container Managed Transaction. I'm using MySQL 5 database (the Connection pool is using MySQLXADatasource (the isolation level is the connector default). S.O. Windows 2000 Server

Thanks for your time!
[Message sent by forum member 'abelmj' (abelmj)]

http://forums.java.net/jive/thread.jspa?messageID=255702