Hi all –
We are using the Declarative Services implementation within
Eclipse 3.2.2 as we are interested in exploring the use of DS. I’m
running into an issue right now where the implementation is not acting as I
would expect. I have one bundle that declares the following component:
<?xml version="1.0" encoding="UTF-8"?>
<component name="instantiator">
<implementation class="com.cra.shared.instantiator.InstantiatorImpl"/>
<service>
<provide interface="com.cra.shared.instantiator.Instantiator"/>
</service>
</component>
Another bundle
defines another component thusly:
<?xml version="1.0" encoding="UTF-8"?>
<component name="container">
<implementation class="com.cra.shared.container.DefaultContainer"/>
<service>
<provide interface="com.cra.shared.container.Container"/>
</service>
<reference
name="instantiator"
interface="com.cra.shared.instantiator.Instantiator"
cardinality="1..1"
bind="bindInstantiator"
unbind="unbindInstantiator"
/>
</component>
I would expect
that the container service would not be started until the instantiator service
was available. However, I mistakenly had the InstantiatorImpl class package
private instead of public so, apparently, it was not able to be instantiated. As
I wouldn’t have expected, the container service was started and, having a
null Instantiator, it blew up.
Am I trying to
hook things up incorrectly?
Thanks,
Chris