Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » creating and using references
creating and using references [message #121419] Fri, 21 November 2008 17:54
Kshanti Greene is currently offline Kshanti GreeneFriend
Messages: 3
Registered: July 2009
Junior Member
I have a question about creating and using references to services with
OSGi declarative services... I have a Facade class that retrieves data
from a data store. This facade is created as a service and is listed as a
service-component in the manifest. I would like to create a reference from
this service to my view provider, which *should* be created from from a
view through an implementation of IApplication. The Application and Facade
have no reference to each other. In order to create a reference, we have
created another service for the provider and also included it in the list
of service-components. If I put a <reference../> property in one of these
services xml files, the reference between the classes does get created.
However--- the problem is that it creates a reference between the Facade
and some provider that seems to be created as a service, but is not
actually the provider that my view uses. So my question is- is there a way
to create this reference from the Facade service to this provider that is
being created by the application, (perhaps without making the provider a
service)?

Here is my Facade xml code:
<?xml version="1.0"?>
<component name="ClientUI">
<implementation
class=" com.stottlerhenke.sentinel.client.ui.models.SentinelModelFac ade "/>
<service>
<provide
interface=" com.stottlerhenke.sentinel.client.translation.interfaces.IOn tChangeSubscriber "/>
<provide
interface=" com.stottlerhenke.sentinel.client.ui.models.SentinelModelFac ade "/>
</service>
<reference name="SentinelModelFacade"

interface=" com.stottlerhenke.sentinel.client.ui.models.ASentinelContent Provider "
bind="register"
unbind="unregister"
cardinality="1..1"
policy="dynamic"/>
</component>

Here is my provider code:

<?xml version="1.0"?>
<component name="FacadeGrabber">
<implementation
class=" com.stottlerhenke.sentinel.client.ui.models.TSTListViewConte ntProvider "/>
<service>
<provide
interface=" com.stottlerhenke.sentinel.client.ui.models.ASentinelContent Provider "/>
</service>

</component>

Thanks,
Kshanti
Previous Topic:Reading from FileSystem
Next Topic:Difference between an OSGi bundle as jar/directory
Goto Forum:
  


Current Time: Tue Apr 23 09:44:08 GMT 2024

Powered by FUDForum. Page generated in 0.03349 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top