geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: loading gbeans
Date Mon, 24 Oct 2005 00:23:43 GMT

On Oct 22, 2005, at 7:05 PM, Sachin Patel wrote:

> Is there a way to load a "loaded configuration's" gbeans' without 
> starting the configuration?  I'm basically wanting query a gbean's 
> persistent attribute value on a loaded but not started configuration.  
> Looking through the code the configuration's gbeans are loaded only 
> after its containing configuration is started
>
> kernel.startGBean(configName);
> kernel.invoke(configName, "loadGBeans", new Object[] {attributeStore}, 
> new String[] {ManageableAttributeStore.class.getName()});
>
> This makes sense, but I'm wondering if there is an alternate way to 
> get the gbeans attribute values on an already deployed and serialized 
> configuration.

I don't think we can do better at this point.  There is no limit on the 
complexity of attribute values, and the only restriction other than 
serializablitly is that classes used must be loadable by the 
configuration's classloader.  This classloader is only available when 
the configuration gbean is started.

If you're willing to use the kernel methods directly rather than the 
methods on ConfigurationManager (I recommend sticking to using the 
ConfigurationManager) you could pass your own ManageableAttributeStore 
in that gets all the gbean datas and return an empty list.  This would 
result in you getting the gbean datas and no gbeans getting loaded.

Why do you want to avoid loading the gbeans?

thanks
david jencks

>
> ???
>
> Sachin
>


Mime
View raw message