[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Issue with declarative services implementation?

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"/>


            <provide interface="com.cra.shared.instantiator.Instantiator"/>




Another bundle defines another component thusly:


<?xml version="1.0" encoding="UTF-8"?>

<component name="container">

      <implementation class="com.cra.shared.container.DefaultContainer"/>


            <provide interface="com.cra.shared.container.Container"/>











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?