org.jboss.jca.core.tx.jbossts
Class XAResourceWrapperImpl

java.lang.Object
  extended by org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl
All Implemented Interfaces:
XAResource, org.jboss.tm.XAResourceWrapper

public class XAResourceWrapperImpl
extends Object
implements org.jboss.jca.core.spi.transaction.xa.XAResourceWrapper, org.jboss.tm.XAResourceWrapper

A XAResourceWrapper.

Author:
Weston Price, Jesper Pedersen

Field Summary
 
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
 
Constructor Summary
XAResourceWrapperImpl(XAResource resource, boolean pad, Boolean override, String productName, String productVersion, String jndiName)
          Creates a new wrapper instance.
XAResourceWrapperImpl(XAResource resource, String productName, String productVersion)
          Creates a new wrapper instance.
 
Method Summary
 void commit(Xid xid, boolean onePhase)
          
 void end(Xid xid, int flags)
          
 boolean equals(Object object)
          
 void forget(Xid xid)
          
 String getJndiName()
          
 String getProductName()
          Get product name
 String getProductVersion()
          Get product version
 XAResource getResource()
          Get the XAResource that is being wrapped
 int getTransactionTimeout()
          
 int hashCode()
          
 boolean isSameRM(XAResource resource)
          
 int prepare(Xid xid)
          
 Xid[] recover(int flag)
          
 void rollback(Xid xid)
          
 boolean setTransactionTimeout(int flag)
          
 void start(Xid xid, int flags)
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XAResourceWrapperImpl

public XAResourceWrapperImpl(XAResource resource,
                             String productName,
                             String productVersion)
Creates a new wrapper instance.

Parameters:
resource - xaresource
productName - product name
productVersion - product version

XAResourceWrapperImpl

public XAResourceWrapperImpl(XAResource resource,
                             boolean pad,
                             Boolean override,
                             String productName,
                             String productVersion,
                             String jndiName)
Creates a new wrapper instance.

Parameters:
resource - xaresource
pad - pad
override - override
productName - product name
productVersion - product version
jndiName - jndi name
Method Detail

commit

public void commit(Xid xid,
                   boolean onePhase)
            throws XAException

Specified by:
commit in interface XAResource
Throws:
XAException

end

public void end(Xid xid,
                int flags)
         throws XAException

Specified by:
end in interface XAResource
Throws:
XAException

forget

public void forget(Xid xid)
            throws XAException

Specified by:
forget in interface XAResource
Throws:
XAException

getTransactionTimeout

public int getTransactionTimeout()
                          throws XAException

Specified by:
getTransactionTimeout in interface XAResource
Throws:
XAException

isSameRM

public boolean isSameRM(XAResource resource)
                 throws XAException

Specified by:
isSameRM in interface XAResource
Throws:
XAException

prepare

public int prepare(Xid xid)
            throws XAException

Specified by:
prepare in interface XAResource
Throws:
XAException

recover

public Xid[] recover(int flag)
              throws XAException

Specified by:
recover in interface XAResource
Throws:
XAException

rollback

public void rollback(Xid xid)
              throws XAException

Specified by:
rollback in interface XAResource
Throws:
XAException

setTransactionTimeout

public boolean setTransactionTimeout(int flag)
                              throws XAException

Specified by:
setTransactionTimeout in interface XAResource
Throws:
XAException

start

public void start(Xid xid,
                  int flags)
           throws XAException

Specified by:
start in interface XAResource
Throws:
XAException

getResource

public XAResource getResource()
Get the XAResource that is being wrapped

Specified by:
getResource in interface org.jboss.tm.XAResourceWrapper
Returns:
The XAResource

getProductName

public String getProductName()
Get product name

Specified by:
getProductName in interface org.jboss.tm.XAResourceWrapper
Returns:
Product name of the instance if defined; otherwise null

getProductVersion

public String getProductVersion()
Get product version

Specified by:
getProductVersion in interface org.jboss.tm.XAResourceWrapper
Returns:
Product version of the instance if defined; otherwise null

getJndiName

public String getJndiName()

Specified by:
getJndiName in interface org.jboss.tm.XAResourceWrapper

equals

public boolean equals(Object object)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012 JBoss, by Red Hat (http://www.jboss.org/ironjacamar)