org.objectweb.joram.client.jms

Class XAResource

Implemented Interfaces:
javax.transaction.xa.XAResource

public class XAResource
extends java.lang.Object
implements javax.transaction.xa.XAResource

A XAResource instance is used by a XASession instance as a delegate to a Transaction Manager.

Constructor Summary

XAResource(XAResourceMngr rm, Session sess)
Constructs an XA resource representing a given session.

Method Summary

void
commit(Xid xid, boolean onePhase)
Commits the resource.
void
end(Xid xid, int flag)
Delists this resource.
void
forget(Xid xid)
Not implemented as transactions are not heuristically completed.
int
getTransactionTimeout()
Returns 0 as timeout feaure is not supported.
boolean
isSameRM(javax.transaction.xa.XAResource o)
Checks wether this resource shares the same resource manager (XAConnection) with an other resource.
int
prepare(Xid xid)
Prepares the resource.
Xid[]
recover(int flag)
Recovers the prepared transactions identifiers.
void
rollback(Xid xid)
Rolls the resource back.
boolean
setTransactionTimeout(int seconds)
Returns false as timeout feaure is not supported.
void
start(Xid xid, int flag)
Enlists this resource in a given transaction.

Constructor Details

XAResource

public XAResource(XAResourceMngr rm,
                  Session sess)
Constructs an XA resource representing a given session.

Method Details

commit

public void commit(Xid xid,
                   boolean onePhase)
            throws XAException
Commits the resource.


end

public void end(Xid xid,
                int flag)
            throws XAException
Delists this resource.


forget

public void forget(Xid xid)
            throws XAException
Not implemented as transactions are not heuristically completed.


getTransactionTimeout

public int getTransactionTimeout()
            throws XAException
Returns 0 as timeout feaure is not supported.


isSameRM

public boolean isSameRM(javax.transaction.xa.XAResource o)
            throws XAException
Checks wether this resource shares the same resource manager (XAConnection) with an other resource.


prepare

public int prepare(Xid xid)
            throws XAException
Prepares the resource.


recover

public Xid[] recover(int flag)
            throws XAException
Recovers the prepared transactions identifiers.


rollback

public void rollback(Xid xid)
            throws XAException
Rolls the resource back.


setTransactionTimeout

public boolean setTransactionTimeout(int seconds)
            throws XAException
Returns false as timeout feaure is not supported.


start

public void start(Xid xid,
                  int flag)
            throws XAException
Enlists this resource in a given transaction.


Copyright B) 2004 Scalagent - All rights reserved