javax.ejb
public class: EJBException [javadoc |
source]
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.ejb.EJBException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConcurrentAccessTimeoutException, EJBAccessException, IllegalLoopbackException, NoSuchObjectLocalException, NoSuchEJBException, AccessLocalException, NoSuchEntityException, TransactionRequiredLocalException, ConcurrentAccessException, EJBTransactionRequiredException, NoMoreTimeoutsException, EJBTransactionRolledbackException, TransactionRolledbackLocalException
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).
Constructor: |
public EJBException() {
super();
causeException = null;
}
Constructs an EJBException with no detail message. |
public EJBException(String message) {
super(message);
causeException = null;
}
Constructs an EJBException with the specified detailed message. Parameters:
message - - The detailed message.
|
public EJBException(Exception ex) {
super(ex);
causeException = ex;
}
Constructs an EJBException that embeds the originally thrown exception. Parameters:
ex - - The originally thrown exception.
|
public EJBException(String message,
Exception ex) {
super(message, ex);
causeException = ex;
}
Constructs an EJBException with the specified message and the
originally throw exception. Parameters:
message - - The detailed message.
ex - - The originally thrown exception.
|
Methods from java.lang.Throwable: |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.ejb.EJBException Detail: |
public Exception getCausedByException() {
return causeException;
}
Obtain the exception that caused the EJBException being thrown. |