Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 986362 - Inflow XA transaction recovery fails due to ironjacamar calling unsupported method in HornetQResourceAdapter
Summary: Inflow XA transaction recovery fails due to ironjacamar calling unsupported m...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER7
: EAP 6.1.1
Assignee: Clebert Suconic
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-19 14:31 UTC by Martin Svehla
Modified: 2013-09-16 20:30 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-09-16 20:30:26 UTC
Type: Bug


Attachments (Terms of Use)

Description Martin Svehla 2013-07-19 14:31:16 UTC
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 14:52:38 UTC
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 11:09:39 UTC
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 11:26:43 UTC
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 14:52:07 UTC
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 13:33:50 UTC
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 16:29:53 UTC
https://github.com/hornetq/hornetq/pull/1177


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