There was an issue in JBoss EAP 6 where during the recovery of HornetQ transactions, the transaction manager would output error messages to the log, although the transactions would still be finished correctly.
This would occur because the JCA Adapter (IronJacamar) will request the MDB Resource Adpater for inflow XIDs. HornetQ self-registers itself on the transaction manager, and as a result HornetQ would throw an exception what would confuse IronJacamar's recovery mechanism.
As a result, ignorable warnings on the transaction manager were produced, for example:
----
ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryInflowImpl] (Periodic Recovery) IJ000902: Error
during inflow crash recovery for 'org.hornetq.ra.HornetQResourceAdapter'
(org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@4f02d3d2
destination=jms/queue/InQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null
maxSession=15)): javax.resource.ResourceException: Unsupported
at org.hornetq.ra.HornetQResourceAdapter.getXAResources(HornetQResourceAdapter.java:204)
----
This issue was fixed by not returning an empty Array to IronJacamar instead of throwing an `Unsupported` exception. As a result, there will no longer be ignorable warnings and transactions will still finish through the transaction manager's recovery.
Description of problem:
HornetQResourceAdapter throws ResourceException("Unsupported") when getXAResources is called. However due to recent changes in IronJacamar, this method gets called on transaction recovery, potentially leading to lost messages.
Version-Release number of selected component (if applicable):
EAP 6.1.1.ER3, HornetQ 2.3.2.Final, IronJacamar 1.0.19.Final
See class org.jboss.jca.core.tx.jbossts.XAResourceRecoveryInflowImpl method getXAResources()
Actual results:
ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryInflowImpl] (Periodic Recovery) IJ000902: Error
during inflow crash recovery for 'org.hornetq.ra.HornetQResourceAdapter'
(org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@4f02d3d2
destination=jms/queue/InQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null
maxSession=15)): javax.resource.ResourceException: Unsupported
at org.hornetq.ra.HornetQResourceAdapter.getXAResources(HornetQResourceAdapter.java:204)
at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryInflowImpl.getXAResources(XAResourceRecoveryInflowImpl.java:96)
at com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper.getXAResources(XAResourceRecoveryHelperWrapper.java:51) [jbossjts-integration-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:503) [jbossjts-jacorb-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1]
at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:159) [jbossjts-jacorb-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1]
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:743) [jbossjts-jacorb-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1]
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1]
It won't lose messages... HornetQ registers itself on the Transaction Manager, hence that method is not supported.
We have changed it to return null on master... ONly thing that will be changed on this is.. you won't have an exception any longer.. but all the semantics are the same.
You're right, I didn't manage to confirm any example where messages would be lost.
Please make sure the change is propagated into 2.3.x branch so it's in next EAP release later this year. Since the log message is now reported as ERROR level, it can be confusing for the end user (it was for me). Thanks
Description of problem: HornetQResourceAdapter throws ResourceException("Unsupported") when getXAResources is called. However due to recent changes in IronJacamar, this method gets called on transaction recovery, potentially leading to lost messages. Version-Release number of selected component (if applicable): EAP 6.1.1.ER3, HornetQ 2.3.2.Final, IronJacamar 1.0.19.Final See class org.jboss.jca.core.tx.jbossts.XAResourceRecoveryInflowImpl method getXAResources() Actual results: ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryInflowImpl] (Periodic Recovery) IJ000902: Error during inflow crash recovery for 'org.hornetq.ra.HornetQResourceAdapter' (org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@4f02d3d2 destination=jms/queue/InQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)): javax.resource.ResourceException: Unsupported at org.hornetq.ra.HornetQResourceAdapter.getXAResources(HornetQResourceAdapter.java:204) at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryInflowImpl.getXAResources(XAResourceRecoveryInflowImpl.java:96) at com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper.getXAResources(XAResourceRecoveryHelperWrapper.java:51) [jbossjts-integration-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1] at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:503) [jbossjts-jacorb-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1] at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:159) [jbossjts-jacorb-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1] at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:743) [jbossjts-jacorb-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1] at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.5.Final-redhat-1.jar:4.17.5.Final-redhat-1]