All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oracle.jdbc.xa.OracleXAResource

java.lang.Object
   |
   +----oracle.jdbc.xa.OracleXAResource

public abstract class OracleXAResource
extends Object

Variable Index

 o DEFAULT_XA_TIMEOUT
 o TMENDRSCAN
 o TMFAIL
 o TMJOIN
 o TMNOFLAGS
 o TMNOMIGRATE
 o TMONEPHASE
 o TMRESUME
 o TMSTARTRSCAN
 o TMSUCCESS
 o TMSUSPEND
 o XA_OK

Constructor Index

 o OracleXAResource()
 o OracleXAResource(Connection)

Method Index

 o commit(Xid, boolean)
 o end(Xid, int)
 o forget(Xid)
 o getTransactionTimeout()
Obtain the current transaction timeout value set for this XAResource instance.
 o isSameRM(XAResource)
This method is called to determine if the resource manager instance represented by the target object is the same as the resouce manager instance represented by the parameter xares.
 o prepare(Xid)
 o recover(int)
Obtain a list of prepared transaction branches from a resource manager.
 o recover(int, int)
 o rollback(Xid)
 o setTransactionTimeout(int)
Set the current transaction timeout value for this XAResource instance.
 o start(Xid, int)

Variables

 o XA_OK
 public static final int XA_OK
 o DEFAULT_XA_TIMEOUT
 public static final short DEFAULT_XA_TIMEOUT
 o TMNOFLAGS
 public static final int TMNOFLAGS
 o TMNOMIGRATE
 public static final int TMNOMIGRATE
 o TMENDRSCAN
 public static final int TMENDRSCAN
 o TMFAIL
 public static final int TMFAIL
 o TMJOIN
 public static final int TMJOIN
 o TMONEPHASE
 public static final int TMONEPHASE
 o TMRESUME
 public static final int TMRESUME
 o TMSTARTRSCAN
 public static final int TMSTARTRSCAN
 o TMSUCCESS
 public static final int TMSUCCESS
 o TMSUSPEND
 public static final int TMSUSPEND

Constructors

 o OracleXAResource
 public OracleXAResource()
 o OracleXAResource
 public OracleXAResource(Connection pm_conn) throws XAException

Methods

 o start
 public abstract void start(Xid xid,
                            int flag) throws XAException
 o end
 public abstract void end(Xid xid,
                          int flag) throws XAException
 o commit
 public abstract void commit(Xid xid,
                             boolean onePhase) throws XAException
 o prepare
 public abstract int prepare(Xid xid) throws XAException
 o forget
 public abstract void forget(Xid xid) throws XAException
 o recover
 public Xid[] recover(int maxcount,
                      int flag) throws XAException
 o rollback
 public abstract void rollback(Xid xid) throws XAException
 o recover
 public Xid[] recover(int flag) throws XAException
Obtain a list of prepared transaction branches from a resource manager. The transaction manager calls this method during recovery to obtain the list of transaction branches that are currently in prepared or heuristically completed states.

Parameters:
flag - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS must be used when no other flags are set in flags.
Returns:
The resource manager returns zero or more XIDs for the transaction branches that are currently in a prepared or heuristically completed state. If an error occurs during the operation, the resource manager should raise the appropriate XAException.
Throws: XAException
An error has occurred. Possible values are XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
 o getTransactionTimeout
 public int getTransactionTimeout() throws XAException
Obtain the current transaction timeout value set for this XAResource instance. If XAResource.setTransactionTimeout was not use prior to invoking this method, the return value is the default timeout set fo the resource manager; otherwise, the value used in the previous setTransactionTimeout call is returned.

Returns:
the transaction timeout value in seconds.
Throws: XAException
- An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL.
 o isSameRM
 public boolean isSameRM(XAResource xares) throws XAException
This method is called to determine if the resource manager instance represented by the target object is the same as the resouce manager instance represented by the parameter xares.

Parameters:
xares - - An XAResource object whose resource manager instance is to be compared with the resource manager instance of the target object.
Returns:
true if it's the same RM instance; otherwise false.
Throws: XAException
- An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL.
 o setTransactionTimeout
 public boolean setTransactionTimeout(int seconds) throws XAException
Set the current transaction timeout value for this XAResource instance. Once set, this timeout value is effective until setTransactionTimeout is invoked again with a different value. To reset the timeout value to the default value used by the resource manager, set the value to zero. If the timeout operation is performed successfully, the method returns true; otherwise false. If a resource manager does not support transaction timeout value to be set explicitly, this method returns false.

Parameters:
the - - transaction timeout value in seconds.
Returns:
s true if transaction timeout value is set successfully; otherwise false.
Throws: XAException
- An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.

All Packages  Class Hierarchy  This Package  Previous  Next  Index