Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 2406 invoked from network); 24 Nov 2002 10:17:33 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 24 Nov 2002 10:17:33 -0000 Received: (qmail 15557 invoked by uid 97); 24 Nov 2002 10:18:45 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 15541 invoked by uid 97); 24 Nov 2002 10:18:45 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 15529 invoked by uid 98); 24 Nov 2002 10:18:44 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: Sun, 24 Nov 2002 05:17:40 -0500 (EST) From: Henri Yandell X-X-Sender: To: Jakarta Commons Developers List Subject: Re: [lang] reflect - Class.forName In-Reply-To: <030601c2939f$f65899c0$6c2b6b3e@acure.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sun, 24 Nov 2002, Max Rydahl Andersen wrote: > If the container is written "correctly" just having more or less isolated > the webapp's classloading from > the containers own classloading then this would never be an problem (but > that is not the case > for many containers out there - and the "trick" of adding some jars to the > "global" classpath of an container > is widely used as I understand it ) Out of interest, do you mean adding this to the actual shellscript's classpath, or just placing things in the common/lib directory? [in say tomcat]. If it's the former, then they [and I, yeah I've done it] deserve what they get. > > Because first it would throw the class cast, and then forName would fail? > > The utility should not throw class cast exceptions only classnotfound. > The class cast situation presented by Jousaz is something I'll have to think > about some more - > i'll talk with my local classloading expert tomorrow, and get back to you :) > > p.s. another note on James code suggestion is that it does not check if the > current classloader is null - it can be, thus > James code can in some cases throw a NPE! Cool. Anyone feel like changing/submitting a patch? :) I'll add it to the STATUS.html for the moment. Hen -- To unsubscribe, e-mail: For additional commands, e-mail: