org.objectweb.jonas.jdbc
Class XAExceptionUtils

java.lang.Object
  extended byorg.objectweb.jonas.jdbc.XAExceptionUtils

public class XAExceptionUtils
extends java.lang.Object

This helper class is here to ease XAException creation when Exception chaining is wanted.

Author:
Guillaume Sauthier

Constructor Summary
XAExceptionUtils()
           
 
Method Summary
static void throwXAException(int errorCode, java.lang.Throwable cause)
          Construct and throw a new XAException with the given errorCode and initialized with the given cause.
static void throwXAException(java.lang.String message, java.lang.Throwable cause)
          Construct and throw a new XAException with the given message and initialized with the given cause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAExceptionUtils

public XAExceptionUtils()
Method Detail

throwXAException

public static void throwXAException(int errorCode,
                                    java.lang.Throwable cause)
                             throws javax.transaction.xa.XAException
Construct and throw a new XAException with the given errorCode and initialized with the given cause.

Parameters:
errorCode - XA code
cause - cause of this Exception
Throws:
javax.transaction.xa.XAException - Always throw a new XAException

throwXAException

public static void throwXAException(java.lang.String message,
                                    java.lang.Throwable cause)
                             throws javax.transaction.xa.XAException
Construct and throw a new XAException with the given message and initialized with the given cause.

Parameters:
message - Exception message
cause - cause of this Exception
Throws:
javax.transaction.xa.XAException - Always throw a new XAException