Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 5131 invoked from network); 23 Dec 2005 21:32:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Dec 2005 21:32:54 -0000 Received: (qmail 37072 invoked by uid 500); 23 Dec 2005 21:32:52 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 37048 invoked by uid 500); 23 Dec 2005 21:32:52 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 37036 invoked by uid 99); 23 Dec 2005 21:32:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2005 13:32:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [210.86.15.119] (HELO mta208-rme.xtra.co.nz) (210.86.15.119) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2005 13:32:51 -0800 Received: from mta3-rme.xtra.co.nz ([210.86.15.192]) by mta208-rme.xtra.co.nz with ESMTP id <20051223213224.OZWA22847.mta208-rme.xtra.co.nz@mta3-rme.xtra.co.nz>; Sat, 24 Dec 2005 10:32:24 +1300 Received: from [10.1.1.5] ([222.153.66.116]) by mta3-rme.xtra.co.nz with ESMTP id <20051223213224.ECJR14226.mta3-rme.xtra.co.nz@[10.1.1.5]>; Sat, 24 Dec 2005 10:32:24 +1300 Subject: RE: logging, TCCL JCL 1.0.5 alpha From: Simon Kitching Reply-To: skitching@apache.org To: "Voytenko, Dmytro" Cc: Jakarta Commons Developers List In-Reply-To: References: Content-Type: text/plain Date: Sat, 24 Dec 2005 10:32:30 +1300 Message-Id: <1135373550.4239.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Fri, 2005-12-23 at 12:49 -0800, Voytenko, Dmytro wrote: > Hi Simon, > > Thanks for the prompt response. > > I reviewed the code in the trunc and it looked fine. I'm planning to run > it through the unit tests we have. Unfortunetely, some of the problems > are hard to establish in the Junit environment. I'll probably will > deploy the build to our DEV environment next week to see if it will show > any problems. > > >> With the JCL changes currently in SVN, it is believed that JCL will > >> correctly handle most cases without the need to disable TCCL loading. > > Unfortunetely none of the changes here address the specific problem I > described in the previous email. I have a test setup that I could send > to you to help to reproduce the problem. There's really no way to > instantiate an appropriate Log to the shared class (normally in the > shared class-loader) based only on the class's name when this shared > class is invoked from the web-application class (i.e. with TCCL > installed to the webapp classloader). In this case, the first > application that would try to access such a shared class we'll determine > its logging parameters and all subsequent calls from the different > applications will produce logs in the log of the first application. I.e. > the behavior is random in this case. Does this make sense? Do you mean that you have a class in a "shared" location with this? private static Log log = LogFactory.getLog("..."); The use of static fields for loggers in a class that may be shared is a known issue and is described in the FAQ. The answer is to *not* use static fields; make the logger an instance member. Or even better, don't deploy classes in "shared" locations. I personally believe this is not good design; applications in a container are meant to be independent. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org