org.slim3.transaction.jta
Class XAResourceContext

java.lang.Object
  extended by org.slim3.transaction.jta.XAResourceContext

public class XAResourceContext
extends Object

A context class for XAResource.

Author:
higa

Field Summary
protected  XAResource resource
          The resource.
protected  Xid xid
          The transaction identifier.
 
Constructor Summary
XAResourceContext(XAResource resource, Xid xid)
          Constructor.
 
Method Summary
protected  void commit(boolean onePhase)
          Commits transaction.
protected  void end(int flags)
          Ends resource.
 XAResource getResource()
          Returns the resource.
 Xid getXid()
          Returns the transaction identifier.
protected  void rollback()
          Rolls back transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

protected XAResource resource
The resource.


xid

protected Xid xid
The transaction identifier.

Constructor Detail

XAResourceContext

public XAResourceContext(XAResource resource,
                         Xid xid)
Constructor.

Parameters:
resource - the resource.
xid - the transaction identifier
Method Detail

getResource

public XAResource getResource()
Returns the resource.

Returns:
the resource

getXid

public Xid getXid()
Returns the transaction identifier.

Returns:
the transaction identifier

end

protected void end(int flags)
            throws XAException
Ends resource.

Parameters:
flags - the flags
Throws:
XAException - if XAException is encountered

commit

protected void commit(boolean onePhase)
               throws XAException
Commits transaction.

Parameters:
onePhase - whether one phase commit is
Throws:
XAException - if XAException is encountered

rollback

protected void rollback()
                 throws XAException
Rolls back transaction.

Throws:
XAException - if XAException is encountered


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.