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?

On Thu, Nov 10, 2022 at 11:36 AM Laird Nelson <ljnelson@xxxxxxxxx> wrote:
Right. I know that in Narayana, for example, there are two checks: one is an instance-based check (did the caller supply the same object reference twice or more in a row?), and then an isSameRM call.

(My mistake: the first is not an instance-based check, but an ordinary equals()-based check (it's not an IdentityHashMap lookup or anything like that, just a regular Hashtable lookup). So if I invoke enlistResource twice with two different XAResource object references that are equal according to the contract of Object#equals(Object), the second one will be ignored, and no isSameRM call will be issued.  I don't know whether that is implied by or stated in the specification or not but as these little things build up it would be nice to have some specification text around them, even if it's non-normative.)

Best,
Laird

Back to the top