|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.ejb Class EJBException
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException javax.ejb.EJBException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AccessLocalException, ConcurrentAccessException, EJBAccessException, EJBTransactionRequiredException, EJBTransactionRolledbackException, NoSuchEJBException, NoSuchEntityException, NoSuchObjectLocalException, TransactionRequiredLocalException, TransactionRolledbackLocalException
public class EJBException
- extends RuntimeException
Extends:
Throwable > Exception > RuntimeException
Extended by:
AccessLocalException, ConcurrentAccessException, EJBAccessException, EJBTransactionRequiredException, EJBTransactionRolledbackException, NoSuchEJBException, NoSuchEntityException, NoSuchObjectLocalException, TransactionRequiredLocalException, TransactionRolledbackLocalException
企业 Bean 实例抛出 EJBException 异常,向其容器报告由于不可预料的错误(例如,实例无法打开数据库连接),无法完成调用的业务方法或回调方法。
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 |
---|
public
EJBException()
构造不带详细消息的 EJBException。
英文文档:
EJBException
public EJBException()
- Constructs an EJBException with no detail message.
public
EJBException(String message)
构造带指定详细消息的 EJBException。
英文文档:
EJBException
public EJBException(String message)
- Constructs an EJBException with the specified
detailed message.
public
EJBException(Exception ex)
构造嵌入原始抛出异常的 EJBException。
英文文档:
EJBException
public EJBException(Exception ex)
- Constructs an EJBException that embeds the originally thrown exception.
public
EJBException(String message, Exception ex)
用指定的详细消息构造嵌入原始抛出异常的 EJBException。
英文文档:
EJBException
public EJBException(String message, Exception ex)
- Constructs an EJBException that embeds the originally thrown exception
with the specified detail message.
Method Detail |
---|
public Exception
getCausedByException()
获得导致 EJBException 抛出的异常。
英文文档:
getCausedByException
public Exception getCausedByException()
- Obtain the exception that caused the EJBException being thrown.
public String
getMessage()
返回包含来自嵌入异常的消息(如果有)的详细消息。
英文文档:
getMessage
public String getMessage()
- Returns the detail message, including the message from the nested
exception if there is one.
- Overrides:
getMessage
in classThrowable
public void
printStackTrace(java.io.PrintStream ps)
将复合消息和嵌入的堆栈跟踪打印到指定的流 ps
。
ps | 打印流 |
printStackTrace
public void printStackTrace(PrintStream ps)
- Prints the composite message and the embedded stack trace to
the specified stream
ps
. - Overrides:
printStackTrace
in classThrowable
- Parameters:
ps
- the print stream
public void
printStackTrace()
将复合消息打印到 System.err
。
英文文档:
printStackTrace
public void printStackTrace()
- Prints the composite message to
System.err
. - Overrides:
printStackTrace
in classThrowable
public void
printStackTrace(java.io.PrintWriter pw)
将复合消息和嵌入的堆栈跟踪打印到指定的打印编写器 pw
。
pw | 打印编写器 |
printStackTrace
public void printStackTrace(PrintWriter pw)
- Prints the composite message and the embedded stack trace to
the specified print writer
pw
. - Overrides:
printStackTrace
in classThrowable
- Parameters:
pw
- the print writer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!