felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Bartlett <njbartl...@gmail.com>
Subject Re: how can a bundle stop itself programmatically?
Date Wed, 19 Oct 2016 11:04:01 GMT
Change the logic of the update… instead of always replacing the security.policy file, replace
it only if it is not already in the required state. This makes your bundle idempotent (it
doesn’t matter how many times it is called) which is a much more robust approach.

Neil

> On 19 Oct 2016, at 07:05, sid19039 <sid19039@gmail.com> wrote:
> 
> Hello Ray,
> 
> Thanks for your reply. Following is our use case:
> 
> we are making a bundle which would be used as a security patch meant to
> update a security.policy file.
> Now the scenario is that we are deploying that bundle on to a felix
> framework target via Apache Ace server. For the very first time when it
> starts, it updates the file - which is ok. But Apache Ace server refreshes
> the felix framework i.e it restarts all of the bundles installed previously
> also each time some new bundle is deployed onto the target. Due to which our
> security bundle also restarts and update security.policy file again which is
> not required. So we want it(the bundle) to be removed from the framework
> once it updates the file or simply runs only once until somebody tries to
> update the file by deploying its new version.
> 
> Any suggestions would be very helpful.
> 
> Regards
> Siddharth
> 
> 
> 
> --
> View this message in context: http://apache-felix.18485.x6.nabble.com/how-can-a-bundle-stop-itself-programmatically-tp5018885p5018894.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


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


Mime
View raw message