> EJBException is a subclass of RuntimeException, i.e. you do not have to
> declare it in your throws clause. You shouldn't even. EJBException is used
> by the bean to notify the container of strange behaviour such as
> NullPointerExceptions and such. In the latest spec the bean is even not
> supposed to throw a RemoteException, other than one that was called by
> something that the bean itself has called (i.e. A calls B, B
> throws RE, then A is allowed to rethrow the RE).
BTW:
Whats a little confusing is what i see in an example in Roman's ejb
book(p216->). He throws a RemoteException in ejbstore,load and remove but
not i ejbcreate (which throws CreateException).
I would assume that a failed sql operation would be more like an application
exception(the reason could be a error with a parameter value) and, as the
spec. states, a system level exception(runtimeex & remoteex.) should be
thrown in cases where a connection cant be obtained etc...(f.ex so the
adm.can see)
I'm not sure why he is not consistent on that...maybe to save coding lines.
> BTW: Whats an unchecked exception?
>
> Subclass of java.lang.RuntimeException. Does not have to be declare in
> throws clause.
*blush* Of course, amazing what you forget just because you haven't used it
for a year or so :-)
/Jon
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]