Chapter 12 of the EJB 1.1 spec talks about exception handling.

<quote>
12.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 application-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.
</quote>
...

----- Original Message ----- 
From: "Peter Routtier-Wone" <[EMAIL PROTECTED]>
To: "JBoss" <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 10:21 PM
Subject: [JBoss-user] Exception methodology with EJBs


> What's the deal with exception handling in EJBs? I don't find anything
> dealing specifically with the subject in any of my books, other than passing
> references to RemoteException, which seems largely concerned with transport
> failures.
> 
> Are EJBs supposed to be able to throw exceptions? If so, are they proxied so
> that the exception is reported in the client? Or are you supposed to always
> handle them within the method in which they occur? I could imagine a
> requirement that EJB methods report exceptions into the log rather than to
> the client, but I'm looking for a definitive comment.



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to