EJBCLIENT-276 Add support for JTA stickiness
This commit includes the following changes:
- Refactors transaction handling to maintain a mapping of applications to a
target destination on the transaction, thereby sticking proxy invocations for
all beans in that application against the same target node. Additionally the
change prefers nodes already associated with a transaction when new
applications are encountered. The end result is that a transaction will
typically be associated with a single host until it is completed. If, however,
the host does not have the requested bean, this change will maintain an
additional association with a host that does. This leads to a given
transaction having a set of possible associations, and a preference for those
associations.
- Corrects affinity association with session open requests, in the case that the
server does not provide one.
- Fixes invocation retries when a remote UserTransaction is used.
- Fixes XA delistment in the case of a retryable error (e.g. not found)
- Introduces a comprehensive set of tests for verifying transactional behavior
against a load-balanced multi-node configuration:
+ Verifies node stickiness when a transaction is active.
+ Verifies distribution across nodes when multiple transactions are used.
+ Verifies retried invocations rebalance.
+ Verifies transaction preference across applications.
+ Verifies non-propogating client TX attributes result in expected node
distribution.
+ Verifies session open requests as well as general invocations
+ Verifies affinity on session open results in non-propogating
client TX stickiness vs distribution
+ Verifies Remote and Local transaction stickiness