On Wednesday 06 October 2004 20:26, PRINCE David wrote:
> My requirements are the following:
> - I have a component "MBeanServer" that is the JMX MBeanServer of my
> application, - Other components lookup the "MBeanServer" comp. to register
> themselves, - The component in question, lookup the "MBeanServer" comp. to 
> listen to JMX notifications and convert them to SNMP traps.
>
> I want this component to be the first (after "MBeanServer" comp. of course)
> and the last in order be able to listen (and send SNMP tarps) at
> startup/shutdown notifications of others components.

Ok, I think I have the picture.

What you are asking for is not directly possible.

IMHO, I think you should either get the MBeanServer to depend on the SNMP guy.
If that is not possible, then make the SNMP guy into a facility (which may be 
interesting anyway), by declaring that it needs the root containment model in 
its context.
That is done by;

    /**
     * @avalon.entry key="urn:composition:containment.model" 
     *               
type="org.apache.avalon.composition.model.ContainmentModel" 
     *
     */
    public void contextualize( Context ctx ) 
        throws ContextException
    {
        m_Model = (ContainmentModel) ctx.get( 
"urn:composition:containment.model" );
    }

That will guarantee the SNMP guy to be running before anything else.


Btw, any contribution in the SNMP area is of highest interest, even if it is 
not complete or generic. (Stayed tune for further info of how to get your 
hands dirty quickly with Merlin/Metro.)


Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to