Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 28668 invoked from network); 15 Nov 2004 03:49:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Nov 2004 03:49:50 -0000 Received: (qmail 9136 invoked by uid 500); 15 Nov 2004 03:49:47 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 8943 invoked by uid 500); 15 Nov 2004 03:49:46 -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 8929 invoked by uid 99); 15 Nov 2004 03:49:46 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [66.250.40.202] (HELO saturn.opentools.org) (66.250.40.202) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 14 Nov 2004 19:49:43 -0800 Received: by saturn.opentools.org (Postfix, from userid 500) id 679883D0F; Sun, 14 Nov 2004 22:56:06 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by saturn.opentools.org (Postfix) with ESMTP id 6184EF5DD for ; Sun, 14 Nov 2004 22:56:06 -0500 (EST) Date: Sun, 14 Nov 2004 22:56:06 -0500 (EST) From: Aaron Mulder X-X-Sender: ammulder@saturn.opentools.org To: dev@geronimo.apache.org Subject: Can GBean get its configuration ClassLoader? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I wonder if there's a way for a GBean to get the ClassLoader for the configuration it's a part of -- in other words, the GBeanMBean.getClassLoader(), which includes the dependencies in the deployment plan, etc. I want the SQLSecurityRealm to be able to load a driver class. However, the SQLSecurityRealm itself was loaded in the Server configuration, and the JDBC driver is included as a dependency of the service deployment plan that declares the realm (but gets the SQLSecurityRealm class from its parent). So the SQLSecurityRealm can't see the driver classes in a child of it's own CL, and the ThreadContextClassLoader does not appear to be set to something useful when doStart is called on the GBean. I basically want to be able to call some static method to get the GBeanMBean for the current GBean implementation class, becasue then I could get the ClassLoader from it. But any other suggestions would be appreciated too. :) Thanks, Aaron