moohkooh
moohkooh

Reputation: 927

Jboss 7 OSGI runlevel

is there a proper way to define the start level of osgi bundles on JBoss 7.1 application server, like on equinox configuration?

thanks!!!

Upvotes: 1

Views: 157

Answers (1)

Marcel Offermans
Marcel Offermans

Reputation: 3323

Conceptually, you should first determine what bundle or code inside of your server actually installs your bundles. This bundle, often referred to as the "management agent" should then probably also be made responsible for setting the correct start level for these bundles. OSGi defines a "StartLevel" service (described in chapter 8 of the specification) that, amongst other things, allows you to set the start level for bundles by either using:

setInitialBundleStartLevel(int) // sets the start level for
                                   all bundles installed afterwards

or:

setBundleStartLevel(Bundle, int) // sets the start level for a
                                    specific bundle

Of course, it could well be that JBoss already provides a mechanism that does exactly this, but at least this should give you a starting point.

Upvotes: 1

Related Questions