Fuse ESB Fabric Feature bundle load order

314 views Asked by At

Is there a way of controlling the order in which OSGi bundles inside a fuse esb fabric feature are loaded so that later bundles are dependent on the complete loading of earlier ones? For example, in the following feature, I want the simple-client module to only start up once the previous bundles have fully loaded:

  <features name="simple-service-features">
    <feature>
       <bundle>mvn:com.company/simple-datasource/0.0.0</bundle>
       <bundle>mvn:com.company/simple-model/0.0.0</bundle>
       <bundle>mvn:com.company/simple-service/0.0.0</bundle
       <bundle>mvn:com.company/simple-client/0.0.0</bundle>
    </feature>
  </features>
1

There are 1 answers

0
Sivaram On

You can use the attribute start-level of bundle tag in the features.xml to sequence the OSGI bundles start.

A start level is associated with every bundle. The start level is a positive integer value that controls the order in which bundles are activated/started. Bundles with a low start level are started before bundles with a high start level. Hence, bundles with the start level, 1, are started first and bundles belonging to the kernel tend to have lower start levels, because they provide the prerequisites for running most other bundles.