Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 98499 invoked from network); 19 Jan 2002 00:04:10 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Jan 2002 00:04:10 -0000 Received: (qmail 3624 invoked by uid 97); 19 Jan 2002 00:04:08 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 3608 invoked by uid 97); 19 Jan 2002 00:04:07 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 3593 invoked from network); 19 Jan 2002 00:04:05 -0000 Message-ID: From: "Herman, Dave" To: "'Ant Users List'" Subject: RE: ClassLoader: log4j 1.2 in JUnit tests Date: Fri, 18 Jan 2002 17:04:00 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Vlad, Thank you very much for your response. > Thread.currentThread ().setContextClassLoader > (getClass().getClassLoader > ()); I tried this but got linkage errors. I'll have to play around with it some more but I don't think it will work. > >The log4j FAQ says that they're using the Java 2 "preferred > method for > >loading classes" now: > > > >Thread.currentThread().getContextClassLoader().loadClass() > > This statement is quite wrong. Thread context loaders were > introduced to > make standard extensions like JNDI work [in JDK 1.2.x], where > that was the > only possible solution. In general, business code should > continue to use > the current classloader (getClass().getClassLoader()). This makes me think that perhaps the log4j behavior (which is new in log4j 1.2) might be incorrect. I've posted to the log4j mailing list as well. Thanks again! Dave -- To unsubscribe, e-mail: For additional commands, e-mail: