org.apache.activemq.util
Class TransactionTemplate

java.lang.Object
  extended by org.apache.activemq.util.TransactionTemplate

public class TransactionTemplate
extends Object

A helper class for running code with a PersistenceAdapter in a transaction.


Constructor Summary
TransactionTemplate(PersistenceAdapter persistenceAdapter, ConnectionContext context)
           
 
Method Summary
 ConnectionContext getContext()
           
 PersistenceAdapter getPersistenceAdapter()
           
 void run(Callback task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionTemplate

public TransactionTemplate(PersistenceAdapter persistenceAdapter,
                           ConnectionContext context)
Method Detail

run

public void run(Callback task)
         throws IOException
Throws:
IOException

getContext

public ConnectionContext getContext()

getPersistenceAdapter

public PersistenceAdapter getPersistenceAdapter()


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