You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Rajini Sivaram <ra...@googlemail.com> on 2007/06/27 14:13:06 UTC

Can an implementation provider detect changes to its SCA domain?

Hello,

Is there any way for an implementation provider to detect when a
contribution is updated/removed from an SCA domain or when a domain is
closed?

The OSGi implementation provider for SCA allows an OSGi bundle to be shared
across multiple SCA components. The bundles need to be uninstalled at some
point, and since only the implementation provider knows about its installed
bundles, it needs to uninstall them when the contribution is removed from
the SCA domain and also before any updates to the contribution. The bundle
cannot be uninstalled when the component is deactivated since there could be
other components which are using the bundle. Unfortunately OSGi does not
provide reference counting for its bundles, so the implementation provider
for SCA has to figure out when it is safe to uninstall the bundles that it
installed. Any suggestions on how this could be done are appreciated.

Thank you...

Regards,

Rajini

Re: Can an implementation provider detect changes to its SCA domain?

Posted by Rajini Sivaram <ra...@googlemail.com>.
Simon,


Thank you, this was exactly what I was looking for (obviously didn't try
hard enough to find it).


Thank you...

Regards,

Rajini


On 6/27/07, Simon Laws <si...@googlemail.com> wrote:
>
> On 6/27/07, Rajini Sivaram <ra...@googlemail.com> wrote:
> >
> > Hello,
> >
> > Is there any way for an implementation provider to detect when a
> > contribution is updated/removed from an SCA domain or when a domain is
> > closed?
> >
> > The OSGi implementation provider for SCA allows an OSGi bundle to be
> > shared
> > across multiple SCA components. The bundles need to be uninstalled at
> some
> > point, and since only the implementation provider knows about its
> > installed
> > bundles, it needs to uninstall them when the contribution is removed
> from
> > the SCA domain and also before any updates to the contribution. The
> bundle
> > cannot be uninstalled when the component is deactivated since there
> could
> > be
> > other components which are using the bundle. Unfortunately OSGi does not
> > provide reference counting for its bundles, so the implementation
> provider
> > for SCA has to figure out when it is safe to uninstall the bundles that
> it
> > installed. Any suggestions on how this could be done are appreciated.
> >
> > Thank you...
> >
> > Regards,
>
> Rajini
>
>
> Hi Rajini
>
> Ignacio started a thread generally about notification [1] and Huag Kai
> started another about system events [2]. It sounds like you would like to
> subscribe to events to do with contrigutions being removed. It would be
> good
> to have you input on this so this can work for you too.
>
> Regards
>
> Simon
>
> [1] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg19181.html
> [2] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg19365.html
>

Re: Can an implementation provider detect changes to its SCA domain?

Posted by Simon Laws <si...@googlemail.com>.
On 6/27/07, Rajini Sivaram <ra...@googlemail.com> wrote:
>
> Hello,
>
> Is there any way for an implementation provider to detect when a
> contribution is updated/removed from an SCA domain or when a domain is
> closed?
>
> The OSGi implementation provider for SCA allows an OSGi bundle to be
> shared
> across multiple SCA components. The bundles need to be uninstalled at some
> point, and since only the implementation provider knows about its
> installed
> bundles, it needs to uninstall them when the contribution is removed from
> the SCA domain and also before any updates to the contribution. The bundle
> cannot be uninstalled when the component is deactivated since there could
> be
> other components which are using the bundle. Unfortunately OSGi does not
> provide reference counting for its bundles, so the implementation provider
> for SCA has to figure out when it is safe to uninstall the bundles that it
> installed. Any suggestions on how this could be done are appreciated.
>
> Thank you...
>
> Regards,

Rajini


Hi Rajini

Ignacio started a thread generally about notification [1] and Huag Kai
started another about system events [2]. It sounds like you would like to
subscribe to events to do with contrigutions being removed. It would be good
to have you input on this so this can work for you too.

Regards

Simon

[1] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg19181.html
[2] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg19365.html