Well, Transactions are supposed to be serializeable according to
the JTA spec. The reason they give is to support JNDI. I don't really
follow - couldn't you have an object factory or something?
I guess I just don't understand why you'd ever want to serialize a
Transaction. It seems to me to be pretty private between the
TransactionManager and the Container - and those will always be running in
the same VM, right? I suppose you may want to have a global transaction
that involves several app servers, but I would think you'd serialize the
Xid rather than the Transaction itself, if that was the goal.
Further, looking at the TransactionImpl in jBoss, it's not clear
that it really will serialize. The typical use of transactions has to be
to manage database connections. The Transaction has a reference to the
XAResource, the XAResource has a reference to the java.sql.Connection, and
the Connection is generally not serializeable, so the TransactionImpl
serialization would fail, right?
What am I missing?
Aaron