|
||||||||||
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 javax.transaction.TransactionManager |
transactionManager
|
protected TransactionType |
transactionType
|
protected static Logger |
txLogger
|
Constructor Summary | |
---|---|
JtaTransactionPolicy(TransactionType transactionType,
javax.transaction.TransactionManager transactionManager)
|
Method Summary | |
---|---|
protected javax.transaction.Transaction |
beginTransaction()
|
protected void |
completeTransaction(javax.transaction.Transaction tx)
|
void |
enlistResource(javax.transaction.xa.XAResource xaResource)
Enlists a XAResource in the actual active transaction. |
protected void |
fireNonTransactionalCompletion()
|
abstract javax.transaction.Transaction |
getCurrentTransaction()
|
java.lang.Object |
getResource(java.lang.Object key)
Gets a resource associated with the specified key. |
protected javax.transaction.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(java.lang.Object key,
java.lang.Object value)
Associates the specified resource with the specified key. |
void |
registerSynchronization(TransactionPolicy.TransactionSynchronization synchronization)
Registers a listener for transaction synchronization events. |
java.lang.Object |
removeResource(java.lang.Object key)
Removes and returns the resource associated with the specified key. |
protected void |
resumeTransaction(javax.transaction.Transaction tx)
|
protected void |
rollbackTransaction(javax.transaction.Transaction tx)
|
void |
setRollbackOnly()
Sets this TransactionPolicy to rollback when completed |
protected void |
setRollbackOnly(javax.transaction.Transaction tx)
|
protected javax.transaction.Transaction |
suspendTransaction()
|
java.lang.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 javax.transaction.TransactionManager transactionManager
Constructor Detail |
---|
public JtaTransactionPolicy(TransactionType transactionType, javax.transaction.TransactionManager transactionManager)
Method Detail |
---|
public TransactionType getTransactionType()
TransactionPolicy
getTransactionType
in interface TransactionPolicy
public abstract javax.transaction.Transaction getCurrentTransaction()
public boolean isTransactionActive()
TransactionPolicy
isTransactionActive
in interface TransactionPolicy
public boolean isRollbackOnly()
TransactionPolicy
isRollbackOnly
in interface TransactionPolicy
public void setRollbackOnly()
TransactionPolicy
setRollbackOnly
in interface TransactionPolicy
public java.lang.Object getResource(java.lang.Object key)
TransactionPolicy
getResource
in interface TransactionPolicy
key
- the resource key
public void putResource(java.lang.Object key, java.lang.Object value)
TransactionPolicy
putResource
in interface TransactionPolicy
key
- the resource keyvalue
- the resourcepublic java.lang.Object removeResource(java.lang.Object key)
TransactionPolicy
removeResource
in interface TransactionPolicy
key
- the resource key
public void registerSynchronization(TransactionPolicy.TransactionSynchronization synchronization)
TransactionPolicy
registerSynchronization
in interface TransactionPolicy
synchronization
- the transaction synchronization listenerprotected void fireNonTransactionalCompletion()
public void enlistResource(javax.transaction.xa.XAResource xaResource) throws SystemException
TransactionPolicy
enlistResource
in interface TransactionPolicy
xaResource
- the XAResource to enlist
SystemException
- if the xaResource could not be enlisted in the
transactionpublic java.lang.String toString()
toString
in class java.lang.Object
protected javax.transaction.Transaction getTransaction() throws SystemException
SystemException
protected void setRollbackOnly(javax.transaction.Transaction tx)
protected javax.transaction.Transaction beginTransaction() throws SystemException
SystemException
protected javax.transaction.Transaction suspendTransaction() throws SystemException
SystemException
protected void resumeTransaction(javax.transaction.Transaction tx) throws SystemException
SystemException
protected void completeTransaction(javax.transaction.Transaction tx) throws SystemException, ApplicationException
SystemException
ApplicationException
protected void rollbackTransaction(javax.transaction.Transaction tx) throws SystemException
SystemException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |