My aim isn't to serialize the NDC itself, but the NDC stack (obtained by
calling NDC.cloneStack()).  The NDC Stack contains DiagnosticContext
objects.  In the scenario you mentioned, I would have to extract the Stack
from the NDC, then recursively get the DiagnosticContexts from the Stack,
convert the DiagnosticContexts to Strings and then add the strings to a
Collection for transport.  This is not an optimal solution because of the
overhead involved in converting to Strings.  Furthermore, my intent is to
inherit the Stack into another NDC after transport, and inheriting a Stack
of Strings instead of DiagnosticContext objects will likely cause problems.


The DiagnosticContext inner class is a pretty simple class.  I don't see any
reason why it shouldn't be serializable.

-----Original Message-----
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 4:58 PM
To: Log4J Users List
Subject: Re: NDC.DiagnosticContext bug ?



We do not serialize the NDC but it's string form. Isn't the string form
enough for your needs?

At 16:37 25.03.2002 -0500, you wrote:
>Hello All,
>
>NDC (Nested Diagnostic Context) is a serializable class, but it's inner
>class DiagnosticContext does not implement Serializable.  I am attempting
to
>serialize the NDC Stack object (which contains DiagnosticContext objects)
>for transport and exceptions are being thrown because DiagnosticContext is
>not serializable.
>
>I think this is a bug.  Please confirm and I'll submit a bug report.
>
>Regards..
>
>
>***************************************************************
>Confidentiality note: This e-mail contains information from the
>GFI Group Inc. and/or its affiliates, including GFInet inc.,
>that is confidential and/or legally privileged.   This
>information is intended only for the use of the individual or
>entity named on this e-mail.  This e-mail and its content may
>not be reproduced or retransmitted without the express written
>permission of The GFI Group.
>***************************************************************
>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
Ceki

My link of the month: http://java.sun.com/aboutJava/standardization/


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


***************************************************************
Confidentiality note: This e-mail contains information from the 
GFI Group Inc. and/or its affiliates, including GFInet inc., 
that is confidential and/or legally privileged.   This 
information is intended only for the use of the individual or 
entity named on this e-mail.  This e-mail and its content may 
not be reproduced or retransmitted without the express written 
permission of The GFI Group.
***************************************************************


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

Reply via email to