Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 58750 invoked from network); 1 Feb 2005 19:41:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Feb 2005 19:41:17 -0000 Received: (qmail 65558 invoked by uid 500); 1 Feb 2005 19:41:14 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 65283 invoked by uid 500); 1 Feb 2005 19:41:13 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@geronimo.apache.org Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 65270 invoked by uid 99); 1 Feb 2005 19:41:13 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from adsl-209-233-18-245.dsl.snfc21.pacbell.net (HELO buttons.boynes.com) (209.233.18.245) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Feb 2005 11:41:12 -0800 Received: from [192.168.17.122] (unknown [69.111.157.225]) by buttons.boynes.com (Postfix) with ESMTP id AB05D10883 for ; Tue, 1 Feb 2005 11:41:09 -0800 (PST) Message-ID: <41FFDB4D.2040807@apache.org> Date: Tue, 01 Feb 2005 11:41:01 -0800 From: Jeremy Boynes User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@geronimo.apache.org Subject: Re: svn commit: r149431 - in geronimo/trunk/modules: core/src/java/org/apache/geronimo/pool/ naming/src/java/org/apache/geronimo/naming/java/ timer/src/java/org/apache/geronimo/timer/jdbc/ timer/src/test/org/apache/geronimo/timer/ References: <20050201190117.35730.qmail@minotaur.apache.org> <41FFD4C8.7040601@apache.org> <54586AE4-7486-11D9-9E3B-000D93361CAA@gluecode.com> In-Reply-To: <54586AE4-7486-11D9-9E3B-000D93361CAA@gluecode.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N David Jencks wrote: > > On Feb 1, 2005, at 11:13 AM, Jeremy Boynes wrote: > >> Shouldn't the classloader come from the command rather than the pool? > > > Well, I figure that if the command needs a particular classloader it > can set it itself. It will have to do that on each thread use. This > provides all threads from the poo with a useful generic classloader > rather than the App classloader that is there if you do nothing. This > happens once per thread creation, and is sufficient to get jndi to work. > Using the GBean's classloader makes sense as a default for the pool - it means that, by default, commands would run with TCCL set to that supplied (which is that of the Configuration containing the GBean instance). For any component, the TCCL should be that of the module that contains it (typically EAR but possibly that of a nested WAR). Things that are using the pool should not assume that the default classloader for the pool will be the correct one and should always have the command explictly set the TCCL (or do it downstream somewhere e.g. in an EJB Interceptor or in the web context handler). Stuff might work simply because the pool and, for example, jndi are located in the same Configuration. However, I do not believe this is true in the general case. -- Jeremy