8 Replies Latest reply on Mar 22, 2008 4:33 AM by Mark Little

    Question on jboss4.2.2 GA TX

    nie feng Newbie

      Hi all,

      I have migrated our application from jboss4.0.5 GA to jboss4.2.2 GA and encoutering the following exception. (There is no such issue in running on 405 GA)


      [16:03:08-23:20:50,025] [ WARN:com.arjuna.ats.jta.logging.loggerI18N] [JMS SessionPool Worker-6] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_PROTO for < 131075, 28, 26, 1--3f572aa4:a27:47dd3a4d:c05-3f572aa4:a27:47dd3a4d:c07 >
      [16:03:08-23:20:50,025] [ERROR:STDERR] [JMS SessionPool Worker-6] org.jboss.resource.connectionmanager.JBossLocalXAException: Trying to start a new tx when old is not complete! old: < 131075, 28, 26, 1--3f572aa4:a27:47dd3a4d:ad2-3f572aa4:a27:47dd3a4d:be8 >, new < 131075, 28, 26, 1--3f572aa4:a27:47dd3a4d:c05-3f572aa4:a27:47dd3a4d:c07 >, flags 0
      [16:03:08-23:20:50,025] [ERROR:STDERR] [JMS SessionPool Worker-6] at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.start(TxConnectionManager.java:886)
      [16:03:08-23:20:50,025] [ERROR:STDERR] [JMS SessionPool Worker-6] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:776)
      [16:03:08-23:20:50,025] [ERROR:STDERR] [JMS SessionPool Worker-6] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:499)
      [16:03:08-23:20:50,025] [ERROR:STDERR] [JMS SessionPool Worker-6] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:773)
      [16:03:08-23:20:50,025] [ERROR:STDERR] [JMS SessionPool Worker-6] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:564)
      
      
      ...
      ...
      ...
      
      [16:03:08-23:20:51,150] [ERROR:org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.EntityMetaInfo#findByEntityName] [JMS SessionPool Worker-6] Find failed
      org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f572aa4:a27:47dd3a4d:c05 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f572aa4:a27:47dd3a4d:c05 status: ActionStatus.ABORT_ONLY >))
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:225)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:144)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:61)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:604)
       at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:315)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:236)
       at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1099)
       at org.jboss.ejb.EntityContainer.find(EntityContainer.java:728)
      
      


      The method I executed that result in the above error is doing the following task.

      1) Invoke the SLSB to create an entity (BMP). (Transaction attribute of SLSB is "Required")
      2) Invoke the same SLSB to retrieve some entities. (Transaction attribute of SLSB is "Required")

      Such a task is running well in JBoss 405. Is the transaction handling in jboss4.2.2 GA is different than jboss405? If so, what are the configuration i need to change in order to get rid of the issue?

      Thanks

        • 1. Re: Question on jboss4.2.2 GA TX
          Jonathan Halliday Master

          The new transaction manager is stricter than the old one and can expose some dormant issues. In this case it looks like a transaction is being stared but not stopped. Crank up the logging level at bit, that may show where things are going wrong.

          • 2. Re: Question on jboss4.2.2 GA TX
            nie feng Newbie

            The root cause for throwing this error is because our code has performed a lookup on the other db schema.

            The method I executed that result in the above error is doing the following task.

            1) Invoke the SLSB to create an entity (BMP). (Transaction attribute of SLSB is "Required") --> The entity is stored at db SCHEMA 1

            2) Invoke the same SLSB to retrieve some entities. (Transaction attribute of SLSB is "Required") --> The entities is stored at db SCHEMA 2.. The retrieval is the cause of the error.

            If I swap the entity to DB SCHEMA 1, i didn't see such an error. I am wondering why by swapping to schema 1, the problem will be resolved?

            The following show the comparison before and after swap to schema 1
            # Before swap the table to schema 1

            [18:03:08-14:58:44,501] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:1973]] getManagedConnection trackByTx=true tx=TransactionImple < ac, BasicAction: -3f572aa4:7a5:47df66fd:a78 status: ActionStatus.RUNNING >
            [18:03:08-14:58:44,501] [TRACE:org.jboss.resource.connectionmanager.JBossManagedConnectionPool] [WorkerThread#0[127.0.0.1:1973]] supplying ManagedConnection from pool: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1c66fa2[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@cb20ac handles=0 lastUse=1205823524048 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@19d9413 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@162cab9 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1ce28b8 txSync=null]
            [18:03:08-14:58:44,501] [TRACE:org.jboss.resource.connectionmanager.JBossManagedConnectionPool] [WorkerThread#0[127.0.0.1:1973]] Got connection from pool tracked by transaction org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1c66fa2[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@cb20ac handles=0 lastUse=1205823524048 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@19d9413 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@162cab9 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1ce28b8 txSync=null] tx=TransactionImple < ac, BasicAction: -3f572aa4:7a5:47df66fd:a78 status: ActionStatus.RUNNING > [InUse/Available/Max]: [1/19/20]
            [18:03:08-14:58:44,501] [TRACE:org.jboss.resource.connectionmanager.JBossManagedConnectionPool] [WorkerThread#0[127.0.0.1:1973]] Using connection from pool tracked by transaction org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1c66fa2[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@cb20ac handles=0 lastUse=1205823524048 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@19d9413 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@162cab9 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1ce28b8 txSync=null] tx=TransactionImple < ac, BasicAction: -3f572aa4:7a5:47df66fd:a78 status: ActionStatus.RUNNING > [InUse/Available/Max]: [1/19/20]
            [18:03:08-14:58:44,501] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:1973]] Pre-enlist: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1c66fa2[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@cb20ac handles=0 lastUse=1205823524048 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@19d9413 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@162cab9 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1ce28b8 txSync=null] threadTx=TransactionImple < ac, BasicAction: -3f572aa4:7a5:47df66fd:a78 status: ActionStatus.RUNNING >
            [18:03:08-14:58:44,501] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:1973]] Get synchronizer org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1c66fa2[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@cb20ac handles=0 lastUse=1205823524048 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@19d9413 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@162cab9 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1ce28b8 txSync=null] threadTx=TransactionImple < ac, BasicAction: -3f572aa4:7a5:47df66fd:a78 status: ActionStatus.RUNNING >
            [18:03:08-14:58:44,501] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:1973]] Enlisting resource org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1c66fa2[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@cb20ac handles=0 lastUse=1205823524048 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@19d9413 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@162cab9 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1ce28b8 txSync=TxSync30490554{tx=TransactionImple < ac, BasicAction: -3f572aa4:7a5:47df66fd:a78 status: ActionStatus.RUNNING > wasTrackByTx=true enlisted=false}]
            [18:03:08-14:58:44,501] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:1973]] start, xid: < 131075, 28, 26, 1--3f572aa4:7a5:47df66fd:a78-3f572aa4:7a5:47df66fd:b85
            


            # After swap to schema 1
            [18:03:08-15:08:46,766] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:2035]] getManagedConnection trackByTx=true tx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING >
            [18:03:08-15:08:46,766] [TRACE:org.jboss.resource.connectionmanager.JBossManagedConnectionPool] [WorkerThread#0[127.0.0.1:2035]] Previous connection tracked by transaction org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@5ba615[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@f4b724 handles=0 lastUse=1205824120828 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1b5d036 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@23a321 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1aad6e1 txSync=TxSync30362139{tx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING > wasTrackByTx=true enlisted=true}] tx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING > [InUse/Available/Max]: [1/19/20]
            [18:03:08-15:08:46,766] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:2035]] Pre-enlist: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@5ba615[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@f4b724 handles=0 lastUse=1205824120828 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1b5d036 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@23a321 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1aad6e1 txSync=TxSync30362139{tx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING > wasTrackByTx=true enlisted=true}] threadTx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING >
            [18:03:08-15:08:46,766] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:2035]] Get synchronizer org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@5ba615[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@f4b724 handles=0 lastUse=1205824120828 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1b5d036 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@23a321 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1aad6e1 txSync=TxSync30362139{tx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING > wasTrackByTx=true enlisted=true}] threadTx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING >
            [18:03:08-15:08:46,766] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:2035]] Check enlisted org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@5ba615[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@f4b724 handles=0 lastUse=1205824120828 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1b5d036 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@23a321 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1aad6e1 txSync=TxSync30362139{tx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING > wasTrackByTx=true enlisted=true}] threadTx=TransactionImple < ac, BasicAction: -3f572aa4:7d4:47df68c9:a7c status: ActionStatus.RUNNING >
            [18:03:08-15:08:46,766] [TRACE:org.jboss.resource.connectionmanager.CachedConnectionManager] [WorkerThread#0[127.0.0.1:2035]] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@3179f3, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@142dd82, key: com.gridnode.gtas.server.gridnode.facade.ejb.GridNodeManagerBean@f3806c
            [18:03:08-15:08:46,766] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [WorkerThread#0[127.0.0.1:2035]] connectionClosed called mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@f4b724
            [18:03:08-15:08:46,766] [TRACE:org.jboss.resource.connectionmanager.CachedConnectionManager] [WorkerThread#0[127.0.0.1:2035]] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@3179f3, object: org.jboss.resource.adapter.jdbc.WrappedConnection@142dd82, key: com.gridnode.gtas.server.gridnode.facade.ejb.GridNodeManagerBean@f3806c
            
            



            The other approach i have tried is to change the transaction attribute of the SLSB to "RequiresNew", it also resolved the issue.

            Could I know what is the approach we use if we deal with two DB schema in the same transaction?

            • 3. Re: Question on jboss4.2.2 GA TX
              Jonathan Halliday Master

              Turn on <track-connection-by-tx/> in the datasource(s)

              • 4. Re: Question on jboss4.2.2 GA TX
                nie feng Newbie

                Hi thanks for the quick reply.

                I have turned on the <track-connection-by-tx/> as follow

                <datasources>
                 <local-tx-datasource>
                 <jndi-name>appdbdatasource</jndi-name>
                 <connection-url>jdbc:postgresql://localhost:35432/gtdb</connection-url>
                 <driver-class>org.postgresql.Driver</driver-class>
                 <user-name>xxx</user-name>
                 <password>xxx</password>
                 <metadata>
                 <type-mapping>PostgreSQL 7.2</type-mapping>
                 </metadata>
                 <track-connection-by-tx/>
                 </local-tx-datasource>
                
                 <local-tx-datasource>
                 <jndi-name>userdbdatasource</jndi-name>
                 <connection-url>jdbc:postgresql://localhost:35432/gtdb</connection-url>
                 <driver-class>org.postgresql.Driver</driver-class>
                 <user-name>xxx</user-name>
                 <password>xxx</password>
                 <metadata>
                 <type-mapping>PostgreSQL 7.2</type-mapping>
                 </metadata>
                 <track-connection-by-tx/>
                 </local-tx-datasource>
                
                 <!-- JBOSSDB DS -->
                 <local-tx-datasource>
                 <jndi-name>DefaultDS</jndi-name>
                 <connection-url>jdbc:postgresql://localhost:35432/gtdb</connection-url>
                 <driver-class>org.postgresql.Driver</driver-class>
                 <user-name>xxx</user-name>
                 <password>xxx</password>
                 <metadata>
                 <type-mapping>PostgreSQL 7.2</type-mapping>
                 </metadata>
                 <track-connection-by-tx/>
                 </local-tx-datasource>
                
                </datasources>
                


                But i am still observing the same error

                [19:03:08-20:00:29,029] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [http-127.0.0.1-9099-8] getManagedConnection trackByTx=true tx=TransactionImple < ac, BasicAction: -3f572aa4:e07:47e0ff17:ada status: ActionStatus.RUNNING >
                [19:03:08-20:00:29,029] [TRACE:org.jboss.resource.connectionmanager.JBossManagedConnectionPool] [http-127.0.0.1-9099-8] supplying ManagedConnection from pool: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@11fd25a[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@2b28d4 handles=0 lastUse=1205928028920 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@320727 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@b98260 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1859214 txSync=null]
                [19:03:08-20:00:29,029] [TRACE:org.jboss.resource.connectionmanager.JBossManagedConnectionPool] [http-127.0.0.1-9099-8] Got connection from pool tracked by transaction org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@11fd25a[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@2b28d4 handles=0 lastUse=1205928028920 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@320727 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@b98260 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1859214 txSync=null] tx=TransactionImple < ac, BasicAction: -3f572aa4:e07:47e0ff17:ada status: ActionStatus.RUNNING > [InUse/Available/Max]: [1/19/20]
                [19:03:08-20:00:29,029] [TRACE:org.jboss.resource.connectionmanager.JBossManagedConnectionPool] [http-127.0.0.1-9099-8] Using connection from pool tracked by transaction org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@11fd25a[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@2b28d4 handles=0 lastUse=1205928028920 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@320727 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@b98260 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1859214 txSync=null] tx=TransactionImple < ac, BasicAction: -3f572aa4:e07:47e0ff17:ada status: ActionStatus.RUNNING > [InUse/Available/Max]: [1/19/20]
                [19:03:08-20:00:29,029] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [http-127.0.0.1-9099-8] Pre-enlist: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@11fd25a[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@2b28d4 handles=0 lastUse=1205928028920 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@320727 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@b98260 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1859214 txSync=null] threadTx=TransactionImple < ac, BasicAction: -3f572aa4:e07:47e0ff17:ada status: ActionStatus.RUNNING >
                [19:03:08-20:00:29,029] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [http-127.0.0.1-9099-8] Get synchronizer org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@11fd25a[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@2b28d4 handles=0 lastUse=1205928028920 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@320727 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@b98260 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1859214 txSync=null] threadTx=TransactionImple < ac, BasicAction: -3f572aa4:e07:47e0ff17:ada status: ActionStatus.RUNNING >
                [19:03:08-20:00:29,029] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [http-127.0.0.1-9099-8] Enlisting resource org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@11fd25a[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@2b28d4 handles=0 lastUse=1205928028920 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@320727 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@b98260 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1859214 txSync=TxSync21985104{tx=TransactionImple < ac, BasicAction: -3f572aa4:e07:47e0ff17:ada status: ActionStatus.RUNNING > wasTrackByTx=true enlisted=false}]
                [19:03:08-20:00:29,029] [TRACE:org.jboss.resource.connectionmanager.TxConnectionManager] [http-127.0.0.1-9099-8] start, xid: < 131075, 28, 26, 1--3f572aa4:e07:47e0ff17:ada-3f572aa4:e07:47e0ff17:bf3
                


                Is there any configuration i have missed out?

                • 5. Re: Question on jboss4.2.2 GA TX
                  Mark Little Master

                  Any chance you can try formatting your text in the forum better? At the moment it's really difficult to see what you are referring to.

                  • 6. Re: Question on jboss4.2.2 GA TX
                    nie feng Newbie

                    Sorry for that, I try to format the log message however the statement is too long that it can't properly be displayed in the forum.

                    I have followed jhalliday suggestion to include the <track-connection-by-tx/> in my datasource configuration file as follow


                    <datasources>
                     <local-tx-datasource>
                     <jndi-name>appdbdatasource</jndi-name>
                     <connection-url>jdbc:postgresql://localhost:35432/gtdb</connection-url>
                     <driver-class>org.postgresql.Driver</driver-class>
                     <user-name>xxx</user-name>
                     <password>xxx</password>
                     <metadata>
                     <type-mapping>PostgreSQL 7.2</type-mapping>
                     </metadata>
                     <track-connection-by-tx/>
                     </local-tx-datasource>
                    
                     <local-tx-datasource>
                     <jndi-name>userdbdatasource</jndi-name>
                     <connection-url>jdbc:postgresql://localhost:35432/gtdb</connection-url>
                     <driver-class>org.postgresql.Driver</driver-class>
                     <user-name>xxx</user-name>
                     <password>xxx</password>
                     <metadata>
                     <type-mapping>PostgreSQL 7.2</type-mapping>
                     </metadata>
                     <track-connection-by-tx/>
                     </local-tx-datasource>
                    </datasources>
                    
                    



                    After changing the ds config file, i am still getting the error "Adding multiple last resources is disallowed".

                    The snapshot of the server log can be obtained via the following link
                    http://myspace2020.googlepages.com/server.log

                    In the log file, the method that involve in retrieving the record from second DB schema is "findGnCategoryByCode". This is where the error has occured.



                    • 7. Re: Question on jboss4.2.2 GA TX
                      Vicky Kak Master

                       

                      "niefeng" wrote:

                      After changing the ds config file, i am still getting the error "Adding multiple last resources is disallowed".


                      The older TM allowed multiple one phase participants to be part of JTA transaction but it is unsafe and thus not being supported by JbossTS .
                      All this is explained in the link which I am going to point at the end of this post.

                      If you guys really want to use the multiple resources in JTA transaction then you should have only one local-tx-datasource , the local-tx-datasource is there to support LRCO .

                      Read the wiki here
                      http://wiki.jboss.org/wiki/Wiki.jsp?page=Multiple1PC






                      • 8. Re: Question on jboss4.2.2 GA TX
                        Mark Little Master

                        If you add multiple 1PC resources, please make sure you understand the full implications.