|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openejb.core.transaction.JtaTransactionPolicy
public abstract class JtaTransactionPolicy
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.openejb.core.transaction.TransactionPolicy |
|---|
TransactionPolicy.TransactionSynchronization |
| Field Summary | |
|---|---|
protected static Logger |
logger
|
protected TransactionManager |
transactionManager
|
protected TransactionType |
transactionType
|
protected static Logger |
txLogger
|
| Constructor Summary | |
|---|---|
JtaTransactionPolicy(TransactionType transactionType,
TransactionManager transactionManager)
|
|
| Method Summary | |
|---|---|
protected Transaction |
beginTransaction()
|
protected void |
completeTransaction(Transaction tx)
|
void |
enlistResource(XAResource xaResource)
Enlists a XAResource in the actual active transaction. |
protected void |
fireNonTransactionalCompletion()
|
abstract Transaction |
getCurrentTransaction()
|
Object |
getResource(Object key)
Gets a resource associated with the specified key. |
protected Transaction |
getTransaction()
|
TransactionType |
getTransactionType()
Gets the TransactionType for this policy. |
boolean |
isRollbackOnly()
If true, this TransactionPolicy will ultimately end with rollback. |
boolean |
isTransactionActive()
Is there a actual transaction active? |
void |
putResource(Object key,
Object value)
Associates the specified resource with the specified key. |
void |
registerSynchronization(TransactionPolicy.TransactionSynchronization synchronization)
Registers a listener for transaction synchronization events. |
Object |
removeResource(Object key)
Removes and returns the resource associated with the specified key. |
protected void |
resumeTransaction(Transaction tx)
|
protected void |
rollbackTransaction(Transaction tx)
|
void |
setRollbackOnly()
Sets this TransactionPolicy to rollback when completed |
void |
setRollbackOnly(Throwable reason)
Sets this TransactionPolicy to rollback when completed |
protected void |
setRollbackOnly(Transaction tx,
Throwable reason)
|
protected Transaction |
suspendTransaction()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.openejb.core.transaction.TransactionPolicy |
|---|
commit, isClientTransaction, isNewTransaction |
| Field Detail |
|---|
protected static final Logger logger
protected static final Logger txLogger
protected final TransactionType transactionType
protected final TransactionManager transactionManager
| Constructor Detail |
|---|
public JtaTransactionPolicy(TransactionType transactionType,
TransactionManager transactionManager)
| Method Detail |
|---|
public TransactionType getTransactionType()
TransactionPolicy
getTransactionType in interface TransactionPolicypublic abstract Transaction getCurrentTransaction()
public boolean isTransactionActive()
TransactionPolicy
isTransactionActive in interface TransactionPolicypublic boolean isRollbackOnly()
TransactionPolicy
isRollbackOnly in interface TransactionPolicypublic void setRollbackOnly()
TransactionPolicy
setRollbackOnly in interface TransactionPolicypublic void setRollbackOnly(Throwable reason)
TransactionPolicy
setRollbackOnly in interface TransactionPolicypublic Object getResource(Object key)
TransactionPolicy
getResource in interface TransactionPolicykey - the resource key
public void putResource(Object key,
Object value)
TransactionPolicy
putResource in interface TransactionPolicykey - the resource keyvalue - the resourcepublic Object removeResource(Object key)
TransactionPolicy
removeResource in interface TransactionPolicykey - the resource key
public void registerSynchronization(TransactionPolicy.TransactionSynchronization synchronization)
TransactionPolicy
registerSynchronization in interface TransactionPolicysynchronization - the transaction synchronization listenerprotected void fireNonTransactionalCompletion()
public void enlistResource(XAResource xaResource)
throws SystemException
TransactionPolicy
enlistResource in interface TransactionPolicyxaResource - the XAResource to enlist
SystemException - if the xaResource could not be enlisted in the
transactionpublic String toString()
toString in class Object
protected Transaction getTransaction()
throws SystemException
SystemException
protected void setRollbackOnly(Transaction tx,
Throwable reason)
protected Transaction beginTransaction()
throws SystemException
SystemException
protected Transaction suspendTransaction()
throws SystemException
SystemException
protected void resumeTransaction(Transaction tx)
throws SystemException
SystemException
protected void completeTransaction(Transaction tx)
throws SystemException,
ApplicationException
SystemException
ApplicationException
protected void rollbackTransaction(Transaction tx)
throws SystemException
SystemException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||