EJBException (Java EE 5)

Java EE API


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:
Serializable
Direct Known Subclasses:
AccessLocalException, ConcurrentAccessException, EJBAccessException, EJBTransactionRequiredException, EJBTransactionRolledbackException, NoSuchEJBException, NoSuchEntityException, NoSuchObjectLocalException, TransactionRequiredLocalException, TransactionRolledbackLocalException

public class EJBException
extends RuntimeException

Extends: Throwable > Exception > RuntimeException

企业 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
 
Method Summary
 Exception
 String
 void
 void
 void
 
Methods inherited from class java.lang.Throwable
 
Methods inherited from class java.lang.Object
 

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 class Throwable

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 class Throwable
Parameters:
ps - the print stream

public void printStackTrace()
将复合消息打印到 System.err
英文文档:

printStackTrace

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

Overrides:
printStackTrace in class Throwable

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 class Throwable
Parameters:
pw - the print writer


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!