EJBCLIENT-276 Add support for JTA stickiness #324
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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