I recently came across something that I thought should work but didn't:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";>

    <bean class="org.apache.yoko.osgi.locator.ServiceBean"
          activation="eager"
          init-method="start"
          destroy-method="stop">
        <argument>
            <reference interface="org.apache.yoko.osgi.locator.Register" 
component-name="yokoRegistryBean"/>
        </argument>
    </bean>
...

The error looked to me as if it was complaining that some object constructed 
for the reference was not of the type needed for the constructor argument, but 
I didn't investigate in detail.

This, however, did work:


<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";>

    <reference id="register" interface="org.apache.yoko.osgi.locator.Register" 
component-name="yokoRegistryBean"/>

    <bean class="org.apache.yoko.osgi.locator.ServiceBean"
          activation="eager"
          init-method="start"
          destroy-method="stop">
        <argument>
            <ref component-id="register"/>
        </argument>
    </bean>
...

Is this expected behavior or a bug?

thanks
david jencks

Reply via email to