Top Description Fields Constructors Methods
javax.ejb

public Class EJBException

extends RuntimeException
Class Inheritance
Known Direct Subclasses
javax.ejb.EJBTransactionRequiredException, javax.ejb.EJBTransactionRolledbackException, javax.ejb.AccessLocalException, javax.ejb.ConcurrentAccessException, javax.ejb.NoMoreTimeoutsException, javax.ejb.NoSuchEJBException, javax.ejb.NoSuchEntityException, javax.ejb.NoSuchObjectLocalException, javax.ejb.TransactionRequiredLocalException, javax.ejb.TransactionRolledbackLocalException, javax.ejb.EJBAccessException

The EJBException is thrown 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).
Since
EJB 1.1

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
EJBException()

Constructs an EJBException with no detail message.

public
EJBException(String message)

Constructs an EJBException with the specified detailed message.

public
EJBException(Exception ex)

Constructs an EJBException that embeds the originally thrown exception.

public
EJBException(String message, Exception ex)

Constructs an EJBException that embeds the originally thrown exception with the specified detail message.

Method Summary

Modifier and TypeMethod and Description
public Exception
getCausedByException()

Obtain the exception that caused the EJBException to be thrown.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Constructor Detail

EJBExceptionback to summary
public EJBException()

Constructs an EJBException with no detail message.

EJBExceptionback to summary
public EJBException(String message)

Constructs an EJBException with the specified detailed message.

EJBExceptionback to summary
public EJBException(Exception ex)

Constructs an EJBException that embeds the originally thrown exception.

EJBExceptionback to summary
public EJBException(String message, Exception ex)

Constructs an EJBException that embeds the originally thrown exception with the specified detail message.

Method Detail

getCausedByExceptionback to summary
public Exception getCausedByException()

Obtain the exception that caused the EJBException to be thrown. It is recommended that the inherited Throwable.getCause() method be used to retrieve the cause instead of this method.