users@glassfish.java.net

RE: JEE5 exception handling best practices

From: Markus Karg <karg_at_quipsy.de>
Date: Tue, 2 Dec 2008 18:07:52 +0100

The Java Platform's standardized way of logging is using the java.util.logging API inside of your application. All records created this way can be handled by logging handlers. The default logging handler in GlassFish is its own one (the one that writes the server.log file). You are free to add your own logging handlers (e. g. a handler that will forward to your preferred logging system). That way, everything that goes into server.log will also be found in your "own" files.

Regards
Markus

> -----Original Message-----
> From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
> Sent: Dienstag, 2. Dezember 2008 17:44
> To: users_at_glassfish.dev.java.net
> Subject: JEE5 exception handling best practices
>
> Hello,
>
> Is there some documentation about exception handling best practices?
> For example how should I handle uncaught exceptions in case of EJBs
> (eg. logging them).
>
> Some more concrete info: I use an slf4j+logback based logger in my
> application. When an EJB throws an exception (like "throw new
> RuntimeException();"), this exception is not logged to the logback log
> file but to the server log as a javax.ejb.EJBException.
>
> What I want is to log some useful info to the logback-based
> "application log" as well.
>
> Do you have some suggestions?
>
> Thanks:
> Norbi
> [Message sent by forum member 'snorbicet' (snorbicet)]
>
> http://forums.java.net/jive/thread.jspa?messageID=319593
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net