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."

        - Groucho Marx

    -----Original Message-----
    From:   Todd Huss [SMTP:[EMAIL PROTECTED]]
    Sent:   Friday, January 12, 2001 9:19 AM
    To:     [EMAIL PROTECTED]
    Subject:        [jBoss-User] Quieting jboss exceptions in console

    Whenever one of our beans throws an EJBException (which is obviously a
    valid exception to throw from a bean), even though the caller catches the
    EJBException, it still gets printed out on the console that jboss is
    running in. Is there a flag we can set so that JBoss doesn't print
    these type of exceptions that are caught and handled correctly?

    Thanks,
    Todd



    --
    --------------------------------------------------------------
    To subscribe:        [EMAIL PROTECTED]
    To unsubscribe:      [EMAIL PROTECTED]
    List Help?:          [EMAIL PROTECTED]

Reply via email to