JBoss MBean Creation/Delpoyment no longer compatible with 2-Phase JBoss Transaction
Manager
-------------------------------------------------------------------------------------------
Key: JBAS-5001
URL:
http://jira.jboss.com/jira/browse/JBAS-5001
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JMX, Transaction Manager
Affects Versions: JBossAS-4.2.1.GA, JBossAS-4.2.0.GA
Environment: 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)
Reporter: Steve Davidson
Assigned To: Dimitris Andreadis
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
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira