Hi Soniya,

I don't know how Blueprint and Spring-DM interact.  Blueprint was a 
standardization of Spring-DM and so I would not expect them to be used 
together as you have show.  Spring bean processing is unlikely to 
understand how to handle the reference-list because they're two parallel 
approach to the same problem.  You might want to try asking on the 
Gemini-Blueprint list for suggestions.  In the absence of that you could 
just use Blueprint to achieve what you have shown (i.e. use Blueprint 
beans instead of Spring beans in your xml), unless there a Spring 
specifics that you require.



Regards,

Graham.



Graham Charters PhD CEng MBCS CITP
STSM, WebSphere OSGi Applications Lead Architect, Master Inventor
IBM United Kingdom Limited, MP 146, Hursley Park, Winchester, SO21 2JN, UK
Tel:  (Ext) +44-1962-816527     (Int) 7-246527   (Fax) +44-1962-816527
Internet: [email protected]




From:   Soniya Chavan <[email protected]>
To:     OSGi Developer Mail List <[email protected]>, 
Date:   04/09/2013 14:25
Subject:        Re: [osgi-dev] How to delay initialization of osgi:list ?
Sent by:        [email protected]



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
[email protected] 

office: +1 386 848 1781
mobile: +1 386 848 3788




From:        Soniya Chavan <[email protected]> 
To:        OSGi Developer Mail List <[email protected]> 
Date:        2013/09/03 08:54 
Subject:        Re: [osgi-dev] How to delay initialization of osgi:list ? 
Sent by:        [email protected] 




Correct. So is refresh bundle (bundle which has the list declaration) a 
good option? 
  
Thanks 
Soniya 
  
From: [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
[email protected] 

office: +1 386 848 1781
mobile: +1 386 848 3788




From:        Soniya Chavan <[email protected]> 
To:        OSGi Developer Mail List <[email protected]> 
Date:        2013/09/03 06:27 
Subject:        [osgi-dev] How to delay initialization of osgi:list ? 
Sent by:        [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]
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 
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

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to