A couple of people have asked about this, so here is my slant on it..

There are a few places in Hierarchy and Category where statics are used
- in particular the ones below in Category:

protected static int disable = Category.DISABLE_OFF
static boolean emittedNoAppenderWarning = false;
static boolean emittedNoResourceBundleWarning = false;  
static public final Hierarchy defaultHierarchy = new Hierarchy(new 
                                RootCategory(Priority.DEBUG));

These won't be singletons in an appserver when (this is generalised,
but seems about right):
- you use hotdeploy (as a different classloader will be used)
- you are using multiple JVMs (eg. weblogic clustering, or hotdeploy in
some appservers)

If you can live with having multiple hierarchy objects, you are OK.
- as long as all initilisation is done from a properties\XML file which
doesn't change, you should be OK.

There may be seperate issues with file locking etc. when using mutiple
FileAppender looig atthe same file, but I haven't yet looked at this -
anyone else with ideas?

Finally, log4j does break the letter of the EJB spec. in a few other
areas, but major appservers don't seem to worry about this - the spec
is being over restrictive. These are the areas to check with your
appserver:
- no statics that aren't final
- no use of syncronized keyword
- no file I/O

Gareth


------------------------

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/

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

Reply via email to