4 Replies Latest reply on Dec 6, 2008 8:43 PM by Mohit Anchlia

    Problem using distributed transactions with MS SQLServer JDB

    Chalakanth Reddy Newbie

      This is our configuration.

      JBoss 3.2.3
      SQL Server 8.0
      Microsoft SQL Server JDBC Driver Version 2.2.0037

      We use a couple of XA data sosurces. They both point to the same database. The only difference between them is the name of the data source. I don't know why we do that but this is what I am dealing with.

      I have a test servlet that accesses one of the data sources through plain JDBC, and the other data source through Torque.
      All the operations are inside a single UserTransaction.

      The very first connection fails to enlist in the transaction.

      On the other hand, everything works if both the JDBC operation and the Torque operation use the same datasource.

      I removed "<track-connection-by-tx>true</track-connection-by-tx>", and the first connection goes through, but the second one fails with the same error. Further, with track connection turned off, the second connection fails even when all the connections come from the same data source.

      It appears that I have to set track-connection-by-tx to true, as I read in another posting here. But why am I not able to use two different data sources? Any help will be greatly appreciated.

      One last thing. standardjaws.xml, and standardjbosscmp-jdbc.xml, are still referring to Hyperion, and not the SQL Server that we use. Our app does not use entity beans, and the test code does not use any EJBs at all. In that case, are these files relevant?

      I have included the data source definitions, and the server log (when track connection is turned on) below.

      thanks again.


      ===============================================

      Here are the data source definitions, from mssql-xa-ds.xml.

      <xa-datasource>
      <jndi-name>genesisDS</jndi-name>
      <track-connection-by-tx>true</track-connection-by-tx>
      <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-datasource-class>
      <xa-datasource-property name="ServerName">dbdev1</xa-datasource-property>
      <xa-datasource-property name="DatabaseName">Development</xa-datasource-property>
      <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
      <user-name>DevUser</user-name>
      devuser
      </xa-datasource>


      <xa-datasource>
      <jndi-name>TorqueDS</jndi-name>
      <track-connection-by-tx>true</track-connection-by-tx>
      <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-datasource-class>
      <xa-datasource-property name="ServerName">dbdev1</xa-datasource-property>
      <xa-datasource-property name="DatabaseName">Development</xa-datasource-property>
      <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
      <user-name>DevUser</user-name>
      devuser
      </xa-datasource>

      ==============================================

      I turned on all traces, and here is the log.

      2004-05-21 09:22:23,916 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
      2004-05-21 09:22:23,916 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection returning unassociated connection
      2004-05-21 09:22:23,916 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807
      2004-05-21 09:22:23,916 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1085146193916, new next: 1085146193916
      2004-05-21 09:22:24,244 ERROR [com.nascopgh.genesis.directoryMonitor.Logger] SmbException in populateListConnection timed out: connect
      2004-05-21 09:22:24,666 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] supplying new ManagedConnection: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e
      2004-05-21 09:22:24,666 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Getting connection from pool [InUse/Available/Max]: [1/1/20]
      2004-05-21 09:22:24,666 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@1a4903e, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@1c22f22, key: null
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@1a4903e, object: org.jboss.resource.adapter.jdbc.WrappedConnection@1c22f22, key: null
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] delisting currenttx: null, ManagedConnection: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning connection to pool [InUse/Available/Max]: [0/1/20]
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection returning unassociated connection
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] supplying ManagedConnection from pool: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Getting connection from pool [InUse/Available/Max]: [1/1/20]
      2004-05-21 09:22:24,697 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@1a4903e, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@164b4fe, key: null
      2004-05-21 09:22:24,713 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called
      2004-05-21 09:22:24,713 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@1a4903e, object: org.jboss.resource.adapter.jdbc.WrappedConnection@164b4fe, key: null
      2004-05-21 09:22:24,713 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
      2004-05-21 09:22:24,713 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] delisting currenttx: null, ManagedConnection: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e
      2004-05-21 09:22:24,713 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool
      2004-05-21 09:22:24,713 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning connection to pool [InUse/Available/Max]: [0/1/20]
      2004-05-21 09:22:31,369 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] Using Torque for the work
      2004-05-21 09:22:31,385 TRACE [org.jboss.tm.TransactionManagerService] Constructing
      2004-05-21 09:22:31,385 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] Found this user transaction, org.jboss.tm.usertx.client.ServerVMClientUserTransaction
      2004-05-21 09:22:31,385 TRACE [org.jboss.tm.TransactionImpl] Created new instance for tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=]
      2004-05-21 09:22:31,385 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=]
      2004-05-21 09:22:31,385 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] user tx started, key: null
      2004-05-21 09:22:31,385 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] In initializeTorque
      2004-05-21 09:22:31,385 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] Torque is not initialized. Initializing ....
      2004-05-21 09:22:31,400 DEBUG [org.apache.torque.Torque] Starting initAdapters
      2004-05-21 09:22:31,478 DEBUG [org.apache.torque.Torque] Starting initDSF
      2004-05-21 09:22:31,478 DEBUG [org.apache.torque.Torque] handle: Development DataSourceFactory: org.apache.torque.dsfactory.JndiDataSourceFactory
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] Starting initJNDI
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] JNDI path: java:/TorqueDS
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] Set jndi property: java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] Set jndi property: java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] Created new InitialContext
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] InitialContext -------------------------------
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] Environment properties:2
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] java.naming.factory.initial: org.jnp.interfaces.NamingContextFactory
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] java.naming.factory.url.pkgs: org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] ----------------------------------------------
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.dsfactory.JndiDataSourceFactory] Starting initDataSources
      2004-05-21 09:22:31,494 DEBUG [org.apache.torque.Torque] Adding a dummy entry for default, mapped onto Development
      2004-05-21 09:22:31,525 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
      2004-05-21 09:22:31,525 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection returning unassociated connection
      2004-05-21 09:22:31,525 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 450000
      2004-05-21 09:22:31,525 DEBUG [org.apache.torque.oid.IDBroker] IDBroker thread was started.
      2004-05-21 09:22:31,556 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] supplying new ManagedConnection: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c16b30
      2004-05-21 09:22:31,556 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Getting connection from pool [InUse/Available/Max]: [1/1/20]
      2004-05-21 09:22:31,556 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] enlisting currenttx: TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=], ManagedConnection: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c16b30
      2004-05-21 09:22:31,556 TRACE [org.jboss.tm.TransactionImpl] enlistResource(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=] status=STATUS_ACTIVE
      2004-05-21 09:22:31,556 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=1]) entered: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c16b30 flags=0
      2004-05-21 09:22:31,556 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=1]) leaving: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c16b30 flags=0
      2004-05-21 09:22:31,556 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=] status=STATUS_ACTIVE
      2004-05-21 09:22:31,556 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.TxConnectionManager@40979b, connection : org.jboss.resource.adapter.jdbc.WrappedConnection@1641f43, key: null
      2004-05-21 09:22:31,572 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed called
      2004-05-21 09:22:31,572 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.TxConnectionManager@40979b, object: org.jboss.resource.adapter.jdbc.WrappedConnection@1641f43, key: null
      2004-05-21 09:22:31,572 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 0 handles left
      2004-05-21 09:22:32,166 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] Torque is initialized now
      2004-05-21 09:22:32,166 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] in addComment with torque
      2004-05-21 09:22:32,181 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] in getNewCommentId
      2004-05-21 09:22:32,181 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] in getConnection
      2004-05-21 09:22:32,181 INFO [com.nascopgh.genesis.employee.web.servlets.TestJTA] Got JNDI obj org.jboss.resource.adapter.jdbc.WrapperDataSource
      2004-05-21 09:22:32,181 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
      2004-05-21 09:22:32,181 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection returning unassociated connection
      2004-05-21 09:22:32,181 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] supplying ManagedConnection from pool: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e
      2004-05-21 09:22:32,181 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Getting connection from pool [InUse/Available/Max]: [1/1/20]
      2004-05-21 09:22:32,181 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] enlisting currenttx: TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=], ManagedConnection: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e
      2004-05-21 09:22:32,181 TRACE [org.jboss.tm.TransactionImpl] enlistResource(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=] status=STATUS_ACTIVE
      2004-05-21 09:22:32,181 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=1]) entered: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e flags=2097152
      2004-05-21 09:22:32,181 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=1]) leaving: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e flags=2097152
      2004-05-21 09:22:32,181 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=] errorCode=XAER_RMERR
      javax.transaction.xa.XAException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]xa_start (240000) returns -3
      at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown Source)
      at com.microsoft.jdbcx.sqlserver.SQLServerImplXAResource.start(Unknown Source)
      at com.microsoft.jdbcx.base.BaseXAResource.start(Unknown Source)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:143)
      at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1148)
      at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:629)
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:455)
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getConnection(TestJTA.java:430)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getNewCommentId(TestJTA.java:510)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.addComment(TestJTA.java:449)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.handle(TestJTA.java:102)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.handle(TestJTA.java:56)
      at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:255)
      at org.webmacro.servlet.WMServlet.doGet(WMServlet.java:195)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.jboss.jetty.Jetty.service(Jetty.java:456)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501)
      2004-05-21 09:22:32,228 INFO [org.jboss.resource.connectionmanager.TxConnectionManager] Could not enlist in transaction on entering meta-aware object!
      javax.transaction.SystemException: enlistResource failed
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:468)
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getConnection(TestJTA.java:430)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getNewCommentId(TestJTA.java:510)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.addComment(TestJTA.java:449)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.handle(TestJTA.java:102)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.handle(TestJTA.java:56)
      at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:255)
      at org.webmacro.servlet.WMServlet.doGet(WMServlet.java:195)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.jboss.jetty.Jetty.service(Jetty.java:456)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501)
      2004-05-21 09:22:32,260 TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] delisting currenttx: TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=], ManagedConnection: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@16e3a7e
      2004-05-21 09:22:32,275 ERROR [com.nascopgh.genesis.employee.web.servlets.TestJTA] Failed transaction
      org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed; - nested throwable: (javax.resource.ResourceException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getConnection(TestJTA.java:430)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getNewCommentId(TestJTA.java:510)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.addComment(TestJTA.java:449)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.handle(TestJTA.java:102)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.handle(TestJTA.java:56)
      at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:255)
      at org.webmacro.servlet.WMServlet.doGet(WMServlet.java:195)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.jboss.jetty.Jetty.service(Jetty.java:456)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501)
      Caused by: javax.resource.ResourceException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:348)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      ... 23 more
      rethrown as
      org.apache.commons.lang.exception.NestableException: Failed to get new comment id: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed; - nested throwable: (javax.resource.ResourceException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getNewCommentId(TestJTA.java:543)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.addComment(TestJTA.java:449)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.handle(TestJTA.java:102)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.handle(TestJTA.java:56)
      at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:255)
      at org.webmacro.servlet.WMServlet.doGet(WMServlet.java:195)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.jboss.jetty.Jetty.service(Jetty.java:456)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501)
      Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed; - nested throwable: (javax.resource.ResourceException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getConnection(TestJTA.java:430)
      at com.nascopgh.genesis.employee.web.servlets.TestJTA.getNewCommentId(TestJTA.java:510)
      ... 21 more
      Caused by: javax.resource.ResourceException: Could not enlist in transaction on entering meta-aware object!javax.transaction.SystemException: enlistResource failed
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:348)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
      ... 23 more
      2004-05-21 09:22:32,353 TRACE [org.jboss.tm.TransactionImpl] rollback(): Entered, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=] status=STATUS_ACTIVE
      2004-05-21 09:22:32,353 TRACE [org.jboss.tm.TransactionImpl] calling sync 0, org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TxRemover@18083b3
      2004-05-21 09:22:32,353 TRACE [org.jboss.tm.TransactionImpl] endresources(0): state=1
      2004-05-21 09:22:32,353 TRACE [org.jboss.tm.TransactionImpl] endResource(XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=1]) entered: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c16b30 flag=67108864
      2004-05-21 09:22:32,369 TRACE [org.jboss.tm.TransactionImpl] endResource(XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=1]) leaving: org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1c16b30 flag=67108864
      2004-05-21 09:22:32,369 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool
      2004-05-21 09:22:32,369 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning connection to pool [InUse/Available/Max]: [0/1/20]
      2004-05-21 09:22:32,369 TRACE [org.jboss.tm.TxManager] rolled back tx: TransactionImpl:XidImpl [FormatId=257, GlobalId=devwkstn15//33, BranchQual=]