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 void
begin()
void
close()
void
commit()
void
executeBatch()
PreparedStatement
getAddMessageStatement()
Connection
getConnection()
Connection
getExclusiveConnection()
PreparedStatement
getRemovedMessageStatement()
PreparedStatement
getUpdateLastAckStatement()
void
onCompletion(Runnable runnable)
void
rollback()
void
setAddMessageStatement(PreparedStatement addMessageStatement)
void
setRemovedMessageStatement(PreparedStatement removedMessageStatement)
void
setTransactionIsolation(int transactionIsolation)
void
setUpdateLastAckStatement(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)
-
-