You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "Richard S. Hall" <he...@ungoverned.org> on 2011/07/28 01:40:51 UTC

Re: Side effects of refreshing a bundle???

On 07/27/2011 10:38 PM, Allain Turgeon wrote:
> Hi,
>
> I am trying to build a framework that would load an interface bundle (bundle
> A, no activator) that communicates with one or more bundles using refletion
> (e.g. B and C) and want to be able to update bundle B without disrupting
> bundle C.  Right now, if I update B, the FelixPackageAdmin will shutdown /
> restart B and then shutdown/restart C.

If updating B causes C to be refreshed, then there must be a package 
dependency from C to B that you are forgetting about. Otherwise, if 
there are no dependencies between two bundles, refreshing one won't 
impact the other.

You can use the "inspect" command to check for various dependencies or 
set felix.log.level to 4 in the conf/config.properties files to see what 
wires are created.

-> richard



>   I¹d to keep A and C running without
> disruption until either A or C gets updated.
>
> Here¹s what I would like to get:
> If I update B, only B gets reloaded.
> If I update C, only C gets reloaded.
> If I update A, both B and C needs to be reloaded.
>
> Both B and C export their acess-point namespace and bundle A imports them.
>
> Can this be done or is the OSGi framework limited in a such a scenario?
>
> Thanks,

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Side effects of refreshing a bundle???

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 7/27/11 11:57 PM, Allain Turgeon wrote:
> Hi Richard,
>
> I believe that the reason that C gets restarted is because A depends on it.
> A depends on both B and C, so if I update B, the PackageAdmin.refresh() will
> refresh both B and A (from my understanding of the documentation).
> Therefore, since A gets refreshed because of B, C gets also refreshed
> because A and C are linked.
>
> What do you think?

Refreshing should only traverse across the "is depended on by" 
relationship (i.e., the reverse of the the "depends on" relationship). 
So if B gets refreshed, then A would be refreshed since "B is depended 
on by A", but C would not get refreshed because "A depends on C".

So, if you are refreshing B and having all three refresh, then you don't 
fully understand your dependencies or situation or possibly there is a 
bug in the refresh code.

-> richard

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Side effects of refreshing a bundle???

Posted by Allain Turgeon <al...@radian6.com>.
Hi Richard,

I believe that the reason that C gets restarted is because A depends on it.
A depends on both B and C, so if I update B, the PackageAdmin.refresh() will
refresh both B and A (from my understanding of the documentation).
Therefore, since A gets refreshed because of B, C gets also refreshed
because A and C are linked.

What do you think?
-- 
Allain Turgeon | Software Developer
radian6, a salesforce.com company


> From: "Richard S. Hall" <he...@ungoverned.org>
> Reply-To: <us...@felix.apache.org>
> Date: Wed, 27 Jul 2011 19:40:51 -0400
> To: <us...@felix.apache.org>
> Subject: Re: Side effects of refreshing a bundle???
> 
> Otherwise, if 
> there are no dependencies between two bundles, refreshing one won't 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org