Type: New Feature
[see http://java.net/projects/jta-spec/lists/users/archive/2012-06/message/1 thread for details]
Hi Paul, all,
JTA 1.1 does not mandate, how an XAResource is restored after a system failure for the purpose of
transaction recovery conducted by the transaction manager.
Common suggestions and implementations (e.g. JBoss) use the following strategies:
1. If the XAResource was acquired by a JNDI-named pool, the JNDI name can be stored in the
transaction log file of the transaction manager
2. If the XAResource is Serializable, then the XAResource can be serialized into the transaction log
file of the transaction manager.
Nothing of this is mandated by the JTA spec.
Any transaction manager implementation needs a portable way to restore XAResources.
If 1. alone would be mandatory, this would not work for us, because we don't use a JNDI-based pool
but register our XAResource instances directly with the Transaction.
I suggest to mandate the following behavior for the transaction manager when writing it's log file:
"If the XAResource was acquired via a JNDI named pool or the XAResource is serializable, the
transaction manager might store the JNDI name, or the serialized XAResource in it's transaction
log file. If the XAResource was not acquired via a JNDI named pool and is not serializable, an
exception will be thrown".