Hi Graham

This works fine, I can register a listener and receive the last event/state for each blueprint bundle. There is a class in Felix that does exactly this. The code I need is more or less a copy of this class. And everyone else will have to write the same code to achieve this, including keeping a copy of the last event. In my view, it'd be more efficient if there was a direct interface to access that last 'event', kept by the Blueprint Extender.

Martin

On 31/07/2013 12:29, Graham Charters wrote:
Hi Martin,

Disclaimer: I haven't tried this but...

Section 121.12.2 of the Blueprint spec talks about the Blueprint container replaying the last even for each bundle it manages for new Blueprint Listeners. It specifically states, "The set of managed bundles is defined by bundles that are active and are managed by the Blueprint extender, even if their initialization ended in failure"

So, I would think you should be able to register the listener and you will be told if a blueprint bundle had failed before your registration.

Regards, Graham.


On 22 July 2013 22:00, Martin Lichtin <[email protected] <mailto:[email protected]>> wrote:

    How can I access the status of the Blueprint container?
    I see it when listing the bundles, for example:

    karaf@root> list|grep Fail
    [ 201] [Active     ] [Failure     ] [       ] [   80] my-bundle
    (0.1.0.SNAPSHOT)

    I realize the status is sent as a BlueprintEvent, but how can it
    be accessed
    in case I was too late for listening to all events?

    Martin





Reply via email to