On Wednesday 24 December 2003 06:17, Marco Tedone wrote:
> I'm just going through the JMX (for the first time) as it seems this will
> be the technology used by James and Merlin, in addition to JBoss and I
> think Tomcat now. In few words, JMX everywhere.

I know. :o)

> Well, I was just reading that the instrumentation level defines a
> notification mechanism. Basically listeners can be notified of event.
> Doesn't this sound a good technology for the "availability" contract?

I am not sure. I have not studied the JMX specs enough to be able to make a 
"qualified guess", but I will sooner or later.

However, the "contract" we are looking at is not between JMX and the 
Container, or the MBean and the Container, or Jini and container, but solely 
between the component and container, which today is governed by the Avalon 
Framework. Avalon Framework is lacking this notion, and needs to be extended 
with it.

Something like (I have drawn this on [EMAIL PROTECTED] list earlier);

public interface ExtendedServiceManager extends ServiceManager
{
    /** Adds a listener for events related to the given role.
    **/
    void addServiceListener( String role, ServiceAvailabilityListener listener 
);

   void removeServiceListener( String role, ServiceAvailabilityListener 
listener );

}


public interface ServiceAvailabilityListener
{
    void serviceAvailable( ServiceEvent event );
    void serviceUnavailable( ServiceEvent event );
}

So, components would never do "lookup" and instead register its "interest" of 
other services, and the container would try to find them and provide them.
The component would also be slightly differently designed, as it has to handle 
the requested service disappears and re-appears.

However, 
this is only one of a couple of ways to do it.
And it takes a fair bit of convincing to make changes to Framework, so other 
solutions will sure be discussed, where changes to Framework is not made.

JMX may or may not be part of this picture.

Niclas

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

Reply via email to