How to install a feature on startup in Fuse ESB?

Solution Unverified - Updated -

Issue

  • Configuring a feature to start at boot time in Fuse ESB?
  • Is there any way to automatically install a feature at start up?

Resolution

1) Create a features.xml and add all the bundles including dependent feature that need to be installed at boot time.

Here is a sample features.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<features>
    <feature name="my-project-feature" version="1.0">
        <feature version="2.8.0-fuse-01-13">camel-cxf</feature>
        <bundle>mvn:org.mycompany.project/foo/1.0</bundle>
        <bundle>mvn:org.mycompany.project/bar/1.0</bundle>
    </feature>
</features>

Suppose it is located in maven repository and can be accessed through \<maven.repo.dir>/org/mycompany/project/my-feature/1.0/my-feature-1.0-features.xml

And it also depends another feature "camel-cxf" of version 2.8.0-fuse-01-13.

2) Add the feature to the "featuresRepositories" list within the \<install.dir>/etc/org.apache.karaf.features.cfg

For example:

featuresRepositories=...,mvn:org.apache.camel.karaf/apache-camel/2.8.0-fuse-01-13/xml/features,mvn:org.mycompany.project/my-feature/1.0/xml/features

3) Add the feature "my-feature" to the "featuresBoot" list also contained within the \<install.dir>/etc/org.apache.karaf.features.cfg

For example:

featuresBoot=...,camel-cxf,my-feature,...

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments