Described herein is a session reuse approach that reuses a session already
established on a remote participant to execute an autonomous transaction.
The session is reused in a manner that avoids affecting the session's
state in a way adverse to later execution of the containing transaction.
When beginning an autonomous transaction on a local participant, a
request to initiate an autonomous transaction on a remote participant is
deferred or not sent at all if the containing transaction is a
distributed one. The request may be sent later, piggybacked to another
message, using a piggyback messaging system. When ending an autonomous
transaction, a local participant may send a request to a remote
participant requesting that the remote participant commence execution of
its respective containing transaction. The request is piggybacked to
another message, and is thus transmitted without having to transmit the
request separately, avoiding a message round trip.