Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 37401 invoked by uid 500); 4 Apr 2001 12:47:06 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 37391 invoked from network); 4 Apr 2001 12:47:06 -0000 Message-ID: <3ACB188A.6C623EE5@vertech.no> Date: Wed, 04 Apr 2001 14:50:18 +0200 From: Torgeir Veimo Reply-To: torgeir.veimo@ecomda.com Organization: Ecomda GmbH X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: "Craig R. McClanahan" , "tomcat-dev@jakarta.apache.org" Subject: Re: context factories References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N "Craig R. McClanahan" wrote: > > If you don't mind specifying the resource factory class yourself, you > don't need to modify any code at all -- just configure it in server.xml > like this: > > > ... > type="com.mycompany.ContextPool"/> > > > factory > com.mycompany.ContextPoolFactory > > namevalue > ... > > ... > > > where "com.mycompany.ContextPoolFactory" is a class that implements > javax.naming.spi.ObjectFactory. You can use the existing factories as > examples of how such factories can access the declared resource parameters > and use them to configure the object itself. Ok, I've configured this, and all I get back from the initCtx.lookup() method is a ResourceRef, not a ContextPool. I have found the reason for this to be that the "instanceof" check in the getObjectInstance() method in org.apache.naming.factory.ResourceFactory fails, and this must be due to classloader issues. What are the magic spells I need to cast to get classloading right? Can I put the ContextPoolFactory in an independent jar file in lib, common/lib or server/lib? -- - Torgeir