Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jta-dev] What is the specified behavior of enlistResource when called with the same payload twice?

I would say it would succeed. The XAResource API contains a method called `isSameRM` which lets us determine whether or not two XAResource instances are connected to the same Resource Manager. We use that to determine whether an enlistment should join an existing transaction branch or start a new one.

On Thu, Nov 10, 2022 at 6:22 PM Laird Nelson <ljnelson@xxxxxxxxx> wrote:
Suppose I have an XAResource x1.

What must happen given this program fragment (with assertions enabled and assuming a transaction in a "good state", i.e. not a weird edge case or anything):

assert activeTransaction.enlistResource(x1);
assert activeTransaction.enlistResource(x1);

Specifically: must the second assertion succeed or fail?

Best,
Laird
_______________________________________________
jta-dev mailing list
jta-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jta-dev


--
Michael Musgrove

JBoss, by Red Hat
Registered Address: Red Hat Ltd, 6700 Cork Airport Business Park, Kinsale Road, Co. Cork.
Registered in the Companies Registration Office, Parnell House, 14 Parnell Square, Dublin 1, Ireland, No.304873
Directors:Michael Cunningham (USA), Vicky Wiseman (USA), Michael O'Neill, Keith Phelan, Matt Parson (USA)



Back to the top