Hi Dan,

Wednesday, September 27, 2000, 9:35:57 PM, Dan OConnor wrote:

DO> On 27 Sep 00, at 10:49, Rickard Oberg wrote:

>> Hi!
>> 
>> > I have noticed that jBoss doesn't log application exceptions, but send
>> > them to client. I some places such logging is commented out and marked
>> > as "debug". I think it would be more convenient to jBoss users
>> > (at least for me and my colleagues) to see the full stack trace on
>> > server in addition to the short exception message only that is
>> > available on client (since the application exception is wrapped by
>> > some RemoteException).
>> > Any other opinions?
>> 
>> App exceptions should not be logged on server. It should be possible to
>> propagate them to client without loosing too much information.
>> 
>> OTOH, it should perhaps be possible to have a "debug" flag in container that
>> allows app exceptions to be printed there as "Warning". But for production
>> IMHO this should be turned off since many app exceptions are just "normal
>> operation".

DO> +1.  Application exceptions should not be logged in a production 
DO> system.

DO> On the other hand, system exceptions should always be logged.  
DO> They indicate abnormal operation, and anyway the specification 
DO> requires that they be logged.
Correct, 17.2.2 runs:
"The Container catches a non-application exception, logs it (which can
result in alerting the System Administrator), and, unless the bean is
a message-driven bean, throws the java.rmi.RemoteException
(or subclass thereof) to the client."
If I understand correctly,
"non-application exception" <=> instanceof RuntimeException

DO> If there is a specific logging requirement for your application, you 
DO> probably want to use a portable solution anyway--such as an 
DO> actual logging or management framework (JMX, perhaps?).  jBoss-
DO> specific behavior with regard to application exceptions would not be 
DO> portable, and so is probably not the right choice for your application.
There is the very simple portable solution:-)

bean_method() {
    try {
    } catch(Exception ex) {
        ex.printStackTrace();
        throw ex;
    }
}

But the ability to turn on the application exceptions logging for
debugging purposes (without changing the code) is appreciated.

Regards,
 Oleg        




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to