Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Enterprise JavaBeans™ Specification, Version 2.0 - Sun Microsystems.pdf
Скачиваний:
14
Добавлен:
24.05.2014
Размер:
2.71 Mб
Скачать

Sun Microsystems Inc

Overview and Concepts

Enterprise JavaBeans 2.0, Public Draft

Exception handling

Chapter 17 Exception handling

17.1 Overview and Concepts

17.1.1 Application exceptions

An application exception is an exception defined in the throws clause of a method of the enterprise Bean’s home and remote interfaces, other than the java.rmi.RemoteException.

Enterprise bean business methods use application exceptions to inform the client of abnormal applica- tion-level conditions, such as unacceptable values of the input arguments to a business method. A client can typically recover from an application exception. Application exceptions are not intended for reporting system-level problems.

For example, the Account enterprise bean may throw an application exception to report that a debit operation cannot be performed because of an insufficient balance. The Account bean should not use an application exception to report, for example, the failure to obtain a database connection.

341

5/31/00