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

JBoss MBean Creation/Delpoyment no longer compatible with 2-Phase JBoss Transaction Manager

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • JBossAS-4.2.0.GA, JBossAS-4.2.1.GA
    • None
    • Linux (SuSE 10.0/10.1)
      java version "1.5.0_11"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

      Greetings.

      This issue was discovered when upgrading from JBoss 3.2 -> JBoss 4.2. When creating a Datasource dynamically from an EJB with an active transaction, via the appropriate JBoss Manager classes, the trransaction can not complete with the following exception;

      14:56:39,120 DEBUG [com.security.ejb.UserEJB.initializeState(UserEJB.java:318)] Exception getting Row from Service layer: Unable to obtain Database Connection from the Connection Pool: 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: -3f5702ff:38cc:47449b39:2e 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: -3f5702ff:38cc:47449b39:2e status: ActionStatus.ABORT_ONLY >))
      Error! Unable to obtain Database Connection from the Connection Pool: 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: -3f5702ff:38cc:47449b39:2e 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: -3f5702ff:38cc:47449b39:2e status: ActionStatus.ABORT_ONLY >))\n\nPlease contact Administrator and relay the following information:\n\nMessage: 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: -3f5702ff:38cc:47449b39:2e 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: -3f5702ff:38cc:47449b39:2e status: ActionStatus.ABORT_ONLY >))\nSQLState: null\nError Code: 0\n

      Specifically, once the DataSource has been created, it can not be used in the same transaction that it was created, and is destroyed when the transaction rollsback due to the above exception.

      This was originally misdiagnosed/misreported, under http://jira.jboss.com/jira/browse/JBAS-4998?page=all. Logs, and code snippets can be found there.

      Current workaround is to 'allowMultipleLastResources=true' in conf/jbossjta-properties.xml.
      19:47:18,092 WARN [com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:910)] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.multipleWarning] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.multipleWarning] Multiple last resources have been added to the current transaction. This is transactionally unsafe and should not be relied upon. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@23d87f

      -Steve

              Unassigned Unassigned
              northgorky Steve Davidson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: