Sorry, but it didn't
Originally Posted by gengshg
I will try to explain myself more clearly. I have a ServiceManager that owns a map of IService. I want to add some IService that are declared as osgi services. So how do I modify the declaration of my bean ServiceManager to incorporate those IService, knowing that this ServiceManager takes as an input a map, not a list.
I could of course modify my ServiceManager to make him accept a list, but that is a refactoring I want to avoid.
<osgi:list id="myExternalServices" interface="IService"/>
<bean id="serviceManager" class="Servicemanager">
<ref bean="myLocalService" />
<!-- how to add the content of myExternalServices to this map ? -->
Moreover If I introduce a setServices(List<IService> list) where I put hte elements of this list in my map, my list won't be managed anymore by SpringDM, am I wrong ? (I mean if one of the IService disappear because its bundle is down, my ServiceManager will still refer to that IService)
I hope I managed to explain my problem more clearly...