On Wednesday 17 March 2004 17:34, Corey Jewett wrote: > Is there a replacement for ServiceManager/Serviceable that would allow > me to resolve a service by ServiceDescriptor? Or perhaps some other > mechanism entirely?
Stephen is pointing you to an example of a hook into Merlin's guts, which allow you to "listen in" or to modify the Model on the fly. You don't write in detail what you are trying to achieve, but I assume that the services are to be exposed to the external world. If that is the case, you create the "Publishing Facility", which will receive a reference to the Composition Model, via a Context entry, and it will then register itself as a CompositionListener, for 'added' and 'removed' events. The components should not need to know anything about that this mechanism is in place. The Composition package is a bit intimidating, but you will primarily be looking at ComponentModel, its superclass DeploymentModel and perhaps ContainmentModel. As for different versions of the same service; I assume you mean different versions of the same component. You would need to ensure that they are in different <containers>, so that the Classloading works properly, but other than that, it should be Ok. If you need different versions of the same service, then you need to bring the classloader hierarchy yet another level, and the resulting <container> will NOT be able to expose both services (as classes will conflict in the higher container.) I somewhat don't see the purpose, but maybe you can explain your usecase. Hope this helps you on your way. Niclas -- +---------//-------------------+ | http://www.bali.ac | | http://niclas.hedhman.org | +------//----------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]