You mean to switch the built-in Transaction Manager of Glassfish for another one? I don't know if this is possible.
My problem boils down to the fact that there is no way to make a distributed transaction absolutely atomic. At a point in time, the transaction manager will call commit on resource A, then on resource B. The interval between both calls can be extremely short, but there will always be a moment where A is committed and B isn't.
[Message sent by forum member 'ewernli' (ewernli)]
http://forums.java.net/jive/thread.jspa?messageID=352122