Bug 986362 - Inflow XA transaction recovery fails due to ironjacamar calling unsupported method in HornetQResourceAdapter
Inflow XA transaction recovery fails due to ironjacamar calling unsupported m...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ (Show other bugs)
6.1.1
Unspecified Unspecified
unspecified Severity medium
: ER7
: EAP 6.1.1
Assigned To: Clebert Suconic
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-19 10:31 EDT by Martin Svehla
Modified: 2013-09-16 16:30 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-16 16:30:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Svehla 2013-07-19 10:31:16 EDT
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]
Comment 1 Clebert Suconic 2013-07-19 10:52:38 EDT
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.
Comment 2 Martin Svehla 2013-07-23 07:09:39 EDT
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
Comment 3 Miroslav Novak 2013-07-26 07:26:43 EDT
Moving to assigned. Clebert could you move to modified since it's in HQ master.

This issue should be documented in known issues.

Thanks,
Mirek
Comment 4 Clebert Suconic 2013-08-19 10:52:07 EDT
this has been applied to 2.3.x as well, it should be marked as fixed on the current ER (HQ 2.3.3, 2.3.4 and 2.3.5 will include this fix)
Comment 5 Miroslav Novak 2013-08-22 09:33:50 EDT
BZ is in incorrect state. Fix for this issue is present in EAP 6.1.1.ER7(HQ 2.3.5.Final) 

Verified in EAP 6.1.1.ER7.
Comment 7 Clebert Suconic 2013-08-29 12:29:53 EDT
https://github.com/hornetq/hornetq/pull/1177

Note You need to log in before you can comment on or make changes to this bug.