Auto-provisioning allows a feature to have dependencies
on features that must be provisioned, before it can be provisioned.
About this task
An auto-provisioned feature is a feature that has dependencies
on other features. Because of the dependencies, the lifecycle of the
auto-provisioned feature is as follows:
- The feature is provisioned automatically when all required features
have been provisioned.
- The feature is de-provisioned automatically when any of the required
features are de-provisioned.
Procedure
To configure a feature to be auto-provisioned, follow
these steps:
- Determine which features should be provisioned before the
runtime automatically provisions this feature.
- Add the IBM-Provision-Capability to the
manifest header. The format of the IBM-Provision-Capability header
uses standard OSGi LDAP filters.
- Deploy the feature to the server.
Results
The feature automatically provisions when the required features
have been provisioned.
Example
In the following example, if features
requiredFeature1-1.0 and
requiredFeature2-1.0 are
provisioned, this feature will be automatically provisioned. If either
of these required features are removed from the server.xml file, this
feature will be automatically de-provisioned.
IBM-Provision-Capability:
osgi.identity; filter:="(&(type=osgi.subsystem.feature)(osgi.identity=requiredFeature1-1.0))",
osgi.identity; filter:="(&(type=osgi.subsystem.feature)(osgi.identity=requiredFeature2-1.0))"