org.apache.commons.messenger
Class XACapableAdapter
java.lang.Object
org.apache.commons.messenger.XACapableAdapter
- All Implemented Interfaces:
- XACapable
public class XACapableAdapter
- extends java.lang.Object
- implements XACapable
XACapableAdapter
is an adapter that implements
XACapable for a given Messenger
- Version:
- $Revision: 155459 $
- Author:
- James Strachan
Method Summary |
void |
delistResources(javax.transaction.Transaction transaction,
int flag)
This method is called to delist any XA resources the given object
has previously enlisted to this XA transaction. |
void |
enlistResources(javax.transaction.Transaction transaction)
This method is called to enlist any XA resources the given object
has to be part of the XA transaction. |
protected javax.transaction.xa.XAResource |
getXAResource()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final org.apache.commons.logging.Log log
- Logger
messenger
private Messenger messenger
XACapableAdapter
public XACapableAdapter(Messenger messenger)
enlistResources
public void enlistResources(javax.transaction.Transaction transaction)
throws java.lang.Exception
- Description copied from interface:
XACapable
- This method is called to enlist any XA resources the given object
has to be part of the XA transaction.
- Specified by:
enlistResources
in interface XACapable
- Parameters:
transaction
- the transaction to enlist to
- Throws:
java.lang.Exception
delistResources
public void delistResources(javax.transaction.Transaction transaction,
int flag)
throws java.lang.Exception
- Description copied from interface:
XACapable
- This method is called to delist any XA resources the given object
has previously enlisted to this XA transaction.
- Specified by:
delistResources
in interface XACapable
- Parameters:
transaction
- the transaction to delist resources fromflag
- is the flag used by JTA when delisting resources.
It is either XAResource.TMSUCCESS, XAResource.TMSUSPEND, or XAResource.TMFAIL
- Throws:
java.lang.Exception
getXAResource
protected javax.transaction.xa.XAResource getXAResource()
throws java.lang.Exception
- Returns:
- the XAResource associated with this Messenger if one exists
- Throws:
java.lang.Exception