Mykhaylo Adamovych
Mykhaylo Adamovych

Reputation: 20956

OSGi bundle (State - Active) (Spring - Started)

When I start karaf client and type list command i can see OSGi bundles statistic.
For each OSGi bundle there is several values, and 'Spring' among them.
I need programmatically get Spring state from all OSGi bundles where there is Spring context.
I'm tying to write an util method that should 'wait for all Spring contexts from all bundles to be up and running'
How can I do this?

Upvotes: 0

Views: 165

Answers (1)

Christian Schneider
Christian Schneider

Reputation: 19606

If you want to program this yourself then you can do the same as the karaf bundle service in the SpringStateService.

You can also simply leverage the BundleStateService. You need to watch for all such services and use the one that returns "Spring DM" in getName().

Upvotes: 1

Related Questions