felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: Uses violations: cascading package version updates?
Date Wed, 25 Jul 2012 14:52:47 GMT
On 7/25/12 10:38 , Dan Gravell wrote:
> On Wed, Jul 25, 2012 at 2:27 PM, Richard S. Hall <heavy@ungoverned.org>wrote:
>> p.s. The constraint violation happens during deploy, I imagine, because
>> you are leaving your bundles in an active state, so OBR tries to restart
>> them (or you are telling OBR to start them when calling deploy()). The the
>> OBR patch I referenced, this will help since it refreshes before
>> restarting, but OBR is not intended to be a sophisticated management agent,
>> so you might need to write something better.
> Ok, so the important thing here is that the refresh has to be done between
> update and start, correct?
> Could this be done with a SynchronousBundleListener? E.g. decide which
> bundles are being updated, then listen for the update event and when it
> occurs perform a refresh on that bundle?

Would not be a good idea. Synchronous listeners are not supposed to 
change the state of the bundle they receive an event about since the 
framework is often in the middle of some operation on them.

The best way to do this sort of stuff is to create a management agent 
that records, deploys, and reinstates the proper state of your 
application after deployment operations.

-> richard

> This would happen multiple times, for each bundle that is updated. I could
> potentially group all the updated bundles together given by taking a look
> at the state changes and trying to collect the bundles together somehow. It
> looks like resolveBundleRevision occurs before STARTING.
> Dan

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

View raw message