I forgot one important thing: 

The main problem with supporting both registrations is the deregistration - 
who should unregister a component ?

If the components are started by JMX - then JMX is supposed to unregister
them. 

If they are created automatically - then whoever created them is responsible
to unregister them ( and stop, etc ).

Unfortunately, there is no way to guess which one - so each component will
have a "controller" field. If the field is null - that means JMX ( or some
external entity ) created the component and is in charge of its lifecycle.

Whenever we create a component internally - for example valves, etc - and
we register them in parent or when the component registers itself in init,
it should also set the "controller" field with the object name of the
component. 

On destroy() or when the component is removed - we should check the
controller and unregister.

It's simpler than it sounds :-)

Costin


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

Reply via email to