You are viewing a plain text version of this content. The canonical link for it is here.
Posted to phoenix-dev@avalon.apache.org by Eung-ju Park <co...@hotmail.com> on 2002/06/20 09:59:05 UTC

JMX registration of embeddor's component.

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Really, what are the possible ways to restart phoenix?

Posted by Peter Donald <pe...@apache.org>.
At 07:22 PM 6/20/2002 +0300, you wrote:
>I wrote subject like this because I recalled same question was risen in
>James list about possible ways to restart James. Now I am facing this
>problem for my application which is phoenix based (of course :-) ). There is
>a swing gui for reconfiguring it. It would be nice to enable user to restart
>phoenix after configs has been changed (or may be there is some other ways
>to let Phoenix reinitialize all components)?

If phoenix is managed by wrapper (http://wrapper.sourceforge.net) then you 
can restart it via wrappers restart mechanisms. If you use wrapper you can 
also restart it via JMX as the Embeddor MBean has a restart method.



Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Really, what are the possible ways to restart phoenix?

Posted by Andrei Ivanov <my...@surfeu.fi>.
Hi,
I wrote subject like this because I recalled same question was risen in
James list about possible ways to restart James. Now I am facing this
problem for my application which is phoenix based (of course :-) ). There is
a swing gui for reconfiguring it. It would be nice to enable user to restart
phoenix after configs has been changed (or may be there is some other ways
to let Phoenix reinitialize all components)?

Andrei


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JMX registration of embeddor's component.

Posted by Leo Simons <le...@apache.org>.
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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JMX registration of embeddor's component.

Posted by Peter Donald <pe...@apache.org>.
At 10:53 AM 6/21/2002 +0900, you wrote:
> > >-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 am not sure I understand 100%. The ManagementInfo class has a bunch of
> > statics that define all the data needed to expose kernel parts as MBeans ?
>
>Yep. I committed my implementation.
>I don't explain my intention in English. :-|
>Please see the sources. ;)

kool!



Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JMX registration of embeddor's component.

Posted by Eung-ju Park <co...@hotmail.com>.
----- Original Message -----
From: "Peter Donald" <pe...@apache.org>
To: "Avalon-Phoenix Developers List" <av...@jakarta.apache.org>
Sent: Thursday, June 20, 2002 9:03 PM
Subject: Re: JMX registration of embeddor's component.


> At 04:59 PM 6/20/2002 +0900, you 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>
>
> Is this under the <component/> tag for SystemManager? If so then +1

Who has responsibility? Embeddor or SystemManager?
FIXME says Embeddor has responsibility.

>
> >-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 am not sure I understand 100%. The ManagementInfo class has a bunch of
> statics that define all the data needed to expose kernel parts as MBeans ?

Yep. I committed my implementation.
I don't explain my intention in English. :-|
Please see the sources. ;)

> If so then I like this better aswell. It is also backwards compatible
> (doesn't need users to modify kernel.conf.xml if they have a custom
version).
>
> Cheers,
>
> Peter Donald
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> "Faced with the choice between changing one's mind,
> and proving that there is no need to do so - almost
> everyone gets busy on the proof."
>               - John Kenneth Galbraith
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JMX registration of embeddor's component.

Posted by Peter Donald <pe...@apache.org>.
At 04:59 PM 6/20/2002 +0900, you 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>

Is this under the <component/> tag for SystemManager? If so then +1

>-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 am not sure I understand 100%. The ManagementInfo class has a bunch of 
statics that define all the data needed to expose kernel parts as MBeans ? 
If so then I like this better aswell. It is also backwards compatible 
(doesn't need users to modify kernel.conf.xml if they have a custom version).

Cheers,

Peter Donald
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Faced with the choice between changing one's mind,
and proving that there is no need to do so - almost
everyone gets busy on the proof."
              - John Kenneth Galbraith
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>