geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <da...@coredevelopers.net>
Subject Re: Service MBeans getting attributes initialized twice
Date Thu, 04 Dec 2003 06:09:40 GMT
What I'd expect to happen is that attributes whose  
GeronimoAttributeInfo have an initial value get set from that initial  
value when the target(s) are instantiated (which is when the  
GeronimoMBeanInfo is copied using the "copy"-like constructor), and  
then attribute values from the service.xml would be set in the  
InitializeMBeanInstance.perform().

This is obviously not ideal.  For geronimo mbeans I'd more or less  
rather see the attribute values from service.xml set as the initial  
values in the GeronimoAttributeInfo, and the InitializeMBeanInstance  
step skipped.

It is possible that we are already copying the attribute values into  
GeronimoAttributeInfo and I forgot about it.

I would like to eventually remove the step of initialization for  
geronimo mbeans, but at the moment it is still required for standard  
and dynamic mbeans.

One solution for standard mbeans would be to deploy them as geronimo  
mbeans, constructing the GeronimoMBeanInfo based on the *MBean  
interface provided for our delectation.  Offhand I'm not sure how to  
deal with dynamic mbeans.

So, being a little too lazy today to investigate for myself...., are  
the values on the first set call from the service.xml or  the initial  
values in the descriptor?

thanks
david jencks


On Wednesday, December 3, 2003, at 09:02 PM, Alan D. Cabrera wrote:

> My service MBeans seem to be getting their attributes initialized  
> twice,
> once when GeronimoMBeanInfo is constructed and another when
> InitializeMBeanInstance.perform() is called.  Is this correct behavior?
>
> My security-service.xml file looks like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <components>
>     <class-space name="geronimo.system:role=ClassSpace,name=System"/>
>
>     <mbean descriptor="org.apache.geronimo.security.SecurityService"
>            name="geronimo.security:type=SecurityService">
>         <attribute name="DefaultPrincipal">Default</attribute>
>     </mbean>
>
>     <mbean
> descriptor="org.apache.geronimo.security.providers.PropertiesFileSecuri 
> t
> yRealm" name="geronimo.security:type=SecurityRealm">
>         <attribute name="RealmName">Foo</attribute>
>         <attribute
> name="UsersURI">../../../modules/core/src/test-data/data/ 
> users.propertie
> s</attribute>
>         <attribute
> name="GroupsURI">../../../modules/core/src/test-data/data/ 
> groups.propert
> ies</attribute>
>         <depends name="geronimo.security:type=SecurityService"/>
>     </mbean>
>
> </components>
>
>
>
> Regards,
> Alan
>
>
>


Mime
View raw message