Package org.apache.activemq.store.jdbc
Class TransactionContext
- java.lang.Object
-
- org.apache.activemq.store.jdbc.TransactionContext
-
public class TransactionContext extends Object
Helps keep track of the current transaction/JDBC connection.
-
-
Constructor Summary
Constructors Constructor Description TransactionContext(JDBCPersistenceAdapter persistenceAdapter, int networkTimeout, int queryTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()voidclose()voidcommit()voidexecuteBatch()PreparedStatementgetAddMessageStatement()ConnectiongetConnection()ConnectiongetExclusiveConnection()PreparedStatementgetRemovedMessageStatement()PreparedStatementgetUpdateLastAckStatement()voidonCompletion(Runnable runnable)voidrollback()voidsetAddMessageStatement(PreparedStatement addMessageStatement)voidsetRemovedMessageStatement(PreparedStatement removedMessageStatement)voidsetTransactionIsolation(int transactionIsolation)voidsetUpdateLastAckStatement(PreparedStatement ackMessageStatement)
-
-
-
Constructor Detail
-
TransactionContext
public TransactionContext(JDBCPersistenceAdapter persistenceAdapter, int networkTimeout, int queryTimeout) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getExclusiveConnection
public Connection getExclusiveConnection() throws IOException
- Throws:
IOException
-
getConnection
public Connection getConnection() throws IOException
- Throws:
IOException
-
executeBatch
public void executeBatch() throws SQLException- Throws:
SQLException
-
close
public void close() throws IOException- Throws:
IOException
-
begin
public void begin() throws IOException- Throws:
IOException
-
commit
public void commit() throws IOException- Throws:
IOException
-
rollback
public void rollback() throws IOException- Throws:
IOException
-
getAddMessageStatement
public PreparedStatement getAddMessageStatement()
-
setAddMessageStatement
public void setAddMessageStatement(PreparedStatement addMessageStatement)
-
getUpdateLastAckStatement
public PreparedStatement getUpdateLastAckStatement()
-
setUpdateLastAckStatement
public void setUpdateLastAckStatement(PreparedStatement ackMessageStatement)
-
getRemovedMessageStatement
public PreparedStatement getRemovedMessageStatement()
-
setRemovedMessageStatement
public void setRemovedMessageStatement(PreparedStatement removedMessageStatement)
-
setTransactionIsolation
public void setTransactionIsolation(int transactionIsolation)
-
onCompletion
public void onCompletion(Runnable runnable)
-
-