oracle.jdbc.xa

## Class OracleXAException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - javax.transaction.xa.XAException
      - - oracle.jdbc.xa.OracleXAException

All Implemented Interfaces:
  Serializable

    public class OracleXAException
    extends XAException

OracleXAException extends XAException to leverage Oracle SQL Error number corresponding to the XA Exception.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class javax.transaction.xa.XAException

`errorCode, XA_HEURCOM, XA_HEURHAZ, XA_HEURMIX, XA_HEURRB, XA_NOMIGRATE, XA_RBBASE, XA_RBCOMMFAIL, XA_RBDEADLOCK, XA_RBEND, XA_RBINTEGRITY, XA_RBOTHER, XA_RBPROTO, XA_RBROLLBACK, XA_RBTIMEOUT, XA_RBTRANSIENT, XA_RDONLY, XA_RETRY, XAER_ASYNC, XAER_DUPID, XAER_INVAL, XAER_NOTA, XAER_OUTSIDE, XAER_PROTO, XAER_RMERR, XAER_RMFAIL`

### Constructor Summary

Constructors
Constructor and Description
`OracleXAException()` Default OracleXAException class.
`OracleXAException(int error)` Default OracleXAException class that takes an error code which is a combination of Oracle Sql No.
`OracleXAException(int error, int _xaError)`
`OracleXAException(SQLException sqlex, int _xaError)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static int` `errorConvert(int err, int defaultErrorCode)`
`String` `getMessage()`
`int` `getOracleError()` getOracleError returns the Oracle Error code corresponding to this exception.
`int` `getXAError()` getXAError returns the XA Error code corresponding to this exception.
`static String` `getXAErrorMessage(int eCode)`
`static XAException` `newXAException(oracle.jdbc.internal.OracleConnection conn, int error)`
`static XAException` `newXAException(oracle.jdbc.internal.OracleConnection conn, int error, int xaerror)`
`static XAException` `newXAException(oracle.jdbc.internal.OracleConnection conn, int error, SQLException sqlException)`
`static XAException` `newXAException(oracle.jdbc.internal.OracleConnection conn, SQLException sqlexc, int xaerror)`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### OracleXAException

    public OracleXAException()

Default OracleXAException class.

#### OracleXAException

    public OracleXAException(int error)

Default OracleXAException class that takes an error code which is a combination of Oracle Sql No. and XA Error No.

Parameters:
  `error` - Oracle Error no.

#### OracleXAException

    public OracleXAException(int error,
                             int _xaError)

#### OracleXAException

    public OracleXAException(SQLException sqlex,
                             int _xaError)

### Method Detail

#### newXAException

    public static XAException newXAException(oracle.jdbc.internal.OracleConnection conn,
                                             int error)

#### newXAException

    public static XAException newXAException(oracle.jdbc.internal.OracleConnection conn,
                                             int error,
                                             SQLException sqlException)

#### newXAException

    public static XAException newXAException(oracle.jdbc.internal.OracleConnection conn,
                                             int error,
                                             int xaerror)

#### newXAException

    public static XAException newXAException(oracle.jdbc.internal.OracleConnection conn,
                                             SQLException sqlexc,
                                             int xaerror)

#### errorConvert

    public static int errorConvert(int err,
                                   int defaultErrorCode)

#### getXAError

    public int getXAError()

getXAError returns the XA Error code corresponding to this exception. The error codes are the one defined in XAException class.

Returns:
  int XA Error Code.

#### getOracleError

    public int getOracleError()

getOracleError returns the Oracle Error code corresponding to this exception. Return values are the standard ORA errors. Returns zero when one doesn't exist.

Returns:
  int Oracle Error Code.

#### getMessage

    public String getMessage()

Overrides:
  `getMessage` in class `Throwable`

#### getXAErrorMessage

    public static String getXAErrorMessage(int eCode)

Copyright © 2008, 2020, Oracle and/or its affiliates. All rights reserved.