avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eung-ju Park" <colu...@hotmail.com>
Subject JMX registration of embeddor's component.
Date Thu, 20 Jun 2002 07:59:05 GMT
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.


--
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