You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Anthony Baker <An...@centerspan.com> on 2002/04/10 01:02:59 UTC

Category is not Serializable

Hi all,

I'm working on a webapp using weblogic 6.1 and log4j.  We've discovered that
in development mode weblogic has a quirk whereby it tries to serialize the
objects contained within the ServletContext.  It does this to try to
preserve the context across an application redeployment (modification of a
jsp or class file).

One of our objects stored in the ServletContext has a category reference.
Something like:

public class MyClass
{
  private static final Category cat = Category.getInstance(MyClass.class);

  ...
}

Unfortunately when weblogic attempts to serialize the Category referenced in
MyClass I get a NotSerializableException.  Has anyone else encountered a
similar issue or have a good solution?  If I just make the Category
transient then I'll start getting null pointers when the class is
deserialized...

Also, a BEA engineer recommended that we not use log4j due to thread
synchronization blocking under high load.  I'm a bit suspicious that the
issues he encountered were more likely due to a misconfiguration (ie turning
debug on in production) than a log4j scaling problem.  Has anyone used log4j
on high-volume web sites?

Thanks for the info,
Anthony

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>