I am still in the process of merlinizing (TM) this app of mine. I have
reached the point where I want to add some listeners - which are components
themselves - to a service. Obviously, I could do something like

public void service(ServiceManager sm) throws ServiceException
{
        Listener l = (Listener) sm.lookup(Listener.class.getName());

        this.addListener(l);
}

in my service. This approach, however, leaves a lot to be desired:

(1) The service should not know about the listeners applied to it.

(2) Since none of those listeners are necessary for my application to work
correctly I would prefer the set of listeners to be applied to my service to
be configurable.

Are there any best practices for doing what I am trying to achieve?
Currently, I am thinking about writing a lifecycle extension to that end. Is
this a feasible solution? Or even better, does anybody have a working
solution?

Thanks,
Olaf


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

Reply via email to