The XAException is thrown by the Resource Manager (RM) to inform the Transaction Manager of an error encountered by the involved transaction.
More...
#include <src/main/cms/XAException.h>
Public Member Functions |
| XAException () |
| XAException (int errorCode) |
| XAException (const XAException &ex) |
| XAException (const std::string &message) |
| XAException (const std::string &message, const std::exception *cause) |
| XAException (const std::string &message, const std::exception *cause, const std::vector< std::pair< std::string, int > > &stackTrace) |
virtual | ~XAException () throw () |
virtual XAException * | clone () |
| Creates a cloned version of this CMSException instance.
|
void | setErrorCode (int errorCode) |
| Sets the error code for this XAException.
|
int | getErrorCode () const |
| Gets the error code that was assigned to this XAException.
|
| CMSException () |
| CMSException (const CMSException &ex) |
| CMSException (const std::string &message) |
| CMSException (const std::string &message, const std::exception *cause) |
| CMSException (const std::string &message, const std::exception *cause, const std::vector< std::pair< std::string, int > > &stackTrace) |
virtual | ~CMSException () throw () |
virtual std::string | getMessage () const |
| Gets the cause of the error.
|
virtual const std::exception * | getCause () const |
| Gets the exception that caused this one to be thrown, this allows for chaining of exceptions in the case of a method that throws only a particular exception but wishes to allow for the real causal exception to be passed only in case the caller knows about that type of exception and wishes to respond to it.
|
virtual std::vector< std::pair
< std::string, int > > | getStackTrace () const |
| Provides the stack trace for every point where this exception was caught, marked, and rethrown.
|
virtual void | setMark (const char *file, const int lineNumber) |
| Adds a file/line number to the stack trace.
|
virtual void | printStackTrace () const |
| Prints the stack trace to std::err.
|
virtual void | printStackTrace (std::ostream &stream) const |
| Prints the stack trace to the given output stream.
|
virtual std::string | getStackTraceString () const |
| Gets the stack trace as one contiguous string.
|
virtual const char * | what () const throw () |
| Overloads the std::exception what() function to return the cause of the exception.
|
Static Public Attributes |
static const int | XA_RBBASE |
| Code which contains the inclusive lower bound of the rollback error codes.
|
static const int | XA_RBROLLBACK |
| Code which means that the rollback occurred for an unspecified reason.
|
static const int | XA_RBCOMMFAIL |
| Code which means that rollback was caused by a communication failure.
|
static const int | XA_RBDEADLOCK |
| Code which means that a failure occurred because a deadlock was detected.
|
static const int | XA_RBINTEGRITY |
| Code which means that a condition was detected than implies a violation of the integrity of the resource.
|
static const int | XA_RBOTHER |
| Code which means that the Resource Manager rolled back the transaction branch for a reason not separately listed.
|
static const int | XA_RBPROTO |
| Code which means that a protocol error occurred in the Resource Manager.
|
static const int | XA_RBTIMEOUT |
| Code which means that a transaction branch took too long.
|
static const int | XA_RBTRANSIENT |
| Code which means that the caller may retry the transaction branch.
|
static const int | XA_RBEND |
| Code which contains the inclusive upper bound of the rollback error codes.
|
static const int | XA_NOMIGRATE |
| Code which means that resumption must occur where the suspension occurred.
|
static const int | XA_HEURHAZ |
| Code which means that the transaction branch may have been heuristically completed.
|
static const int | XA_HEURCOM |
| Code which means that the transaction branch has been heuristically committed.
|
static const int | XA_HEURRB |
| Code which means that the transaction branch has been heuristically rolled back.
|
static const int | XA_HEURMIX |
| Code which means that the transaction branch has been heuristically committed and rolled back.
|
static const int | XA_RETRY |
| Code which means that the method returned with no effect and can be reissued.
|
static const int | XA_RDONLY |
| Code which means that the transaction branch was read only and has been committed.
|
static const int | XAER_ASYNC |
| Code which means that there is already an asynchronous operation outstanding.
|
static const int | XAER_RMERR |
| Code which means that a Resource Manager error has occurred for the transaction branch.
|
static const int | XAER_NOTA |
| Code which means that the XID is not valid.
|
static const int | XAER_INVAL |
| Code which means that invalid arguments were supplied.
|
static const int | XAER_PROTO |
| Code which means that the method was invoked in an improper context.
|
static const int | XAER_RMFAIL |
| Code which means that the Resource Manager is unavailable.
|
static const int | XAER_DUPID |
| Code which means that the XID already exists.
|
static const int | XAER_OUTSIDE |
| Work is being done by the Resource Manager outside the boundaries of a global transaction.
|
Detailed Description
The XAException is thrown by the Resource Manager (RM) to inform the Transaction Manager of an error encountered by the involved transaction.
- Since
- 2.3
Constructor & Destructor Documentation
cms::XAException::XAException |
( |
| ) |
|
cms::XAException::XAException |
( |
int |
errorCode | ) |
|
cms::XAException::XAException |
( |
const std::string & |
message | ) |
|
cms::XAException::XAException |
( |
const std::string & |
message, |
|
|
const std::exception * |
cause |
|
) |
| |
cms::XAException::XAException |
( |
const std::string & |
message, |
|
|
const std::exception * |
cause, |
|
|
const std::vector< std::pair< std::string, int > > & |
stackTrace |
|
) |
| |
virtual cms::XAException::~XAException |
( |
| ) |
throw () |
|
virtual |
Member Function Documentation
Creates a cloned version of this CMSException instance.
This method passes on ownership of the contained cause exception pointer to the clone. This method is mainly useful to the CMS provider.
- Returns
- new pointer that is a clone of this Exception, caller owns.
Reimplemented from cms::CMSException.
int cms::XAException::getErrorCode |
( |
| ) |
const |
|
inline |
Gets the error code that was assigned to this XAException.
- Returns
- the assigned error code.
void cms::XAException::setErrorCode |
( |
int |
errorCode | ) |
|
|
inline |
Field Documentation
const int cms::XAException::XA_HEURCOM |
|
static |
Code which means that the transaction branch has been heuristically committed.
const int cms::XAException::XA_HEURHAZ |
|
static |
Code which means that the transaction branch may have been heuristically completed.
const int cms::XAException::XA_HEURMIX |
|
static |
Code which means that the transaction branch has been heuristically committed and rolled back.
const int cms::XAException::XA_HEURRB |
|
static |
Code which means that the transaction branch has been heuristically rolled back.
const int cms::XAException::XA_NOMIGRATE |
|
static |
Code which means that resumption must occur where the suspension occurred.
const int cms::XAException::XA_RBBASE |
|
static |
Code which contains the inclusive lower bound of the rollback error codes.
const int cms::XAException::XA_RBCOMMFAIL |
|
static |
Code which means that rollback was caused by a communication failure.
const int cms::XAException::XA_RBDEADLOCK |
|
static |
Code which means that a failure occurred because a deadlock was detected.
const int cms::XAException::XA_RBEND |
|
static |
Code which contains the inclusive upper bound of the rollback error codes.
const int cms::XAException::XA_RBINTEGRITY |
|
static |
Code which means that a condition was detected than implies a violation of the integrity of the resource.
const int cms::XAException::XA_RBOTHER |
|
static |
Code which means that the Resource Manager rolled back the transaction branch for a reason not separately listed.
const int cms::XAException::XA_RBPROTO |
|
static |
Code which means that a protocol error occurred in the Resource Manager.
const int cms::XAException::XA_RBROLLBACK |
|
static |
Code which means that the rollback occurred for an unspecified reason.
const int cms::XAException::XA_RBTIMEOUT |
|
static |
Code which means that a transaction branch took too long.
const int cms::XAException::XA_RBTRANSIENT |
|
static |
Code which means that the caller may retry the transaction branch.
const int cms::XAException::XA_RDONLY |
|
static |
Code which means that the transaction branch was read only and has been committed.
const int cms::XAException::XA_RETRY |
|
static |
Code which means that the method returned with no effect and can be reissued.
const int cms::XAException::XAER_ASYNC |
|
static |
Code which means that there is already an asynchronous operation outstanding.
const int cms::XAException::XAER_DUPID |
|
static |
Code which means that the XID already exists.
const int cms::XAException::XAER_INVAL |
|
static |
Code which means that invalid arguments were supplied.
const int cms::XAException::XAER_NOTA |
|
static |
Code which means that the XID is not valid.
const int cms::XAException::XAER_OUTSIDE |
|
static |
Work is being done by the Resource Manager outside the boundaries of a global transaction.
const int cms::XAException::XAER_PROTO |
|
static |
Code which means that the method was invoked in an improper context.
const int cms::XAException::XAER_RMERR |
|
static |
Code which means that a Resource Manager error has occurred for the transaction branch.
const int cms::XAException::XAER_RMFAIL |
|
static |
Code which means that the Resource Manager is unavailable.
The documentation for this class was generated from the following file: