avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <leosim...@apache.org>
Subject Re: JMX registration of embeddor's component.
Date Thu, 20 Jun 2002 09:51:14 GMT
On Thu, 2002-06-20 at 09:59, Eung-ju Park wrote:
> I found 'FIXME:All this stuff should be done by embeddor and read out of a
> config file.' in o.a.a.p.c.manager.*Manager.java.
> How about below configuration?
> 
> -kernel.conf
>     <embeddor ...>
>         ...
> 
>         <management>
>           <register name="Kernel"
> role="org.apache.avalon.phoenix.interfaces.Kernel">
> 
> <interface>org.apache.avalon.phoenix.interfaces.KernelMBean</interface>
>           </register>
>           <register name="ExtensionManager"
> role="org.apache.avalon.phoenix.interfaces.ExtensionManager">
> 
> <interface>org.apache.avalon.phoenix.interfaces.ExtensionManagerMBean</inter
> face>
>           </register>
>           <register name="Embeddor"
> role="org.apache.avalon.phoenix.interfaces.Embeddor">
> 
> <interface>org.apache.avalon.phoenix.interfaces.EmbeddorMBean</interface>
>           </register>
>           <register name="Deployer"
> role="org.apache.avalon.phoenix.interfaces.Deployer">
> 
> <interface>org.apache.avalon.phoenix.interfaces.DeployerMBean</interface>
>           </register>
>           <register name="LogManager"
> role="org.apache.avalon.phoenix.interfaces.LogManager">
>           </register>
>           <register name="ConfigurationRepository"
> role="org.apache.avalon.phoenix.interfaces.ConfigurationRepository">
>           </register>
>         </management>
>     </embeddor>
> 
>  or Just hard code in DefaultEmbeddor with below configuration and class?
> -kernel.conf
>     <embeddor ...>
>         <component role="".... manage="true"/> /* manage attribute's default
> value is 'false' */
>         ...
>     </embeddor>
> 
> -ManagementInfo.java
> final class MenagemtnInfo /*extends MetaInfo?*/ {
>  private static final Map c_map = new HashMap();
>  public static final ManagementInfo KERNEL = new
> anagementInfo( Kernel.ROLE, "Kernel", new Class[] { KernelMBean.class } );
>  ...
>  ...
> 
>  private String m_role;
>  private String m_name;
>  private Class[] m_interfaces;
>  ...
> 
>  public static MenagementInfo getManagementInfoForRole( final String role )
>  {
>      return (ManagementInfo)c_map.get( role );
> }
> 
> I think hard coding is better.

I'd say a use of something like Configuration is cool, and then perhaps
a ManagementConfigurationBuilder to supply it. As to the implementation
of that builder, I'd say start with hardcoding and add flexibility when
we need it.

- LSD



--
To unsubscribe, e-mail:   <mailto:avalon-phoenix-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-phoenix-dev-help@jakarta.apache.org>


Mime
View raw message