tyrex.tm.impl
Class OracleXAResourceHelper
java.lang.Object
|
+--tyrex.tm.impl.XAResourceHelper
|
+--tyrex.tm.impl.OracleXAResourceHelper
- public final class OracleXAResourceHelper
- extends XAResourceHelper
This class describes various methods to help the transaction
manipulate XA resources from Oracle. This class has been
tested with Oracle 8.1.6, 8.1.7, 9.0.1.
- Author:
- Riad Mohammed
Field Summary |
static java.lang.String |
XID_CLASS_NAME
The name of the XID implementation class required by Oracle 8.1.6. |
Method Summary |
java.lang.String |
getXAErrorString(javax.transaction.xa.XAException xaException)
Return the oracle error code as a string if the exception is
XAResourceHelperManager._oracleXAExceptionClassName
otherwise return null. |
javax.transaction.xa.Xid |
getXid(javax.transaction.xa.XAResource xaResource,
javax.transaction.xa.Xid xid)
Create the xid for use with the XA resource from the specified xid. |
boolean |
treatDifferentBranchesForSharedResourcesAsShared()
Return true if shared xa resources can be treated as shared
even if they use different branches so that these xa resources
are not prepared/committed separately even if they don't have the same
xid. |
boolean |
useDifferentBranchesForSharedResources()
Return true if shared xa resources must use
different branches when enlisted in the transaction.The
resource may still be treated as shared in that prepare/commit
is only called once on a single xa resource
(@see #treatDifferentBranchesForSharedResourcesAsShared}). |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XID_CLASS_NAME
public static final java.lang.String XID_CLASS_NAME
- The name of the XID implementation class required by Oracle 8.1.6.
The value is "oracle.jdbc.xa.OracleXid".
OracleXAResourceHelper
public OracleXAResourceHelper()
- Default constructor
getXid
public javax.transaction.xa.Xid getXid(javax.transaction.xa.XAResource xaResource,
javax.transaction.xa.Xid xid)
throws javax.transaction.xa.XAException
- Create the xid for use with the XA resource from the specified xid.
The default implementation is to return the xid.
- Overrides:
getXid
in class XAResourceHelper
- Parameters:
xaResource
- The XAResourcexid
- The xid- Throws:
javax.transaction.xa.XAException
- An error occured obtaining the xid
useDifferentBranchesForSharedResources
public boolean useDifferentBranchesForSharedResources()
- Return true if shared xa resources must use
different branches when enlisted in the transaction.The
resource may still be treated as shared in that prepare/commit
is only called once on a single xa resource
(@see #treatDifferentBranchesForSharedResourcesAsShared}).
The default implementation returns false.
- Overrides:
useDifferentBranchesForSharedResources
in class XAResourceHelper
- Returns:
- true if shared xa resources must use
different branches when enlisted in the transaction.
- See Also:
treatDifferentBranchesForSharedResourcesAsShared()
treatDifferentBranchesForSharedResourcesAsShared
public boolean treatDifferentBranchesForSharedResourcesAsShared()
- Return true if shared xa resources can be treated as shared
even if they use different branches so that these xa resources
are not prepared/committed separately even if they don't have the same
xid. This method is only used if
useDifferentBranchesForSharedResources()
returns true.
The default implementation returns false.
- Overrides:
treatDifferentBranchesForSharedResourcesAsShared
in class XAResourceHelper
- Returns:
- true if shared xa resources can be treated as shared
even if they use different branches so that these xa resources
are not prepared separately even if they don't have the same
xid.
- See Also:
useDifferentBranchesForSharedResources()
getXAErrorString
public java.lang.String getXAErrorString(javax.transaction.xa.XAException xaException)
- Return the oracle error code as a string if the exception is
XAResourceHelperManager._oracleXAExceptionClassName
otherwise return null.
- Overrides:
getXAErrorString
in class XAResourceHelper
- Parameters:
xaException
- the XAException- Returns:
- an
Intalio Inc. (C) 1999-2001. All rights reserved.