List of usage examples for org.springframework.transaction TransactionSystemException TransactionSystemException
public TransactionSystemException(String msg, Throwable cause)
From source file:org.springframework.transaction.compensating.support.DefaultCompensatingTransactionOperationManager.java
public void rollback() { log.debug("Performing rollback"); while (!operationExecutors.isEmpty()) { CompensatingTransactionOperationExecutor rollbackOperation = (CompensatingTransactionOperationExecutor) operationExecutors .pop();// w ww.jav a 2 s . c om try { rollbackOperation.rollback(); } catch (Exception e) { throw new TransactionSystemException("Error occurred during rollback", e); } } }
From source file:org.springframework.transaction.compensating.support.DefaultCompensatingTransactionOperationManager.java
public void commit() { log.debug("Performing commit"); for (Iterator iter = operationExecutors.iterator(); iter.hasNext();) { CompensatingTransactionOperationExecutor operationExecutor = (CompensatingTransactionOperationExecutor) iter .next();/*from ww w .jav a 2 s . c om*/ try { operationExecutor.commit(); } catch (Exception e) { throw new TransactionSystemException("Error occurred during commit", e); } } }
From source file:org.springframework.transaction.jta.WebLogicServerTransactionManagerFactoryBean.java
/** * This constructor retrieves the WebLogic TransactionManager factory class, * so we can get access to the JTA TransactionManager. *///from w ww.ja v a 2 s.c o m public WebLogicServerTransactionManagerFactoryBean() throws TransactionSystemException { try { logger.debug("Looking for WebLogic TxHelper: " + TX_HELPER_CLASS_NAME); Class helperClass = Class.forName(TX_HELPER_CLASS_NAME); if (logger.isDebugEnabled()) { logger.debug("Found WebLogic TxHelper: " + helperClass.getName()); } Method method = helperClass.getMethod("getTransactionManager", (Class[]) null); this.transactionManager = (TransactionManager) method.invoke(null, (Object[]) null); } catch (ClassNotFoundException ex) { throw new TransactionSystemException("Could not find WebLogic's TxHelper class", ex); } catch (InvocationTargetException ex) { throw new TransactionSystemException("WebLogic's TxHelper.getTransactionManager method failed", ex.getTargetException()); } catch (Exception ex) { throw new TransactionSystemException( "Could not access WebLogic's TxHelper.getTransactionManager method", ex); } }