|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openejb.spring.SpringTransactionPolicy
public class SpringTransactionPolicy
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.openejb.core.transaction.TransactionPolicy |
---|
TransactionPolicy.TransactionSynchronization |
Field Summary | |
---|---|
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager
|
protected TransactionType |
type
|
Constructor Summary | |
---|---|
SpringTransactionPolicy(org.springframework.transaction.PlatformTransactionManager transactionManager,
TransactionType type)
|
Method Summary | |
---|---|
void |
commit()
Commits or rolls back this TransactionPolicy. |
void |
enlistResource(javax.transaction.xa.XAResource xaResource)
Enlists a XAResource in the actual active transaction. |
java.lang.Object |
getResource(java.lang.Object key)
Gets a resource associated with the specified key. |
protected org.springframework.transaction.support.DefaultTransactionStatus |
getTransactionStatus()
|
TransactionType |
getTransactionType()
Gets the TransactionType for this policy. |
boolean |
isClientTransaction()
Is this policy running in an inhreited transaction? Some TransactionTypes, such as Required or Supported, use the caller's transaction instead of starting a new transaction. |
boolean |
isNewTransaction()
Is this a new transaction and not an inhreited transaction or no transaction? Some TransactionTypes, such as Required or Supported, use the caller's transaction instead of starting a new transaction. |
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. |
void |
setRollbackOnly()
Sets this TransactionPolicy to rollback when completed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.springframework.transaction.PlatformTransactionManager transactionManager
protected final TransactionType type
Constructor Detail |
---|
public SpringTransactionPolicy(org.springframework.transaction.PlatformTransactionManager transactionManager, TransactionType type)
Method Detail |
---|
public TransactionType getTransactionType()
TransactionPolicy
getTransactionType
in interface TransactionPolicy
public boolean isNewTransaction()
TransactionPolicy
isNewTransaction
in interface TransactionPolicy
public boolean isClientTransaction()
TransactionPolicy
isClientTransaction
in interface TransactionPolicy
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 void commit() throws ApplicationException, SystemException
TransactionPolicy
commit
in interface TransactionPolicy
ApplicationException
- if recoverable exception is encountered
SystemException
- if an unrecoverable exception is encounteredpublic 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 listenerpublic 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
transactionprotected org.springframework.transaction.support.DefaultTransactionStatus getTransactionStatus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |