Hi everyone,

I'm using iPOJO in my application and I would like to inject a service
instance in another class of the same bundle.

Something like this:
<iPOJO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns="org.apache.felix.ipojo"
        xsi:schemaLocation="org.apache.felix.ipojo
http://felix.apache.org/ipojo/schemas/CURRENT/core.xsd";>
        <component classname="org.test.ServiceImpl"
                name="ServiceImpl" public="true" immediate="true">
                <callback transition="invalidate" method="terminate" />
                <provides />
        </component>
        <instance component="ServiceImpl" />
        <component classname="org.test.User"
                name="User" public="true">
                <requires field="serviceInstance"/>
        </component>
        <instance component="User" />
</iPOJO>

Is is supported by iPOJO? Is there a special way to do it?

I tried it and have a null pointer exception on the instance...

Kind regards

Ben


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to