Hi Jean-Philippe

Thanks for your quick answer. What you say makes sense, but I'm not sure
why Bundle A should be restarted. If I install Bundle B after bundle A, and
Bundle B depends on Bundle A, bundle B is restarted?




2014-04-16 10:39 GMT+02:00 CLEMENT Jean-Philippe <
[email protected]>:

> Hi Adrián,
>
>
>
> I'm not too sure if it is related but from your blueprint samples
> ServiceBImpl might refer to a ServiceA which is not available anymore when
> Bundle A is restarted. Could it be the case?
>
>
>
> Regards,
>
> JP
>
>
>
> [@@ OPEN @@]
>
>
>
> *De :* Adrián Roselló Rey [mailto:[email protected]]
> *Envoyé :* mercredi 16 avril 2014 10:26
> *À :* [email protected]
> *Objet :* ServiceUnavailableException
>
>
>
> Hi all,
>
> I have an OSGI application in which I use Aries Bluepint to publish my
> services. My scenario consists of two bundles: bundle A publishes serviceA
> and bundleB publish serviceB, in which serviceA is injected:
>
> *Bundle A / blueprint.xml*
>
>
>
> *<bean id="serviceA" class="blabla.ServiceAImpl"/><service ref="serviceA"
> interface="blabla.ServiceA"> </service>*
>
> *Bundle B / blueprint.xml*
>
> *<reference id="serviceA" interface="blabla.ServiceA"/>*
>
>
>
>
>
> *<bean id="serviceB" class="blabla.ServiceBImpl">         <property
> name="serviceA" ref="serviceA" /> </bean> <service ref="serviceB"
> interface="blabla.ServiceB"> </service>*
>
>
>
> Sometimes, when deploying my application (and also when testing) I get the
> following error:
>
> Caused by:
> org.osgi.service.blueprint.container.ServiceUnavailableException: The
> Blueprint container is being or has been destroyed:
> (objectClass=blabla.ServiceA)
>     at
> org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:240)
>     at
> org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:55)
>     at
> org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:298)
>     at Proxy1e317e77_0693_41e9_8bcb_60a2dbe3386c.getName(Unknown Source)
>     at blabla.ServiceBImpl.getServiceA(ServiceBImpl.java:99)
>     ... 47 more
>
> Any idea on what could be happening?
>
> Thanks!
>
> Best regards,
>
>
> --
>
>
>
>
> * Adrián Roselló ReyDistributed Applications and Networks Area (DANA)i2CAT
> Foundation, Barcelona, Spain*
>
> T: +34 93 553 25 49
>
> http://dana.i2cat.net
>



-- 




* Adrián Roselló Rey Distributed Applications and Networks Area (DANA)
i2CAT Foundation, Barcelona, Spain*
T: +34 93 553 25 49
http://dana.i2cat.net

Reply via email to