[jboss-jira] [JBoss JIRA] Closed: (JBMESSAGING-661) Resolve Xid incompatibility
Juha Lindfors (JIRA)
jira-events at jboss.com
Sat Dec 2 07:01:55 EST 2006
[ http://jira.jboss.com/jira/browse/JBMESSAGING-661?page=all ]
Juha Lindfors closed JBMESSAGING-661.
-------------------------------------
Resolution: Done
Mods to MessagingXAResource done, recovery test with JBossTS Xid implementation passes.
> Resolve Xid incompatibility
> ---------------------------
>
> Key: JBMESSAGING-661
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-661
> Project: JBoss Messaging
> Issue Type: Sub-task
> Components: Messaging Core
> Reporter: Juha Lindfors
> Assigned To: Juha Lindfors
> Priority: Blocker
> Fix For: 1.0.2.CR1
>
> Original Estimate: 1 day
> Remaining Estimate: 1 day
>
> There is an issue between JBossTS Xid and JBMessaging Xid implementations not resolving to equal with same globalID, branch qualifier and format id settings.
> It seems to be related to the fact that JBossTS Xids get padded to a fixed byte length which causes a mismatch in the equals() method implementation.
> E.g.
> Xid xid1 = new XidImple(new Uid("gbtxid1"), new Uid("bq1"), 123); //JBossTS(GID, branch, format)
> Xid xid2 = new XidImpl("bq1".getBytes(), 123, "gbtxid1".getBytes());
>
> assertEquals(xid1, xid2);
> returns false.
> This is an issue since currently the JBMessaging does not enforce a single Xid implementation to be used but assumes Xid as a valid key based on its global tx id and branch qualifier contents. Furthermore this assumption of key equality is likely to fail due to comparison of format IDs which are expected by definition to differ across implementations.
> The issue manifests itself during recovery where at server startup recovered prepared transactions are reinstantiated and populated into tx map using JBMessaging Xid implementations. Once the coordinator requests these transactions to be committed, it will pass as an argument its own Xid instances which will fail on lookup.
> Discussing various options with Adrian, the best solution appears to be to modify the XAResource interface implementation to enforce single Xid implementation inside messaging by replacing all incoming Xid references with a known implementation. This will avoid the inconsistency within tx map when Xids are used as identifying keys.
--
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
More information about the jboss-jira
mailing list