| How to use declarative services? [message #140427] | 
Wed, 15 July 2009 04:21   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: a.loerchner.web.de 
 
Hello everyone, 
I am pretty new to RAP, RCP and OSGi development and atm I am struggling  
to get a declarative service to provide data for a ViewPart to display. 
 
That service is running and I can use it in a pure OSGi application. But  
in a RAP application when my ViewPart is created the bind/unbind methods  
  given in the OSGI-INF/service_component.xml are not called to make the  
service available to that class. Actually when running a RAP app the  
ViewPart is instantiated two times. For one instance (created by the  
service registry) the bind method is called and the service is provided,  
for the other instance (the one that gets displayed and is created by  
the workbench) the bind method is not called. 
 
I guess I am a bit off the track here so are there any tutorials or  
examples on how to use declarative services in a RAP (or RCP) environment? 
 
Best regards, 
Andre
 |  
 |  
  | 
 | 
 | 
| Re: How to use declarative services? [message #553960 is a reply to message #140551] | 
Thu, 19 August 2010 10:17   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi All, 
 
understand the reason a ViePart cannot act as a DS component, but then, how should a view get a reference to the service exposed by another OSGi bundle ? 
In a JSF application @EJB can be used to inject the service in the backing bean, haw can this be obtained in a RAP application ? 
 
Thanks a lot 
Patrick
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 1.15195 seconds