javax.ejb
Class EJBException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.ejb.EJBException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AccessLocalException, ConcurrentAccessException, EJBAccessException, EJBTransactionRequiredException, EJBTransactionRolledbackException, NoSuchEJBException, NoSuchEntityException, NoSuchObjectLocalException, TransactionRequiredLocalException, TransactionRolledbackLocalException

public class EJBException
extends java.lang.RuntimeException

Thrown for unexpected exception.

Author:
Florent Benoit
See Also:
EJB 3.0 specification, Serialized Form

Constructor Summary
EJBException()
          Default constructor : builds an exception with an empty message.
EJBException(java.lang.Exception causedByException)
          Builds an exception with a given exception.
EJBException(java.lang.String message)
          Builds an exception with a given message.
EJBException(java.lang.String message, java.lang.Exception causedByException)
          Builds an exception with a given message and given exception.
 
Method Summary
 java.lang.Exception getCausedByException()
           
 java.lang.String getMessage()
           
 void printStackTrace()
          Prints the stack trace on the default stream (System.err).
 void printStackTrace(java.io.PrintStream printStream)
          Print the stack trace on the given stream.
 void printStackTrace(java.io.PrintWriter printWriter)
          Print the stack trace on the given writer.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EJBException

public EJBException()
Default constructor : builds an exception with an empty message.


EJBException

public EJBException(java.lang.Exception causedByException)
Builds an exception with a given exception.

Parameters:
causedByException - the cause of this exception.

EJBException

public EJBException(java.lang.String message)
Builds an exception with a given message.

Parameters:
message - the message of this exception.

EJBException

public EJBException(java.lang.String message,
                    java.lang.Exception causedByException)
Builds an exception with a given message and given exception.

Parameters:
message - the message of this exception.
causedByException - the cause of this exception.
Method Detail

getCausedByException

public java.lang.Exception getCausedByException()
Returns:
the cause of this exception.

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable
Returns:
the message of this exception.

printStackTrace

public void printStackTrace()
Prints the stack trace on the default stream (System.err).

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream printStream)
Print the stack trace on the given stream.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
printStream - the given stream.

printStackTrace

public void printStackTrace(java.io.PrintWriter printWriter)
Print the stack trace on the given writer.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
printWriter - the given writer.


Copyright © 2008. All Rights Reserved.