public class JdbcTransactionImpl extends Object implements Transaction
Transaction.TransactionState
Modifier | Constructor and Description |
---|---|
protected |
JdbcTransactionImpl(DataSource dataSource,
JdbcTransactionFactory factory,
JdbcChannelProviderImpl provider) |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Starts a transaction boundary for the current channel operation.
|
void |
close()
Ends a transaction boundary for the current channel operation.
|
void |
commit()
Indicates that the transaction can be successfully committed.
|
protected Connection |
getConnection() |
protected void |
incrementPersistedEventCount() |
protected void |
incrementRemovedEventCount() |
void |
rollback()
Indicates that the transaction can must be aborted.
|
protected JdbcTransactionImpl(DataSource dataSource, JdbcTransactionFactory factory, JdbcChannelProviderImpl provider)
public void begin()
Transaction
Starts a transaction boundary for the current channel operation. If a transaction is already in progress, this method will join that transaction using reference counting.
Note: For every invocation of this method there must be a corresponding invocation of Transaction.close() method. Failure to ensure this can lead to dangling transactions and unpredictable results.
begin
in interface Transaction
public void commit()
Transaction
commit
in interface Transaction
public void rollback()
Transaction
rollback
in interface Transaction
public void close()
Transaction
Ends a transaction boundary for the current channel operation. If a transaction is already in progress, this method will join that transaction using reference counting. The transaction is completed only if there are no more references left for this transaction.
Note: For every invocation of this method there must be a corresponding invocation of Transaction.begin() method. Failure to ensure this can lead to dangling transactions and unpredictable results.
close
in interface Transaction
protected Connection getConnection()
protected void incrementRemovedEventCount()
protected void incrementPersistedEventCount()
Copyright © 2009–2019 Apache Software Foundation. All rights reserved.