Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8698

Datasource XAExceptions leads to corrupt Transaction Context on thread

XMLWordPrintable

    • Hide

      Attached is a JAR file with a sample EJB3 SLSB that shows the problem. Read the README on how to set it up and reproduce the problem.

      Show
      Attached is a JAR file with a sample EJB3 SLSB that shows the problem. Read the README on how to set it up and reproduce the problem.

      When MySQL throws a "com.mysql.jdbc.jdbc2.optional.MysqlXAException" when called from a remote client the server thread doesn't seem to be cleaned up of transaction context data. All calls that reusing the thread will fail with the following exception:

      org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000002:e137:4cf78939:68 status: ActionStatus.COMMITTING >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000002:e137:4cf78939:68 status: ActionStatus.COMMITTING >)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
      at se.redpill.TestCase3850Bean.runTest(TestCase3850Bean.java:22)
      ...
      ...
      ...

      From what I can see the "MysqlXAException" (implements XAException) will not be caught in "com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.java". (Can it be some kind of classloading problem?) As the result the thread will not be cleaned of transaction information and "broken" when reused.

      This seems only to occur for remote clients (If the client calls within the JVM it seems to work)

        1. JBoss_5.1_JBAS-8698.patch
          8 kB
        2. mysql-ds.xml
          0.9 kB
        3. TestCase3850.tar
          20 kB

              Unassigned Unassigned
              anders-l.welen@polisen.se Anders Welen (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: