public void commit(boolean transactionOwner) { if (nestedTransactions || transactionOwner) { try { this.ptm.commit(currentTransaction.pop()); } catch (Exception e) { logger.warn("Unable to commit transaction", e); throw new RuntimeException("Unable to commit transaction", e); } } }
public void commit(boolean transactionOwner) { if( nestedTransactions || transactionOwner ) { try { this.ptm.commit( currentTransaction.pop() ); } catch ( Exception e ) { logger.warn( "Unable to commit transaction", e ); throw new RuntimeException( "Unable to commit transaction", e ); } } }
public void commit(boolean transactionOwner) { if ( transactionOwner ) { try { // if we didn't begin this transaction, then do nothing this.ptm.commit( currentTransaction ); currentTransaction = null; } catch ( Exception e ) { logger.warn( "Unable to commit transaction", e ); throw new RuntimeException( "Unable to commit transaction", e ); } } }
public void commit(boolean transactionOwner) { if (nestedTransactions || transactionOwner) { try { this.ptm.commit(currentTransaction.pop()); } catch (Exception e) { logger.warn("Unable to commit transaction", e); throw new RuntimeException("Unable to commit transaction", e); } } }
public void commit(boolean transactionOwner) { if ( transactionOwner ) { try { // if we didn't begin this transaction, then do nothing this.ptm.commit( currentTransaction ); currentTransaction = null; } catch ( Exception e ) { logger.warn( "Unable to commit transaction", e ); throw new RuntimeException( "Unable to commit transaction", e ); } } }
public void commit(boolean transactionOwner) { if( nestedTransactions || transactionOwner ) { try { this.ptm.commit( currentTransaction.pop() ); } catch ( Exception e ) { logger.warn( "Unable to commit transaction", e ); throw new RuntimeException( "Unable to commit transaction", e ); } } }
public void commit(boolean transactionOwner) { if( nestedTransactions || transactionOwner ) { try { this.ptm.commit( currentTransaction.pop() ); } catch ( Exception e ) { logger.warn( "Unable to commit transaction", e ); throw new RuntimeException( "Unable to commit transaction", e ); } } }
public void commit(boolean transactionOwner) { if ( transactionOwner ) { try { // if we didn't begin this transaction, then do nothing this.ptm.commit( currentTransaction ); currentTransaction = null; } catch ( Exception e ) { logger.warn( "Unable to commit transaction", e ); throw new RuntimeException( "Unable to commit transaction", e ); } } }
public void commit(boolean transactionOwner) { if (transactionOwner) { try { // if we didn't begin this transaction, then do nothing this.ptm.commit(currentTransaction); currentTransaction = null; if (TransactionSynchronizationManager.hasResource(KieSpringTransactionManager.RESOURCE_CONTAINER)) { TransactionSynchronizationManager.unbindResource(KieSpringTransactionManager.RESOURCE_CONTAINER); } } catch (Exception e) { logger.warn("Unable to commit transaction", e); throw new RuntimeException("Unable to commit transaction", e); } } }
public void commit(boolean transactionOwner) { if (transactionOwner) { try { // if we didn't begin this transaction, then do nothing this.ptm.commit(currentTransaction); currentTransaction = null; if (TransactionSynchronizationManager.hasResource(KieSpringTransactionManager.RESOURCE_CONTAINER)) { TransactionSynchronizationManager.unbindResource(KieSpringTransactionManager.RESOURCE_CONTAINER); } } catch (Exception e) { logger.warn("Unable to commit transaction", e); throw new RuntimeException("Unable to commit transaction", e); } } }
@Override public <T> T execute(Command<T> command) { TransactionStatus status = transactionManager.getTransaction(defTransDefinition); try { T result = super.execute(command); transactionManager.commit(status); return result; } catch (Throwable e) { transactionManager.rollback(status); throw new RuntimeException(e); } }
@Override public <T> T execute(Command<T> command) { TransactionStatus status = transactionManager.getTransaction(defTransDefinition); try { T result = super.execute(command); transactionManager.commit(status); return result; } catch (Throwable e) { transactionManager.rollback(status); throw new RuntimeException(e); } }
ptm.commit( transaction );
ptm.commit( transaction );
ptm.commit(transaction);
@Override public void run() { TransactionStatus status = transactionManager.getTransaction(defTransDefinition); log.debug("Attempting to abort to lock process instance for 3 secs "); // getProcessInstance does not lock reliably so let's make a change that actually does something to the entity ksession.abortProcessInstance(processInstance.getId()); // let thread 2 start once we have the transaction txAcquiredSignal.countDown(); try { // keep the lock until thread 2 let's us know it's done pessLockExceptionSignal.await(); } catch (InterruptedException e) { // do nothing } log.debug("Commited process instance aborting after 3 secs"); transactionManager.commit(status); // let main test thread know we're done threadsAreDoneLatch.countDown(); } };
@Override public void run() { TransactionStatus status = transactionManager.getTransaction(defTransDefinition); log.debug("Attempting to abort to lock process instance for 3 secs "); // getProcessInstance does not lock reliably so let's make a change that actually does something to the entity ksession.abortProcessInstance(processInstance.getId()); // let thread 2 start once we have the transaction txAcquiredSignal.countDown(); try { // keep the lock until thread 2 let's us know it's done pessLockExceptionSignal.await(); } catch (InterruptedException e) { // do nothing } log.debug("Commited process instance aborting after 3 secs"); transactionManager.commit(status); // let main test thread know we're done threadsAreDoneLatch.countDown(); } };
ptm.commit( transaction );
ptm.commit( transaction );
ptm.commit(transaction);