@Override public void registerSynchronization(Synchronization sync) throws RollbackException, SystemException { this.transactionManager.getTransaction().registerSynchronization(sync); }
/** {@inheritDoc} */ @Override public void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException { tx.registerSynchronization(sync); }
@Override public void registerSynchronization(Synchronization sync) throws RollbackException, SystemException { this.transactionManager.getTransaction().registerSynchronization(sync); }
@Override public void registerSynchronization(Synchronization synchronization) { if (this.transactionSynchronizationRegistry != null) { this.transactionSynchronizationRegistry.registerInterposedSynchronization(synchronization); } else { try { this.transactionManager.getTransaction().registerSynchronization(synchronization); } catch (Exception ex) { throw new TransactionException("Could not access JTA Transaction to register synchronization", ex); } } }
public void registerSynchronization(Synchronization synchronization) { try { retrieveTransactionManager().getTransaction().registerSynchronization(synchronization); } catch ( RollbackException | SystemException x ) { throw new RuntimeException(x); } }
@Override public void registerSynchronization(Synchronization synchronization) { try { transactionManagerAccess.getTransactionManager().getTransaction().registerSynchronization( synchronization ); } catch (Exception e) { throw new JtaPlatformException( "Could not access JTA Transaction to register synchronization", e ); } }
@Override public void registerSynchronization(Synchronization synchronization) { try { retrieveTransactionManager().getTransaction().registerSynchronization( synchronization ); } catch (Exception e) { throw new TransactionException( "Could not obtain transaction from OSGi services!" ); } }
@Override public void registerSynchronization(Synchronization synchronization) { if (this.transactionSynchronizationRegistry != null) { this.transactionSynchronizationRegistry.registerInterposedSynchronization(synchronization); } else { try { this.transactionManager.getTransaction().registerSynchronization(synchronization); } catch (Exception ex) { throw new TransactionException("Could not access JTA Transaction to register synchronization", ex); } } }
public void registerSynchronization(final Synchronization sync) throws RollbackException, IllegalStateException, SystemException { Assert.checkNotNullParam("sync", sync); transaction.registerSynchronization(new AssociatingSynchronization(sync)); }
if (t != null) { try { t.registerSynchronization(new SemaphoreSynchronization(lockName)); } catch (Exception e) { throw new LockException("Failed to register semaphore with Transaction.", e);
if (t != null) { try { t.registerSynchronization(new SemaphoreSynchronization(lockName)); } catch (Exception e) { throw new LockException("Failed to register semaphore with Transaction.", e);
private void registerSynchronization(Synchronization synchronization) { try { final Transaction tx = this.getTransaction(); // register for lifecycle events of transaction tx.registerSynchronization(synchronization); } catch (RollbackException e) { throw new EJBException(e); } catch (SystemException e) { throw new EJBException(e); } }
throw new IllegalStateException("No JTA Transaction available"); transaction.registerSynchronization(new JtaAfterCompletionSynchronization(synchronizations));
@Override public TransactionBatch createBatch() { if (this.tm == null) return NON_TX_BATCH; TransactionBatch batch = getCurrentBatch(); try { if ((batch != null) && (batch.getState() == Batch.State.ACTIVE)) { return batch.interpose(); } this.tm.suspend(); this.tm.begin(); Transaction tx = this.tm.getTransaction(); tx.registerSynchronization(CURRENT_BATCH_SYNCHRONIZATION); batch = new InfinispanBatch(tx); setCurrentBatch(batch); return batch; } catch (RollbackException | SystemException | NotSupportedException e) { throw new CacheException(e); } }
public void addTransactionListener(TransactionState transactionState, final TransactionListener transactionListener) { Transaction transaction = getTransaction(); CommandContext commandContext = Context.getCommandContext(); try { transaction.registerSynchronization(new TransactionStateSynchronization(transactionState, transactionListener, commandContext)); } catch (IllegalStateException e) { throw new ActivitiException("IllegalStateException while registering synchronization ", e); } catch (RollbackException e) { throw new ActivitiException("RollbackException while registering synchronization ", e); } catch (SystemException e) { throw new ActivitiException("SystemException while registering synchronization ", e); } }
xaResources.put(transaction, xaResource); final EhcacheXAResource<K, V> finalXaResource = xaResource; transaction.registerSynchronization(new Synchronization() { @Override public void beforeCompletion() {
throw new IllegalStateException("No JTA Transaction available"); transaction.registerSynchronization(new JtaAfterCompletionSynchronization(synchronizations));
txn.registerSynchronization( buildCleanupSynch( txnIdentifier ) );
jtaTransaction.registerSynchronization(txState); return txState; } else {
jtaTx.registerSynchronization(rsrc); else if (!jtaTx.enlistResource(rsrc)) throw new IgniteCheckedException("Failed to enlist XA resource to JTA user transaction.");