/** * Return a SavepointManager for the underlying transaction, if possible. * <p>Default implementation always throws a NestedTransactionNotSupportedException. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ protected SavepointManager getSavepointManager() { throw new NestedTransactionNotSupportedException("This transaction does not support savepoints"); }
/** * This implementation exposes the {@link SavepointManager} interface * of the underlying transaction object, if any. * @throws NestedTransactionNotSupportedException if savepoints are not supported * @see #isTransactionSavepointManager() */ @Override protected SavepointManager getSavepointManager() { Object transaction = this.transaction; if (!(transaction instanceof SavepointManager)) { throw new NestedTransactionNotSupportedException( "Transaction object [" + this.transaction + "] does not support savepoints"); } return (SavepointManager) transaction; }
/** * Return a SavepointManager for the underlying transaction, if possible. * <p>Default implementation always throws a NestedTransactionNotSupportedException. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ protected SavepointManager getSavepointManager() { throw new NestedTransactionNotSupportedException("This transaction does not support savepoints"); }
/** * This implementation exposes the {@link SavepointManager} interface * of the underlying transaction object, if any. * @throws NestedTransactionNotSupportedException if savepoints are not supported * @see #isTransactionSavepointManager() */ @Override protected SavepointManager getSavepointManager() { Object transaction = this.transaction; if (!(transaction instanceof SavepointManager)) { throw new NestedTransactionNotSupportedException( "Transaction object [" + this.transaction + "] does not support savepoints"); } return (SavepointManager) transaction; }
private SavepointManager getSavepointManager() { if (!isSavepointAllowed()) { throw new NestedTransactionNotSupportedException( "Transaction manager does not allow nested transactions"); } SavepointManager savepointManager = getEntityManagerHolder().getSavepointManager(); if (savepointManager == null) { throw new NestedTransactionNotSupportedException( "JpaDialect does not support savepoints - check your JPA provider's capabilities"); } return savepointManager; } }
@Override protected void doBegin(Object transaction, TransactionDefinition definition) { JtaTransactionObject txObject = (JtaTransactionObject) transaction; try { doJtaBegin(txObject, definition); } catch (NotSupportedException | UnsupportedOperationException ex) { throw new NestedTransactionNotSupportedException( "JTA implementation does not support nested transactions", ex); } catch (SystemException ex) { throw new CannotCreateTransactionException("JTA failure on begin", ex); } }
private SavepointManager getSavepointManager() { if (!isSavepointAllowed()) { throw new NestedTransactionNotSupportedException( "Transaction manager does not allow nested transactions"); } SavepointManager savepointManager = getEntityManagerHolder().getSavepointManager(); if (savepointManager == null) { throw new NestedTransactionNotSupportedException( "JpaDialect does not support savepoints - check your JPA provider's capabilities"); } return savepointManager; } }
protected ConnectionHolder getConnectionHolderForSavepoint() throws TransactionException { if (!isSavepointAllowed()) { throw new NestedTransactionNotSupportedException( "Transaction manager does not allow nested transactions"); } if (!hasConnectionHolder()) { throw new TransactionUsageException( "Cannot create nested transaction when not exposing a JDBC transaction"); } return getConnectionHolder(); }
@Override protected void doBegin(Object transaction, TransactionDefinition definition) { JtaTransactionObject txObject = (JtaTransactionObject) transaction; try { doJtaBegin(txObject, definition); } catch (NotSupportedException | UnsupportedOperationException ex) { throw new NestedTransactionNotSupportedException( "JTA implementation does not support nested transactions", ex); } catch (SystemException ex) { throw new CannotCreateTransactionException("JTA failure on begin", ex); } }
/** * This implementation creates a JDBC 3.0 Savepoint and returns it. * @see java.sql.Connection#setSavepoint */ @Override public Object createSavepoint() throws TransactionException { ConnectionHolder conHolder = getConnectionHolderForSavepoint(); try { if (!conHolder.supportsSavepoints()) { throw new NestedTransactionNotSupportedException( "Cannot create a nested transaction because savepoints are not supported by your JDBC driver"); } if (conHolder.isRollbackOnly()) { throw new CannotCreateTransactionException( "Cannot create savepoint for transaction which is already marked as rollback-only"); } return conHolder.createSavepoint(); } catch (SQLException ex) { throw new CannotCreateTransactionException("Could not create JDBC savepoint", ex); } }
throw new NestedTransactionNotSupportedException( "Transaction propagation 'nested' not supported for WebSphere UOW transactions");
throw new NestedTransactionNotSupportedException( "Transaction propagation 'nested' not supported for WebSphere UOW transactions");
throw new NestedTransactionNotSupportedException( "Transaction manager does not allow nested transactions by default - " + "specify 'nestedTransactionAllowed' property with value 'true'");
throw new NestedTransactionNotSupportedException( "Transaction manager does not allow nested transactions by default - " + "specify 'nestedTransactionAllowed' property with value 'true'");
/** * Return a SavepointManager for the underlying transaction, if possible. * <p>Default implementation always throws a NestedTransactionNotSupportedException. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ protected SavepointManager getSavepointManager() { throw new NestedTransactionNotSupportedException("This transaction does not support savepoints"); }
/** * Return a SavepointManager for the underlying transaction, if possible. * <p>Default implementation always throws a NestedTransactionNotSupportedException. * @throws org.springframework.transaction.NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints */ protected SavepointManager getSavepointManager() { throw new NestedTransactionNotSupportedException("This transaction does not support savepoints"); }
@Override protected void doBegin(Object transaction, TransactionDefinition definition) throws TransactionException { Object currentTransaction = TransactionSynchronizationManager.getResource(clientHolder); if(currentTransaction == transaction){ return; } if(currentTransaction != null && transaction != currentTransaction){ throw new NestedTransactionNotSupportedException("Nested transactions are not supported for impala"); } TransactionSynchronizationManager.bindResource(clientHolder, transaction); }
@Override protected void doBegin(Object transaction, TransactionDefinition definition) { JtaTransactionObject txObject = (JtaTransactionObject) transaction; try { doJtaBegin(txObject, definition); } catch (NotSupportedException | UnsupportedOperationException ex) { throw new NestedTransactionNotSupportedException( "JTA implementation does not support nested transactions", ex); } catch (SystemException ex) { throw new CannotCreateTransactionException("JTA failure on begin", ex); } }
/** * This implementation exposes the SavepointManager interface * of the underlying transaction object, if any. */ protected SavepointManager getSavepointManager() { if (!isTransactionSavepointManager()) { throw new NestedTransactionNotSupportedException( "Transaction object [" + getTransaction() + "] does not support savepoints"); } return (SavepointManager) getTransaction(); }
protected ConnectionHolder getConnectionHolderForSavepoint() throws TransactionException { if (!isSavepointAllowed()) { throw new NestedTransactionNotSupportedException( "Transaction manager does not allow nested transactions"); } if (!hasConnectionHolder()) { throw new TransactionUsageException( "Cannot create nested transaction if not exposing a JDBC transaction"); } return getConnectionHolder(); }