|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
oracle.jdbc.xa.OracleXAResource | +--oracle.jdbc.xa.client.OracleXAResource | +--oracle.jdbc.xa.client.OracleXAHeteroResource
Fields inherited from class oracle.jdbc.xa.OracleXAResource |
DEFAULT_XA_TIMEOUT,
ORAISOLATIONMASK,
ORATMREADONLY,
ORATMREADWRITE,
ORATMSERIALIZABLE,
TMENDRSCAN,
TMFAIL,
TMJOIN,
TMNOFLAGS,
TMNOMIGRATE,
TMONEPHASE,
TMRESUME,
TMSTARTRSCAN,
TMSUCCESS,
TMSUSPEND,
XA_OK |
Constructor Summary | |
OracleXAHeteroResource(java.sql.Connection pm_conn)
|
Method Summary | |
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
Commit work done by global transaction specified by xid. |
void |
end(javax.transaction.xa.Xid xid,
int flag)
End work performed on behalf of a transaction branch. |
void |
forget(javax.transaction.xa.Xid xid)
Tell RM to forget about a heuristically completed txn branch |
int |
prepare(javax.transaction.xa.Xid xid)
Ask RM to prepare for a commit of the txn specified in xid. |
void |
rollback(javax.transaction.xa.Xid xid)
Ask RM to roll back work done on behalf of a txn branch. |
void |
start(javax.transaction.xa.Xid xid,
int flags)
Starts work on behalf of a transaction branch. |
Methods inherited from class oracle.jdbc.xa.OracleXAResource |
getTransactionTimeout,
isSameRM,
recover,
setTransactionTimeout |
Constructor Detail |
public OracleXAHeteroResource(java.sql.Connection pm_conn) throws javax.transaction.xa.XAException
Method Detail |
public void start(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
If TMJOIN is specified, the start is for joining an exisiting txn branch xid. If TMRESUME is specified, the start is to resume a suspended transaction branch specified in xid. Transaction suspend is done by calling the end method specifying the TMSUSPEND flag. If neither TMJOIN nor TMRESUME is specified and the transaction branch specified in xid already exists, the resource manager raises the duplicate transaction exception via XAER_DUPID.
start() allows Isolation flags to be set, only when beginning a new transaction. XAER_INVAL exception is raised for error cases, such as (1) when JOIN/RESUME specified on start (2) invalid Isol flag is set. The valid Isolation levels allowed are: ORATMREADONLY ORATMREADWRITE ORATMSERIALIZABLE
xid
- A global transaction identifier.flag
- One of TMNOFLAGS, TMJOIN, TMNOMIGRATE or TMRESUME.public void end(javax.transaction.xa.Xid xid, int flag) throws javax.transaction.xa.XAException
The resource manager dissociates the XA resource from the transaction branch specified and let the transaction be completed.
If TMSUSPEND is specified in flag, the txn branch is temporarily suspended in incomplete state. The txn context is in suspened state and must be resumed via start with TMRESUME specified. If TMFAIL is specified, the portion of work has failed. The RM may mark the transaction as rollback-only. If TMSUCCESS is specified, the portion of work has completed successfully.
xid
- A global transaction identifier that is the same as
what was used previously in the start method.flag
- One of TMSUCCESS, TMFAIL, or TMSUSPEND.public void commit(javax.transaction.xa.Xid xid, boolean onePhase) throws javax.transaction.xa.XAException
xid
- A global transaction identifier.onePhase
- If true, the RM should use a 1-phase commit protocol to
commit the work done on behalf of xid.public int prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
xid
- A global transaction identifier.public void forget(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
xid
- A global transaction identifier.public void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
xid
- A global transaction identifier.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |