Thanks for the reply. I tried to use <reference-list>. But since I use spring
dm I had to merge both spring and blueprint.
My config file is ,
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<beans:bean name="remoteManager"
class="com.myapp.platform.remote.RemoteManager" init-method="start">
<beans:property name="services">
<reference-list id="serviceReferenceList"
interface="com.myapp.serviceprovider.IRemoteServiceProvider"
member-type="service-object" />
</beans>
</beans:bean>
</blueprint>
This gives an error : The matching wildcard is strict, but no declaration can
be found for element 'reference-list'.
If I place the <reference-list> outside the <beans:bean> then I do not get any
error but then the "services" property does not get refreshed even if the
reference-list "serviceReferenceList" is updated. Also note that the
reference-list declaration works only if the default namsespace is blueprint.
Thanks
Soniya Chavan
From: [email protected] [mailto:[email protected]] On
Behalf Of BJ Hargrave
Sent: Tuesday, September 03, 2013 7:14 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] How to delay initialization of osgi:list ?
No. You should just handle the dynamics. <reference-list> is updated as the
services change.
--
BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance<http://www.osgi.org/>
[email protected]<mailto:[email protected]>
office: +1 386 848 1781
mobile: +1 386 848 3788
From: Soniya Chavan
<[email protected]<mailto:[email protected]>>
To: OSGi Developer Mail List
<[email protected]<mailto:[email protected]>>
Date: 2013/09/03 08:54
Subject: Re: [osgi-dev] How to delay initialization of osgi:list ?
Sent by:
[email protected]<mailto:[email protected]>
________________________________
Correct. So is refresh bundle (bundle which has the list declaration) a good
option?
Thanks
Soniya
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of BJ Hargrave
Sent: Tuesday, September 03, 2013 6:07 PM
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] How to delay initialization of osgi:list ?
Assuming that many bundles could register IRemoteServiceProvider services, how
could Blueprint know when all of them have been registered? Some of these
bundles may not have even been started yet.
--
BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance<http://www.osgi.org/>
[email protected]<mailto:[email protected]>
office: +1 386 848 1781
mobile: +1 386 848 3788
From: Soniya Chavan
<[email protected]<mailto:[email protected]>>
To: OSGi Developer Mail List
<[email protected]<mailto:[email protected]>>
Date: 2013/09/03 06:27
Subject: [osgi-dev] How to delay initialization of osgi:list ?
Sent by:
[email protected]<mailto:[email protected]>
________________________________
Hello,
How do I make sure that an osgi:list gets initialized after all the beans
implementing the interface are initialized.I have a list of services.
<osgi:list id="serviceReferenceList"
interface="com.myapp.serviceprovider.IRemoteServiceProvider"
member-type="service-object"/>
Now this list should only be initialized when all the classes/beans
implementing IRemoteServiceProvider interface are initialized. The problem that
I am facing is that this osgi:list gets initialized before my bean implementing
the IRemoteServiceProvider interface gets initialized and hence does not get
set to the osgi list.
Please help.
Thanks
Soniya
DISCLAIMER ========== This e-mail may contain privileged and confidential
information which is the property of Persistent Systems Ltd. It is intended
only for the use of the individual or entity to which it is addressed. If you
are not the intended recipient, you are not authorized to read, retain, copy,
print, distribute or use this message. If you have received this communication
in error, please notify the sender and delete all copies of this message.
Persistent Systems Ltd. does not accept any liability for virus infected mails.
_______________________________________________
OSGi Developer Mail List
[email protected]<mailto:[email protected]>
https://mail.osgi.org/mailman/listinfo/osgi-dev
DISCLAIMER ========== This e-mail may contain privileged and confidential
information which is the property of Persistent Systems Ltd. It is intended
only for the use of the individual or entity to which it is addressed. If you
are not the intended recipient, you are not authorized to read, retain, copy,
print, distribute or use this message. If you have received this communication
in error, please notify the sender and delete all copies of this message.
Persistent Systems Ltd. does not accept any liability for virus infected mails.
_______________________________________________
OSGi Developer Mail List
[email protected]<mailto:[email protected]>
https://mail.osgi.org/mailman/listinfo/osgi-dev
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the
property of Persistent Systems Ltd. It is intended only for the use of the
individual or entity to which it is addressed. If you are not the intended
recipient, you are not authorized to read, retain, copy, print, distribute or
use this message. If you have received this communication in error, please
notify the sender and delete all copies of this message. Persistent Systems
Ltd. does not accept any liability for virus infected mails.
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev