org.apache.commons.messenger
Class XACapableAdapter

java.lang.Object
  extended by org.apache.commons.messenger.XACapableAdapter
All Implemented Interfaces:
XACapable

public class XACapableAdapter
extends Object
implements XACapable

XACapableAdapter is an adapter that implements XACapable for a given Messenger

Version:
$Revision: 155459 $
Author:
James Strachan

Constructor Summary
XACapableAdapter(Messenger messenger)
           
 
Method Summary
 void delistResources(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(Transaction transaction)
          This method is called to enlist any XA resources the given object has to be part of the XA transaction.
protected  XAResource getXAResource()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XACapableAdapter

public XACapableAdapter(Messenger messenger)
Method Detail

enlistResources

public void enlistResources(Transaction transaction)
                     throws 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:
Exception

delistResources

public void delistResources(Transaction transaction,
                            int flag)
                     throws 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 from
flag - is the flag used by JTA when delisting resources. It is either XAResource.TMSUCCESS, XAResource.TMSUSPEND, or XAResource.TMFAIL
Throws:
Exception

getXAResource

protected XAResource getXAResource()
                            throws Exception
Returns:
the XAResource associated with this Messenger if one exists
Throws:
Exception


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.