Hey All
I'm trying to utilize the JBoss resource adapter for Sonic 8 to use XA connection factories. I had some success but have run into a road block. If a transaction requests a XA connection more than once, it hangs while trying to enlist. Any ideas? Let me know what configuration information would be helpful.
Thanks!
14:29:52,917 TRACE [TxConnectionManager] subject: null
14:29:52,918 TRACE [TxConnectionManager] getManagedConnection trackByTx=false tx=null
14:29:52,918 TRACE [JBossManagedConnectionPool] supplying ManagedConnection from pool: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1938132[state=NORMAL mc=com.sonicsw.sonicmq.j2ee.jmsra.impl.JMSSessionManagedConnection@c7c7fa handles=0 lastUse=1335810586778 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1072375 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1a8ec64 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@137cb53 txSync=null]
14:29:52,918 TRACE [JBossManagedConnectionPool] Got connection from pool org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1938132[state=NORMAL mc=com.sonicsw.sonicmq.j2ee.jmsra.impl.JMSSessionManagedConnection@c7c7fa handles=0 lastUse=1335810586778 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1072375 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1a8ec64 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@137cb53 txSync=null] [InUse/Available/Max]: [1/29/30]
14:29:52,919 TRACE [TxConnectionManager] Pre-enlist: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1938132[state=NORMAL mc=com.sonicsw.sonicmq.j2ee.jmsra.impl.JMSSessionManagedConnection@c7c7fa handles=0 lastUse=1335810586778 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1072375 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1a8ec64 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@137cb53 txSync=null] threadTx=TransactionImple < ac, BasicAction: a3f6638:dbcc:4f9ed95f:68 status: ActionStatus.RUNNING >
14:29:52,919 TRACE [TxConnectionManager] Get synchronizer org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1938132[state=NORMAL mc=com.sonicsw.sonicmq.j2ee.jmsra.impl.JMSSessionManagedConnection@c7c7fa handles=0 lastUse=1335810586778 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1072375 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1a8ec64 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@137cb53 txSync=null] threadTx=TransactionImple < ac, BasicAction: a3f6638:dbcc:4f9ed95f:68 status: ActionStatus.RUNNING >
14:29:52,920 TRACE [TxConnectionManager] Enlisting resource org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1938132[state=NORMAL mc=com.sonicsw.sonicmq.j2ee.jmsra.impl.JMSSessionManagedConnection@c7c7fa handles=0 lastUse=1335810586778 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1072375 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1a8ec64 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@137cb53 txSync=TxSync5758127{tx=TransactionImple < ac, BasicAction: a3f6638:dbcc:4f9ed95f:68 status: ActionStatus.RUNNING > wasTrackByTx=false enlisted=false}]
14:30:07,344 DEBUG [ConnectionValidator] run: ConnectionValidator notifying pools, interval: 30000
14:34:39,820 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id a3f6638:dbcc:4f9ed95f:68 invoked while multiple threads active within it.
14:34:39,820 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action a3f6638:dbcc:4f9ed95f:68 aborting with 1 threads active!
14:34:39,837 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enlisterror] TransactionImple.enlistResource - caught: [com.arjuna.ats.jta.utils.unknownerrorcode] Unknown error code:0
14:34:39,842 TRACE [TxConnectionManager] Failed to enlist resource org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1938132[state=NORMAL mc=com.sonicsw.sonicmq.j2ee.jmsra.impl.JMSSessionManagedConnection@c7c7fa handles=0 lastUse=1335810586778 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1072375 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1a8ec64 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@137cb53 txSync=TxSync5758127{tx=TransactionImple < ac, BasicAction: a3f6638:dbcc:4f9ed95f:68 status: ActionStatus.ABORTING > wasTrackByTx=false enlisted=false}]
java.lang.Throwable: Unabled to enlist resource, see the previous warnings.
at org.jboss.resource.connectionmanager.TxConnectionManager.<clinit>(TxConnectionManager.java:132)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1233)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:451)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
at org.jboss.system.ServiceController.install(ServiceController.java:226)
Hi,
Can you provide detail about which JBoss version are you using.
You might have multiple local-tx-datasource being used in a single JTA transaction and which is unsafe and may be cause of the issue. You can follow below link's solution if it was the case.
Please let me know if it works(I suspect different problem(resource sharing) ).
We are using JBoss AS 4.2.3 GA.
There are two resources being used in this transaction. An oracle datasource, defined using and the associated XA implementation. Then the Sonic XAConnectionFactory provided by the JCA resource adapter for jboss defined in a and marked as .
Thanks.
Oracle datasource config:
somejndiname
false
oracle.jdbc.xa.client.OracleXADataSource
theURL
theUsernmae
thePassword
org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
0
20
15
org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker
true
1
true
Sonic datasource config:
sonic-jms-ra.rar
com.sonicsw.sonicmq.j2ee.jmsra.sonicra.SonicXAConnectionFactory
SonicMQ Application Server Integration
customJNDIBinding
thebrokerURL
5
30
false
true