Title: transient Throwable object in spi.ThrowableInformation

Hi,

I currently have a set of servers that send out log messages over JMS, using the JMSAppender.
I have a Swing based Log4J Log Message Viewer which takes the messages published to the logging topic, and
displays the relevant details. 

I noticed that when a Throwable object is included in the Log Message, a ThrowableInformation object is created, but
when deserialised, the Throwable object is null.  After investigation, I found that the Throwable object under the class

org.apache.log4j.spi.ThrowableInformation had declared the Throwable object as Transient.  This would mean that
it would not be serialised.  I removed the transient call, and the Throwable is now serialised and sent over JMS.

Is there a particular reason why it was declared transient?  Was it to keep the object size down ( a consideration when
serialising over a network connection using JMS).  I can still obtain the String representation of the stack trace by using the

API method getThrowableStrRep() in org.apache.log4j.spi.LoggingEvent.

I have included the updated org.apache.log4j.spi.ThrowableInformation class.

Best regards,
Peter

 

********************************************************************

This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************

Attachment: ThrowableInformation.java
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to