Package org.apache.activemq.util
Class TransactionTemplate
- java.lang.Object
-
- org.apache.activemq.util.TransactionTemplate
-
public class TransactionTemplate extends Object
A helper class for running code with a PersistenceAdapter in a transaction.
-
-
Constructor Summary
Constructors Constructor Description TransactionTemplate(PersistenceAdapter persistenceAdapter, ConnectionContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionContext
getContext()
PersistenceAdapter
getPersistenceAdapter()
void
run(Callback task)
-
-
-
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()
-
-