Thomas,
You said that you shouldn't be able to catch EJBException in the client,
but in my case I have a session bean in one container throwing an
EJBException and a session bean in another container (the caller)
catching that EJBException. Is there anything wrong with that? My
understanding was that this is how you're supposed to handle exceptions
between EJB's.
Why shouldn't a client (whether it's a bean inside a container or a client
outside the container) be able to catch an EJBException? Certainly using
RemoteException to encapsulate any kind of exception is not the way to do
it in EJB 1.1?
Thanks,
Todd
> * From: Cook, Thomas
> * Subject: RE: [jBoss-User] Quieting jboss exceptions in console
> * Date: Thu, 11 Jan 2001 18:19:19 -0800
> Title: RE: [jBoss-User] Quieting jboss exceptions in console
>
> See section 12.3.1 of the spec.
>
> If a bean business method throws a runtime exception, then the container
> must:
>
> 1) Log the exception or error.
> 2) Mark the transaction for rollback.
> 3) Discard instance.
> 4)Throw TransactionRolledBackException to the client.
>
> This is for a bean-managed transaction. If the exception occurs in a
> container managed transaction, then RemoteException is thrown and the
> transaction is rolled back, instead of marking the transaction for
> rollback and throwing TransactionRolledBackException. If there is no
> transaction, then there is no rollback and RemoteException is thrown.
>
> 'Log the exception or error' means that the container logs the exception
> or error so that the system administrator is alerted of the problem.
>
> 'Discard instance' means that the container must not invoke and business
> methods or container callbacks on the instance.
>
> (This is not a direct quote, but it is clearly what it says).
>
> Note that EJBException is a RuntimeException.
>
> Essentially:
>
> 1) It has to be logged to comply with the spec.
> 2) You shouldn't be able to catch EJBException in the client.
>
> HTH
>
> Tom Cook
> Systems Development
> Australian Submarine Corporation
> Mersey Road
> Outer Harbour
>
> +61 8 8348 7645
>
> "From the instant I picked your book up, until the moment I put it down, I
> was convulsed with laughter. I fully intend to read it one day."
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]