SpringDM Managed Service List is not updated with new services [message #986329] |
Tue, 20 November 2012 02:37 |
Eduardo Frazão Messages: 123 Registered: January 2012 |
Senior Member |
|
|
Hi folks.
This is my scenario:
I have a service defined by the Bundle A. Bundle A also haves one implementation of this service.
A Bundle B also register another implementation of the same service.
In the Bundle A, in a component, I need to get all of this services implementations, and I mapped it in this way:
META-INF/spring/bundle-context.xml
<osgi:list id="serviceList" interface="foo.Service" cardinality="0..N"/>
and, I get an reference on the component with a Autowired setter
@Autowired
public void setServiceList(List<Service> services) {...}
My problem is because this list contains always only the Bundle A implementation, even with the bundle B (that starts after Bundle A) register the service with success. I can see the service on the Equinox console, and on server startup logs.
In the spring dm documentation, its clear that this kind of service list will be managed, and when services come and go from the service registry, it will be added or removed from the list. Even if I reinject the list in another component, I always get only the Bundle A implementation.
I'm doing something wrong?
Thanks by help!
|
|
|
|
Powered by
FUDForum. Page generated in 0.02765 seconds