org.apache.activemq.store.jdbc
Class TransactionContext

java.lang.Object
  extended by org.apache.activemq.store.jdbc.TransactionContext

public class TransactionContext
extends Object

Helps keep track of the current transaction/JDBC connection.


Constructor Summary
TransactionContext(JDBCPersistenceAdapter persistenceAdapter)
           
 
Method Summary
 void begin()
           
 void close()
           
 void commit()
           
 void executeBatch()
           
 PreparedStatement getAddMessageStatement()
           
 Connection getConnection()
           
 PreparedStatement getRemovedMessageStatement()
           
 PreparedStatement getUpdateLastAckStatement()
           
 void rollback()
           
 void setAddMessageStatement(PreparedStatement addMessageStatement)
           
 void setRemovedMessageStatement(PreparedStatement removedMessageStatement)
           
 void setTransactionIsolation(int transactionIsolation)
           
 void setUpdateLastAckStatement(PreparedStatement ackMessageStatement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionContext

public TransactionContext(JDBCPersistenceAdapter persistenceAdapter)
                   throws IOException
Throws:
IOException
Method Detail

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)


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.