if (tx == null) {
final XAException xaException = new XAException(XAException.XAER_NOTA);
logger.severe("Transaction is not available!!!", xaException);
throw xaException;
}
final State txState = tx.getState();
switch (state) {
case ACTIVE:
if (txState != State.ACTIVE) {
final XAException xaException = new XAException(XAException.XAER_NOTA);
logger.severe("Transaction is not active!!! state: " + txState, xaException);