public class TransactionHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
JNDI_TRANSACTION_MANAGER
java:jboss/TransactionManager .
|
static String |
JNDI_USER_TRANSACTION
java:jboss/UserTransaction .
|
| Constructor and Description |
|---|
TransactionHelper(boolean enabled)
Constructs a new utx helper.
|
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Begin.
|
void |
commit()
Commit.
|
static TransactionManager |
getTransactionManager()
Helper method to get the TransactionManager, if possible.
|
static TransactionManager |
getTransactionManager(Properties properties)
Helper method to get the TransactionManager, if possible.
|
static UserTransaction |
getUserTransaction()
Helper method to get the UserTransaction, if possible.
|
void |
rollback()
Rollback.
|
public static final String JNDI_TRANSACTION_MANAGER
public static final String JNDI_USER_TRANSACTION
public TransactionHelper(boolean enabled)
enabled - if enabledpublic void begin()
throws org.switchyard.HandlerException
org.switchyard.HandlerException - oopspublic void commit()
throws org.switchyard.HandlerException
org.switchyard.HandlerException - oopspublic void rollback()
throws org.switchyard.HandlerException
org.switchyard.HandlerException - oopspublic static TransactionManager getTransactionManager()
public static TransactionManager getTransactionManager(Properties properties)
properties - optional jndi initial context properties, or nullpublic static UserTransaction getUserTransaction()
Copyright © 2013–2017 JBoss by Red Hat. All rights reserved.