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.
Therefore the isSameRM call is not guaranteed to happen anywhere that I can see, i.e. if I register x1 twice no isSameRM call will happen. I don't see anything in the specification that says it must happen. (I personally don't even care if it does happen or not.) My larger point is: it seems to me the language in enlistResource needs to be expanded a bit to describe how this all must work, or to make explicit what (apparently wide?) leeway implementations might have in implementing this method so that callers (Transaction users) know exactly what to expect or not. Can I register the same instance twice with no side effects? What constitutes failure that isn't handled by throwing an exception? and so on.