Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 70068 invoked from network); 21 Jan 2010 04:15:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2010 04:15:06 -0000 Received: (qmail 80898 invoked by uid 500); 21 Jan 2010 04:15:06 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 80729 invoked by uid 500); 21 Jan 2010 04:15:06 -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 List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 80721 invoked by uid 99); 21 Jan 2010 04:15:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2010 04:15:05 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jgawor@gmail.com designates 209.85.222.176 as permitted sender) Received: from [209.85.222.176] (HELO mail-pz0-f176.google.com) (209.85.222.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jan 2010 04:14:56 +0000 Received: by pzk6 with SMTP id 6so454065pzk.3 for ; Wed, 20 Jan 2010 20:14:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=bYPBeV2bK3ByPGYDtlDKD5uKtSwbdK1syxVlIOZz8l8=; b=RdiB5nhc3nSl07PqgPd8j2c48WCjY72gugJr2dYC738tsyINbZ7UM/jEljneUyMXPV +dzvbcFJgWTdu29KyiusvvRYMhoX74UEG3dYfG27Gg8mkrjlvPZ+tykG+Sc3/Bk2g/q4 akYqP9/4vx6rDNoddWPX2c4anG97pTiUASAHg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=SHUjS5CKwCIaPE16CyaCVJRMYdFc0Td1JQNadjSw4FLaMcRMQL451ePS+sJhpVOW4q Kvu5jE9Xx9Vp88zQRafXjN/bojvBnGXDN8PdDatMnScV+mjGZOpz8o6Fh1S84StobvXn XxwsWTTMBksxxNmZm3WDV0ZYKpd2yBk9K26Co= MIME-Version: 1.0 Received: by 10.114.237.32 with SMTP id k32mr658729wah.55.1264047275467; Wed, 20 Jan 2010 20:14:35 -0800 (PST) In-Reply-To: References: <5eb405c71001201138w467b74d8q4b0ad38794f7f8ba@mail.gmail.com> Date: Wed, 20 Jan 2010 23:14:35 -0500 Message-ID: <5eb405c71001202014r61c294a6oe4eb889554dc97cf@mail.gmail.com> Subject: Re: rfc66 fun From: Jarek Gawor To: dev@geronimo.apache.org Content-Type: multipart/mixed; boundary=0016e64b95d2d56332047da4f07c --0016e64b95d2d56332047da4f07c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable David, This patch assumes that the entire gbean data can be loaded either via classSource bundle or configuration bundle. But that's not necessarily true. For example, web module builder setups a gbean for the web app context. That gbean has classSource set to tomcat or jetty configuration. One of the attributes of that gbean is a Map object that represents the jndi context for the application. During deployment different naming builders put objects into that map. These naming builders have totally separate classloaders (from web module builder) so the objects within the Map will be of different classloaders. And that means that during deserialization we can't read in the entire Map object using just the jetty or tomcat configuration. My proposed patch is attached. My solution does serialize bundle symbolic names and use PackageAdmin to resolve them but it would be very easy to switch it to another method of resolving the symbolic names. Also, maybe this entire classSource problem goes away if we can use a ClassLoader that delegates to a bunch of Bundles. Jarek On Wed, Jan 20, 2010 at 5:44 PM, David Jencks wrot= e: > > On Jan 20, 2010, at 11:38 AM, Jarek Gawor wrote: > >> Hey, >> >> For last few days I've been looking into getting the rfc66 extender >> going in Geronimo but I ran into a problem. As previously mentioned on >> this list, the idea for the extender was to call the Tomcat/Jetty >> ModuleBuilders with a bundle as an input and once the deployment >> process was done start the generated configuration. All without >> creating any additional temporary or permanent bundles. >> >> Because we don't have a single classloader that can load all the >> gbeans within the configuration, David Jencks added a special >> "classSource" attribute to GBeanData which can be used to figure out >> the right Bundle to load the gbean class. Now, since we use Java >> serialization to save and load gbeans, we actually need to set the >> right classloader when we deserialize the gbean. That is, during >> deserialization as soon as we read the "classSource" we need to lookup >> and set the right classloader and then read the rest of the gbean >> data. This should (and seems to) work when all the attributes of the >> gbean are accessible from the same classloader. But what about if the >> gbean has some attribute with some values from different classloaders? >> For example, the Map object we build for jndi context can contain >> objects from different classloaders. I'm not exactly sure what to do >> about it. Although maybe having a custom ObjectOutputStream with >> annotateClass() method that saves "classSource" type of info for each >> unique class might work. Ideas? >> >> Also, I'm dealing with lots of classloader issues since there is no >> single classloader that load all the gbean classes and module classes. >> A lot of Geronimo and other code assumes a single classloader and >> resolving these problems is time consuming and not very fun (although >> probably good in long term). So I'm wondering if we can still somehow >> assemble a single classloader in the extender. For example, the >> http://www.osgi.org/blog/2008/08/classy-solutions-to-tricky-proxies.html >> post shows a classloader that delegates a number of different bundles. >> Maybe we could use that in Geronimo especially since we can figure out >> the bundles needed from the configuration environment information. >> >> Thoughts? >> >> Jarek > > I think that we are either going to load the gbean from the classSource > bundle or from the configuration's bundle. =A0Maybe sometimes we need to = mix > them... not sure. =A0Anyway I think we can modify the ObjectInputStreamEx= t to > look in the classSource's bundle or in the bundle as in the attached patc= h. > =A0I chatted with Jarek a bit on irc and I think he is thinking of writin= g the > bundle symbolic name into the output stream and using package admin to lo= ok > it up again. =A0I'm a little worried with this approach that we may be mi= xing > too much osgi into geronimo. =A0If we had a blueprint namespace handler I > think we'd be able to load the classes in the namespace handler rather th= an > needing to rely on something that is really like requireBundle. =A0So, my > approach is somewhat similar but uses geronimo techniques rather than osg= i > techniques. =A0I think this might be appropriate since we are in fact loa= ding > gbeans. > > my patch compiles but I haven't tried it yet. > > thoughts? > > david jencks > > Index: > src/test/java/org/apache/geronimo/kernel/mock/MockConfigurationManager.ja= va > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- > src/test/java/org/apache/geronimo/kernel/mock/MockConfigurationManager.ja= va > (revision 901109) > +++ > src/test/java/org/apache/geronimo/kernel/mock/MockConfigurationManager.ja= va > (working copy) > @@ -122,7 +122,7 @@ > =A0 =A0 public LifecycleResults loadConfiguration(ConfigurationData > configurationData, LifecycleMonitor monitor) throws NoSuchConfigException= , > LifecycleException { > =A0 =A0 =A0 =A0 try { > =A0 =A0 =A0 =A0 =A0 =A0 Artifact configId =3D > configurationData.getEnvironment().getConfigId(); > - =A0 =A0 =A0 =A0 =A0 =A0Configuration configuration =3D new > Configuration(configurationData, new DependencyNode(configId, null, null)= , > null, null, null); > + =A0 =A0 =A0 =A0 =A0 =A0Configuration configuration =3D new > Configuration(configurationData, new DependencyNode(configId, null, null)= , > null, null, null, null); > =A0 =A0 =A0 =A0 =A0 =A0 configurations.put(configId, configuration); > =A0 =A0 =A0 =A0 } catch (InvalidConfigException e) { > > Index: > src/test/java/org/apache/geronimo/kernel/config/ConfigurationUtilTest.jav= a > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- > src/test/java/org/apache/geronimo/kernel/config/ConfigurationUtilTest.jav= a > =A0(revision 901109) > +++ > src/test/java/org/apache/geronimo/kernel/config/ConfigurationUtilTest.jav= a > =A0(working copy) > @@ -74,10 +74,10 @@ > > =A0 =A0 private void assertEquals(ConfigurationData data, ConfigurationDa= ta > configurationData) throws InvalidConfigException { > =A0 =A0 =A0 =A0 List gbeans; > - =A0 =A0 =A0 =A0gbeans =3D data.getGBeans(bundleContext.getBundle()); > + =A0 =A0 =A0 =A0gbeans =3D data.getGBeans(bundleContext.getBundle(), nul= l); > =A0 =A0 =A0 =A0 assertEquals(configurationData.getId(), data.getId()); > =A0 =A0 =A0 =A0 ConfigurationData data3 =3D (ConfigurationData) > data.getChildConfigurations().get("testmodule"); > - =A0 =A0 =A0 =A0gbeans =3D data3.getGBeans(bundleContext.getBundle()); > + =A0 =A0 =A0 =A0gbeans =3D data3.getGBeans(bundleContext.getBundle(), nu= ll); > =A0 =A0 =A0 =A0 assertEquals(new QName("namespaceURI", "localPart"), > ((GBeanData)gbeans.get(0)).getAttribute("someObject")); > =A0 =A0 } > > Index: src/main/java/org/apache/geronimo/kernel/ObjectInputStreamExt.java > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src/main/java/org/apache/geronimo/kernel/ObjectInputStreamExt.java > =A0(revision 901109) > +++ src/main/java/org/apache/geronimo/kernel/ObjectInputStreamExt.java > =A0(working copy) > @@ -22,6 +22,9 @@ > =A0import java.io.ObjectStreamClass; > =A0import java.lang.reflect.Proxy; > > +import org.apache.geronimo.kernel.config.Configuration; > +import org.apache.geronimo.kernel.config.InvalidConfigException; > +import org.apache.geronimo.kernel.repository.Artifact; > =A0import org.osgi.framework.Bundle; > > =A0/** > @@ -29,19 +32,41 @@ > =A0*/ > =A0public class ObjectInputStreamExt extends ObjectInputStream { > > - =A0 =A0private Bundle bundle; > + =A0 =A0private final Bundle bundle; > + =A0 =A0private final Kernel kernel; > + =A0 =A0private Bundle sourceBundle; > > - =A0 =A0public ObjectInputStreamExt(InputStream in, Bundle bundle) throw= s > IOException { > + =A0 =A0public ObjectInputStreamExt(InputStream in, Bundle bundle, Kerne= l > kernel) throws IOException { > =A0 =A0 =A0 =A0 super(in); > =A0 =A0 =A0 =A0 this.bundle =3D bundle; > + =A0 =A0 =A0 =A0this.kernel =3D kernel; > =A0 =A0 } > > + =A0 =A0public void setClassSource(Artifact classSource) throws > ClassNotFoundException { > + =A0 =A0 =A0 =A0if (classSource !=3D null) { > + =A0 =A0 =A0 =A0 =A0 =A0try { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Configuration configuration =3D (Configu= ration) > kernel.getGBean(Configuration.getConfigurationAbstractName(classSource)); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sourceBundle =3D configuration.getBundle= (); > + =A0 =A0 =A0 =A0 =A0 =A0} catch (GBeanNotFoundException e) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0throw new ClassNotFoundException("Could = not locate > Configuration to deserialize", e); > + =A0 =A0 =A0 =A0 =A0 =A0} catch (InvalidConfigException e) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0throw new ClassNotFoundException("Could = not identify > Configuration to deserialize", e); > + =A0 =A0 =A0 =A0 =A0 =A0} > + =A0 =A0 =A0 =A0} else { > + =A0 =A0 =A0 =A0 =A0 =A0sourceBundle =3D null; > + =A0 =A0 =A0 =A0} > + =A0 =A0} > + > =A0 =A0 protected Class resolveClass(ObjectStreamClass classDesc) throws > IOException, ClassNotFoundException { > + =A0 =A0 =A0 =A0if (sourceBundle !=3D null) { > + =A0 =A0 =A0 =A0 =A0 =A0return ClassLoading.loadClass(classDesc.getName(= ), bundle); > + =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 return ClassLoading.loadClass(classDesc.getName(), bundle= ); > =A0 =A0 } > > =A0//see > http://www.osgi.org/blog/2008/08/classy-solutions-to-tricky-proxies.html > =A0 =A0 //currently broken > + > =A0 =A0 protected Class resolveProxyClass(String[] interfaces) throws > IOException, ClassNotFoundException { > =A0 =A0 =A0 =A0 Class[] cinterfaces =3D new Class[interfaces.length]; > =A0 =A0 =A0 =A0 for (int i =3D 0; i < interfaces.length; i++) > Index: > src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.jav= a > =A0 =A0(revision 901109) > +++ src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.jav= a > =A0 =A0(working copy) > @@ -28,6 +28,7 @@ > > =A0import org.apache.geronimo.gbean.GBeanData; > =A0import org.apache.geronimo.gbean.GBeanInfo; > +import org.apache.geronimo.kernel.Kernel; > =A0import org.apache.geronimo.kernel.Naming; > =A0import org.apache.geronimo.kernel.repository.Artifact; > =A0import org.apache.geronimo.kernel.repository.Environment; > @@ -179,9 +180,9 @@ > =A0 =A0 =A0 =A0 return environment.getManifest(); > =A0 =A0 } > > - =A0 =A0public List getGBeans(Bundle bundle) throws > InvalidConfigException { > + =A0 =A0public List getGBeans(Bundle bundle, Kernel kernel) t= hrows > InvalidConfigException { > =A0 =A0 =A0 =A0 if (bundle =3D=3D null) throw new NullPointerException("b= undle is > null"); > - =A0 =A0 =A0 =A0List gbeans =3D gbeanState.getGBeans(bundle); > + =A0 =A0 =A0 =A0List gbeans =3D gbeanState.getGBeans(bundle, = kernel); > =A0 =A0 =A0 =A0 if (null =3D=3D configurationDataTransformer) { > =A0 =A0 =A0 =A0 =A0 =A0 return gbeans; > =A0 =A0 =A0 =A0 } > Index: > src/main/java/org/apache/geronimo/kernel/config/xstream/XStreamGBeanState= .java > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- > src/main/java/org/apache/geronimo/kernel/config/xstream/XStreamGBeanState= .java > =A0 =A0 =A0(revision 901109) > +++ > src/main/java/org/apache/geronimo/kernel/config/xstream/XStreamGBeanState= .java > =A0 =A0 =A0(working copy) > @@ -32,6 +32,7 @@ > =A0import org.apache.geronimo.gbean.AbstractName; > =A0import org.apache.geronimo.gbean.GBeanData; > =A0import org.apache.geronimo.gbean.GBeanInfo; > +import org.apache.geronimo.kernel.Kernel; > =A0import org.apache.geronimo.kernel.Naming; > =A0import org.apache.geronimo.kernel.util.XmlUtil; > =A0import org.apache.geronimo.kernel.config.InvalidConfigException; > @@ -73,7 +74,7 @@ > =A0 =A0 =A0 =A0 return gbeanState; > =A0 =A0 } > > - =A0 =A0public List getGBeans(Bundle bundle) throws > InvalidConfigException { > + =A0 =A0public List getGBeans(Bundle bundle, Kernel kernel) t= hrows > InvalidConfigException { > =A0 =A0 =A0 =A0 if (gbeanState =3D=3D null) { > =A0 =A0 =A0 =A0 =A0 =A0 return Collections.unmodifiableList(gbeans); > =A0 =A0 =A0 =A0 } > Index: src/main/java/org/apache/geronimo/kernel/config/Configuration.java > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src/main/java/org/apache/geronimo/kernel/config/Configuration.java > =A0(revision 901109) > +++ src/main/java/org/apache/geronimo/kernel/config/Configuration.java > =A0(working copy) > @@ -38,8 +38,11 @@ > =A0import org.apache.geronimo.gbean.ReferencePatterns; > =A0import org.apache.geronimo.gbean.annotation.GBean; > =A0import org.apache.geronimo.gbean.annotation.ParamAttribute; > +import org.apache.geronimo.gbean.annotation.ParamSpecial; > +import org.apache.geronimo.gbean.annotation.SpecialAttributeType; > =A0import org.apache.geronimo.kernel.GBeanAlreadyExistsException; > =A0import org.apache.geronimo.kernel.GBeanNotFoundException; > +import org.apache.geronimo.kernel.Kernel; > =A0import org.apache.geronimo.kernel.Naming; > =A0import org.apache.geronimo.kernel.repository.Artifact; > =A0import org.apache.geronimo.kernel.repository.Environment; > @@ -86,6 +89,7 @@ > =A0 =A0 =A0* Converts an Artifact to an AbstractName for a configuration.= =A0Does > not > =A0 =A0 =A0* validate that this is a reasonable or resolved Artifact, or = that it > =A0 =A0 =A0* corresponds to an actual Configuration. > + =A0 =A0 * > =A0 =A0 =A0* @param configId id for configuration > =A0 =A0 =A0* @return abstract name constructed from supplied id > =A0 =A0 =A0* @throws InvalidConfigException if the ObjectName could not b= e > constructed > @@ -167,23 +171,24 @@ > > =A0 =A0 /** > =A0 =A0 =A0* Creates a configuration. > + =A0 =A0 *

> + =A0 =A0 * // =A0 =A0 * @param classLoaderHolder Classloaders for this > configuration > =A0 =A0 =A0* > -// =A0 =A0 * @param classLoaderHolder Classloaders for this configuratio= n > - =A0 =A0 * @param configurationData the module type, environment and cla= sspath > of the configuration > - =A0 =A0 * @param dependencyNode Class and Service parent ids > - =A0 =A0 * @param allServiceParents ordered list of transitive closure o= f > service parents for gbean searches > - =A0 =A0 * @param attributeStore Customization info for gbeans > + =A0 =A0 * @param configurationData =A0 =A0 the module type, environment= and > classpath of the configuration > + =A0 =A0 * @param dependencyNode =A0 =A0 =A0 =A0Class and Service parent= ids > + =A0 =A0 * @param allServiceParents =A0 =A0 ordered list of transitive c= losure of > service parents for gbean searches > + =A0 =A0 * @param attributeStore =A0 =A0 =A0 =A0Customization info for g= beans > =A0 =A0 =A0* @param configurationResolver (there should be a better way) = Where > this configuration is actually located in file system > + =A0 =A0 * @param kernel > =A0 =A0 =A0* @throws InvalidConfigException if this configuration turns o= ut to > have a problem. > =A0 =A0 =A0*/ > =A0 =A0 public Configuration( > -// =A0 =A0 =A0 =A0 =A0 =A0@ParamAttribute(name =3D "classLoaderHolder") = ClassLoaderHolder > classLoaderHolder, > =A0 =A0 =A0 =A0 =A0 =A0 @ParamAttribute(name =3D "configurationData") Con= figurationData > configurationData, > =A0 =A0 =A0 =A0 =A0 =A0 @ParamAttribute(name =3D "dependencyNode") Depend= encyNode > dependencyNode, > =A0 =A0 =A0 =A0 =A0 =A0 @ParamAttribute(name =3D "allServiceParents") Lis= t > allServiceParents, > =A0 =A0 =A0 =A0 =A0 =A0 @ParamAttribute(name =3D "attributeStore") > ManageableAttributeStore attributeStore, > - =A0 =A0 =A0 =A0 =A0 =A0@ParamAttribute(name =3D "configurationResolver"= ) > ConfigurationResolver configurationResolver) throws InvalidConfigExceptio= n { > -// =A0 =A0 =A0 =A0if (classLoaderHolder =3D=3D null) throw new > NullPointerException("classLoaders are null"); > + =A0 =A0 =A0 =A0 =A0 =A0@ParamAttribute(name =3D "configurationResolver"= ) > ConfigurationResolver configurationResolver, > + =A0 =A0 =A0 =A0 =A0 =A0@ParamSpecial(type =3D SpecialAttributeType.kern= el) Kernel > kernel) throws InvalidConfigException { > =A0 =A0 =A0 =A0 if (configurationData =3D=3D null) throw new > NullPointerException("configurationData is null"); > > =A0// =A0 =A0 =A0 =A0this.classLoaderHolder =3D classLoaderHolder; > @@ -199,7 +204,7 @@ > > =A0 =A0 =A0 =A0 =A0 =A0 // Deserialize the GBeans in the configurationDat= a > =A0 =A0 =A0 =A0 =A0 =A0 Bundle bundle =3D > configurationData.getBundleContext().getBundle(); > - =A0 =A0 =A0 =A0 =A0 =A0Collection gbeans =3D > configurationData.getGBeans(bundle); > + =A0 =A0 =A0 =A0 =A0 =A0Collection gbeans =3D > configurationData.getGBeans(bundle, kernel); > =A0 =A0 =A0 =A0 =A0 =A0 if (attributeStore !=3D null) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gbeans =3D > attributeStore.applyOverrides(dependencyNode.getId(), gbeans, bundle); > =A0 =A0 =A0 =A0 =A0 =A0 } > @@ -221,6 +226,7 @@ > > =A0 =A0 /** > =A0 =A0 =A0* Add a contained configuration, such as for a war inside an e= ar > + =A0 =A0 * > =A0 =A0 =A0* @param child contained configuration > =A0 =A0 =A0*/ > =A0 =A0 void addChild(Configuration child) { > @@ -311,6 +317,7 @@ > > =A0 =A0 /** > =A0 =A0 =A0* Provide a way to locate where this configuration is for web = apps and > persistence units > + =A0 =A0 * > =A0 =A0 =A0* @return the ConfigurationResolver for this configuration > =A0 =A0 =A0*/ > =A0 =A0 public ConfigurationResolver getConfigurationResolver() { > Index: src/main/java/org/apache/geronimo/kernel/config/GBeanState.java > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src/main/java/org/apache/geronimo/kernel/config/GBeanState.java > (revision 901109) > +++ src/main/java/org/apache/geronimo/kernel/config/GBeanState.java > (working copy) > @@ -20,6 +20,7 @@ > > =A0import org.apache.geronimo.gbean.GBeanData; > =A0import org.apache.geronimo.gbean.GBeanInfo; > +import org.apache.geronimo.kernel.Kernel; > =A0import org.apache.geronimo.kernel.Naming; > =A0import org.apache.geronimo.kernel.repository.Environment; > =A0import org.osgi.framework.Bundle; > @@ -28,7 +29,7 @@ > =A0* @version $Rev$ $Date$ > =A0*/ > =A0public interface GBeanState { > - =A0 =A0List getGBeans(Bundle bundle) throws InvalidConfigExc= eption; > + =A0 =A0List getGBeans(Bundle bundle, Kernel kernel) throws > InvalidConfigException; > > =A0 =A0 void addGBean(GBeanData gbeanData); > > Index: > src/main/java/org/apache/geronimo/kernel/config/SerializedGBeanState.java > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- > src/main/java/org/apache/geronimo/kernel/config/SerializedGBeanState.java > (revision 901109) > +++ > src/main/java/org/apache/geronimo/kernel/config/SerializedGBeanState.java > (working copy) > @@ -31,6 +31,7 @@ > =A0import org.apache.geronimo.gbean.AbstractName; > =A0import org.apache.geronimo.gbean.GBeanData; > =A0import org.apache.geronimo.gbean.GBeanInfo; > +import org.apache.geronimo.kernel.Kernel; > =A0import org.apache.geronimo.kernel.Naming; > =A0import org.apache.geronimo.kernel.ObjectInputStreamExt; > =A0import org.apache.geronimo.kernel.repository.Environment; > @@ -58,11 +59,11 @@ > =A0 =A0 =A0 =A0 } > =A0 =A0 } > > - =A0 =A0public List getGBeans(Bundle bundle) throws > InvalidConfigException { > + =A0 =A0public List getGBeans(Bundle bundle, Kernel kernel) t= hrows > InvalidConfigException { > =A0 =A0 =A0 =A0 if (gbeanState =3D=3D null) { > =A0 =A0 =A0 =A0 =A0 =A0 return Collections.unmodifiableList(gbeans); > =A0 =A0 =A0 =A0 } > - =A0 =A0 =A0 =A0gbeans.addAll(loadGBeans(gbeanState, bundle)); > + =A0 =A0 =A0 =A0gbeans.addAll(loadGBeans(gbeanState, bundle, kernel)); > =A0 =A0 =A0 =A0 return Collections.unmodifiableList(gbeans); > =A0 =A0 } > > @@ -110,7 +111,7 @@ > =A0 =A0 =A0 =A0 stream.defaultWriteObject(); > =A0 =A0 } > > - =A0 =A0private static List loadGBeans(byte[] gbeanState, Bun= dle > bundle) throws InvalidConfigException { > + =A0 =A0private static List loadGBeans(byte[] gbeanState, Bun= dle > bundle, Kernel kernel) throws InvalidConfigException { > =A0 =A0 =A0 =A0 List gbeans =3D new ArrayList(); > =A0 =A0 =A0 =A0 if (gbeanState !=3D null && gbeanState.length > 0) { > =A0 =A0 =A0 =A0 =A0 =A0 // Set the thread context classloader so deserial= izing classes > can grab the cl from the thread > @@ -118,7 +119,7 @@ > =A0 =A0 =A0 =A0 =A0 =A0 try { > =A0// > =A0Thread.currentThread().setContextClassLoader(classLoader); > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ObjectInputStream ois =3D new ObjectInpu= tStreamExt(new > ByteArrayInputStream(gbeanState), bundle); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ObjectInputStream ois =3D new ObjectInpu= tStreamExt(new > ByteArrayInputStream(gbeanState), bundle, kernel); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 try { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 while (true) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 GBeanData gbeanData =3D n= ew GBeanData(); > Index: > src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManage= r.java > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- > src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManage= r.java > =A0 =A0 (revision 901109) > +++ > src/main/java/org/apache/geronimo/kernel/config/SimpleConfigurationManage= r.java > =A0 =A0 (working copy) > @@ -424,7 +424,7 @@ > > =A0 =A0 =A0 =A0 List allServiceParents =3D buildAllService= Parents(null, > dependencyNode); > > - =A0 =A0 =A0 =A0Configuration configuration =3D new Configuration(config= urationData, > dependencyNode, allServiceParents, null, configurationResolver); > + =A0 =A0 =A0 =A0Configuration configuration =3D new Configuration(config= urationData, > dependencyNode, allServiceParents, null, configurationResolver, null); > =A0 =A0 =A0 =A0 configuration.doStart(); > =A0 =A0 =A0 =A0 //TODO why??? > =A0 =A0 =A0 =A0 resolvedParentIds.add(configuration.getId()); > @@ -1478,7 +1478,8 @@ > =A0 =A0 =A0*/ > =A0 =A0 private void applyOverrides(Configuration configuration) throws > InvalidConfigException { > =A0 =A0 =A0 =A0 Bundle bundle =3D configuration.getBundle(); > - =A0 =A0 =A0 =A0Collection gbeans =3D > configuration.getConfigurationData().getGBeans(bundle); > + =A0 =A0 =A0 =A0//TODO OSGI we might need a kernel here? > + =A0 =A0 =A0 =A0Collection gbeans =3D > configuration.getConfigurationData().getGBeans(bundle, null); > =A0 =A0 =A0 =A0 if (configuration.getManageableAttributeStore() !=3D null= ) { > > configuration.getManageableAttributeStore().applyOverrides(configuration.= getId(), > gbeans, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bundle); > Index: src/main/java/org/apache/geronimo/gbean/GBeanData.java > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- src/main/java/org/apache/geronimo/gbean/GBeanData.java =A0 =A0 =A0(re= vision > 901109) > +++ src/main/java/org/apache/geronimo/gbean/GBeanData.java =A0 =A0 =A0(wo= rking > copy) > @@ -28,6 +28,7 @@ > =A0import java.util.Set; > > =A0import org.apache.geronimo.gbean.annotation.EncryptionSetting; > +import org.apache.geronimo.kernel.ObjectInputStreamExt; > =A0import org.apache.geronimo.kernel.repository.Artifact; > > =A0/** > @@ -419,6 +420,9 @@ > > =A0 =A0 =A0 =A0 protected void readClassSource(ObjectInput in) throws > ClassNotFoundException, IOException { > =A0 =A0 =A0 =A0 =A0 =A0 classSource =3D (Artifact) in.readObject(); > + =A0 =A0 =A0 =A0 =A0 =A0if (in instanceof ObjectInputStreamExt) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0((ObjectInputStreamExt)in).setClassSourc= e(classSource); > + =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 } > =A0 =A0 } > > > --0016e64b95d2d56332047da4f07c Content-Type: text/x-patch; charset=US-ASCII; name="gbean.patch" Content-Disposition: attachment; filename="gbean.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g4p0pwpr0 SW5kZXg6IHNyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nZXJvbmltby9rZXJuZWwvT2JqZWN0SW5w dXRTdHJlYW1FeHQuamF2YQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUv Z2Vyb25pbW8va2VybmVsL09iamVjdElucHV0U3RyZWFtRXh0LmphdmEJKHJldmlzaW9uIDkwMDY2 MSkKKysrIHNyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nZXJvbmltby9rZXJuZWwvT2JqZWN0SW5w dXRTdHJlYW1FeHQuamF2YQkod29ya2luZyBjb3B5KQpAQCAtMjMsNiArMjMsOCBAQAogaW1wb3J0 IGphdmEubGFuZy5yZWZsZWN0LlByb3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b24sIENsYXNzTm90Rm91bmRFeGNlcHRpb24gewogICAgICAgICBDbGFzc1tdIGNpbnRlcmZh Y2VzID0gbmV3IENsYXNzW2ludGVyZmFjZXMubGVuZ3RoXTsKICAgICAgICAgZm9yIChpbnQgaSA9 IDA7IGkgPCBpbnRlcmZhY2VzLmxlbmd0aDsgaSsrKQpAQCAtNTQsNCArNzQsOSBAQAogICAgICAg ICB9CiAgICAgfQogCisgICAgQE92ZXJyaWRlCisgICAgcHVibGljIHZvaWQgY2xvc2UoKSB0aHJv d3MgSU9FeGNlcHRpb24geworICAgICAgICBidW5kbGUuZ2V0QnVuZGxlQ29udGV4dCgpLnVuZ2V0 U2VydmljZShyZWZlcmVuY2UpOworICAgICAgICBzdXBlci5jbG9zZSgpOworICAgIH0KIH0KSW5k ZXg6IHNyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nZXJvbmltby9rZXJuZWwvT2JqZWN0T3V0cHV0 U3RyZWFtRXh0LmphdmEKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dl cm9uaW1vL2tlcm5lbC9PYmplY3RPdXRwdXRTdHJlYW1FeHQuamF2YQkocmV2aXNpb24gMCkKKysr IHNyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nZXJvbmltby9rZXJuZWwvT2JqZWN0T3V0cHV0U3Ry ZWFtRXh0LmphdmEJKHJldmlzaW9uIDApCkBAIC0wLDAgKzEsNDYgQEAKKy8qKgorICogIExpY2Vu c2VkIHRvIHRoZSBBcGFjaGUgU29mdHdhcmUgRm91bmRhdGlvbiAoQVNGKSB1bmRlciBvbmUgb3Ig bW9yZQorICogIGNvbnRyaWJ1dG9yIGxpY2Vuc2UgYWdyZWVtZW50cy4gIFNlZSB0aGUgTk9USUNF IGZpbGUgZGlzdHJpYnV0ZWQgd2l0aAorICogIHRoaXMgd29yayBmb3IgYW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vcmsuQnVuZGxlOworaW1wb3J0IG9yZy5vc2dpLmZyYW1ld29yay5GcmFtZXdvcmtVdGls OworCisvKioKKyAqIEB2ZXJzaW9uICRSZXYkICREYXRlJAorICovCitwdWJsaWMgY2xhc3MgT2Jq ZWN0T3V0cHV0U3RyZWFtRXh0IGV4dGVuZHMgT2JqZWN0T3V0cHV0U3RyZWFtIHsKKworICAgIHB1 YmxpYyBPYmplY3RPdXRwdXRTdHJlYW1FeHQoT3V0cHV0U3RyZWFtIG91dCkgdGhyb3dzIElPRXhj ZXB0aW9uIHsKKyAgICAgICAgc3VwZXIob3V0KTsKKyAgICB9CisKKyAgICBAT3ZlcnJpZGUKKyAg ICBwcm90ZWN0ZWQgdm9pZCBhbm5vdGF0ZUNsYXNzKENsYXNzPD8+IGNsKSB0aHJvd3MgSU9FeGNl cHRpb24geworICAgICAgICBCdW5kbGUgYnVuZGxlID0gRnJhbWV3b3JrVXRpbC5nZXRCdW5kbGUo Y2wpOworICAgICAgICBpZiAoYnVuZGxlID09IG51bGwpIHsKKyAgICAgICAgICAgIHdyaXRlT2Jq ZWN0KG51bGwpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgU3RyaW5nIGJ1bmRsZUlk ID0gYnVuZGxlLmdldFN5bWJvbGljTmFtZSgpICsgIjoiICsgYnVuZGxlLmdldFZlcnNpb24oKS50 b1N0cmluZygpOworICAgICAgICAgICAgd3JpdGVPYmplY3QoYnVuZGxlSWQpOworICAgICAgICB9 CisgICAgfQorICAgICAgCit9CgpQcm9wZXJ0eSBjaGFuZ2VzIG9uOiBzcmMvbWFpbi9qYXZhL29y Zy9hcGFjaGUvZ2Vyb25pbW8va2VybmVsL09iamVjdE91dHB1dFN0cmVhbUV4dC5qYXZhCl9fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX18KQWRkZWQ6IHN2bjptaW1lLXR5cGUKICAgKyB0ZXh0L3BsYWluCkFkZGVkO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WN0 UmVjaXBlKEdCZWFuRGF0YSBnYmVhbkRhdGEpIHsKICAgICAgICAgR0JlYW5JbmZvIGJlYW5JbmZv ID0gZ2JlYW5EYXRhLmdldEdCZWFuSW5mbygpOwogICAgICAgICBMaXN0PFN0cmluZz4gY3N0ck5h bWVzID0gYmVhbkluZm8uZ2V0Q29uc3RydWN0b3IoKS5nZXRBdHRyaWJ1dGVOYW1lcygpOwpAQCAt NDM4LDYgKzQ0OSwxMCBAQAogICAgIHB1YmxpYyBCdW5kbGUgZ2V0QnVuZGxlKCkgewogICAgICAg ICByZXR1cm4gYnVuZGxlQ29udGV4dC5nZXRCdW5kbGUoKTsKICAgICB9CisgICAgCisgICAgcHVi bGljIEJ1bmRsZSBnZXRDbGFzc1NvdXJjZUJ1bmRsZSgpIHsKKyAgICAgICAgcmV0dXJuIGNsYXNz U291cmNlQnVuZGxlOworICAgIH0KIAogICAgIC8qKgogICAgICAqIEhhcyB0aGlzIGdiZWFuIGlu c3RhbmNlIGJlZW4gZGVzdHJveWVkLiBBbiBkZXN0cm95ZWQgZ2JlYW4gY2FuIG5vIGxvbmdlciBi ZSB1c2VkLgo= --0016e64b95d2d56332047da4f07c--