Overview Package Class Tree Deprecated Index Help
JavaTM 2 Platform
Ent. Ed. v1.4
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.ejb
Class EJBException

java.lang.Object
 extended byjava.lang.Throwable
 extended byjava.lang.Exception
 extended byjava.lang.RuntimeException
 extended byjavax.ejb.EJBException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AccessLocalException, NoSuchEntityException, NoSuchObjectLocalException, TransactionRequiredLocalException, TransactionRolledbackLocalException

public class EJBException
extends RuntimeException

The EJBException exception is thrown by an enterprise Bean instance to its container to report that the invoked business method or callback method could not be completed because of an unexpected error (e.g. the instance failed to open a database connection).

See Also:
Serialized Form

Constructor Summary
EJBException()
Constructs an EJBException with no detail message.
EJBException(Exception ex)
Constructs an EJBException that embeds the originally thrown exception.
EJBException(String message)
Constructs an EJBException with the specified detailed message.
EJBException(String message, Exception ex)
Constructs an EJBException that embeds the originally thrown exception with the specified detail message.
Method Summary
Exception getCausedByException()
Obtain the exception that caused the EJBException being thrown.
String getMessage()
Returns the detail message, including the message from the nested exception if there is one.
void printStackTrace()
Prints the composite message to System.err.
void printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.
void printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.
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()
Constructs an EJBException with no detail message.


EJBException

public EJBException(String message)
Constructs an EJBException with the specified detailed message.


EJBException

public EJBException(Exception ex)
Constructs an EJBException that embeds the originally thrown exception.


EJBException

public EJBException(String message,
 Exception ex)
Constructs an EJBException that embeds the originally thrown exception with the specified detail message.

Method Detail

getCausedByException

public Exception getCausedByException()
Obtain the exception that caused the EJBException being thrown.


getMessage

public String getMessage()
Returns the detail message, including the message from the nested exception if there is one.


printStackTrace

public void printStackTrace(PrintStream ps)
Prints the composite message and the embedded stack trace to the specified stream ps.

Parameters:
ps - the print stream

printStackTrace

public void printStackTrace()
Prints the composite message to System.err.


printStackTrace

public void printStackTrace(PrintWriter pw)
Prints the composite message and the embedded stack trace to the specified print writer pw.

Parameters:
pw - the print writer

Overview Package Class Tree Deprecated Index Help
JavaTM 2 Platform
Ent. Ed. v1.4
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /