Tells the
Transaction
that the given
TransactionParticipant
is participating in the transaction. A
TransactionParticipant
is allowed to join a
Transaction
more than once, but will only be registered as a single participant.
If the transaction has been aborted, then the exception thrown will have as its cause the value provided in the first call to {@link #abort abort}, if any. If the cause implements {@link ExceptionRetryStatus}, then the exception thrown will, too, and its {@link ExceptionRetryStatus#shouldRetry shouldRetry} method will return thevalue returned by calling that method on the cause. If no cause was supplied, then the exception will either not implement {@code ExceptionRetryStatus} or its {@code shouldRetry} method will return{@code false}.
@param participant the TransactionParticipant
joiningthe transaction
@throws TransactionNotActiveException if the transaction has beenaborted
@throws IllegalStateException if {@link TransactionParticipant#prepare prepare} has been called on anytransaction participant and the transaction has not been aborted, or if called from a thread that is not the thread that created this transaction
@throws UnsupportedOperationException if participant
doesnot implement {@link NonDurableTransactionParticipant} and theimplementation cannot support an additional durable transaction participant