void setRollbackOnly(final AtomicReference<State> stateRef) throws IllegalStateException, SystemException { if (status != Status.STATUS_ROLLING_BACK) { throw Log.log.notActive(); } }
public boolean setTransactionTimeout(final int seconds) throws XAException { if (seconds < 0) { throw Log.log.negativeTxnTimeoutXa(XAException.XAER_INVAL); } timeout = seconds == 0 ? LocalTransactionContext.DEFAULT_TXN_TIMEOUT : seconds; return true; }
void registerInterposedSynchronization(final Synchronization sync) throws IllegalStateException { throw Log.log.registerSynchRemoteTransaction(); } }
private LocalTransaction notifyCreationListeners(LocalTransaction transaction, CreationListener.CreatedBy createdBy) { for (CreationListener creationListener : creationListeners) { try { creationListener.transactionCreated(transaction, createdBy); } catch (Throwable t) { Log.log.trace("Transaction creation listener throws an exception", t); } } return transaction; }
void registerSynchronization(final Synchronization sync) throws RollbackException, IllegalStateException, SystemException { throw Log.log.markedRollbackOnly(); } }
public String toString() { return Log.log.subordinateXaResource(location); }
@Override public final void recoverySuppressedException(final XAException e) { super.log.logf(FQCN, DEBUG, e, recoverySuppressedException$str()); } private static final String recoverySuppressedException = "Closing the recovery stream after recovery failed threw an exception";
void join(final AtomicReference<State> stateRef, final URI location, final SimpleTransactionControl control) throws IllegalStateException { if (! this.location.equals(location)) { throw Log.log.locationAlreadyInitialized(location, this.location); } multipleJoins = true; }
@Override public final void xaResourceRecoveryRegistryReloaded(final Path filePath) { super.log.logf(FQCN, TRACE, null, xaResourceRecoveryRegistryReloaded$str(), filePath); } private static final String xaResourceRecoveryRegistryReloaded = "Reloaded xa resource recovery registry file: %s";
@Override public final void xaResourceRecoveredFromRecoveryRegistry(final URI uri, final Path filePath) { super.log.logf(FQCN, TRACE, null, xaResourceRecoveredFromRecoveryRegistry$str(), uri, filePath); } private static final String xaResourceRecoveredFromRecoveryRegistry = "Recovered in doubt xa resource (%s) from xa resource recovery registry %s";
@Override public final void rollbackFailed(final Throwable e) { super.log.logf(FQCN, DEBUG, e, rollbackFailed$str()); } private static final String rollbackFailed = "WFTXN0040: Rollback failed unexpectedly";
/** * Safely roll back a transaction without throwing an exception; useful in cases where rollback failure is unrecoverable. */ default void safeRollback() { try { rollback(); } catch (SecurityException | SystemException e) { Log.log.rollbackFailed(e); } }
public void resume(final Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException { if (transaction != null && ! (transaction instanceof AbstractTransaction)) { throw Log.log.notSupportedTransaction(transaction); } resume((AbstractTransaction) transaction); }
void registerInterposedSynchronization(final Synchronization sync) throws IllegalStateException { throw Log.log.notActive(); } }
void registerSynchronization(final Synchronization sync) throws RollbackException, IllegalStateException, SystemException { throw Log.log.registerSynchRemoteTransaction(); }
static void safeRollback(final Transaction transaction) { if (transaction != null) try { transaction.rollback(); } catch (SystemException e) { log.trace("Got exception during rollback-on-disconnect", e); } }
void join(final AtomicReference<State> stateRef, final URI location, final SimpleTransactionControl control) throws IllegalStateException { throw Log.log.notActive(); }
void registerSynchronization(final Synchronization sync) throws RollbackException, IllegalStateException, SystemException { throw Log.log.notActive(); }
void commit(final AtomicReference<State> stateRef) throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException { throw Log.log.notActive(); }
void rollback(final AtomicReference<State> stateRef) throws IllegalStateException, SystemException { throw Log.log.notActive(); }