Configuring auto-provisioned features
You can enable features to be automatically provisioned when other features or sets of features are provisioned.
About this task
- The feature is provisioned automatically when all required features are 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 must be provisioned before the runtime automatically provisions this feature.
- Add the
IBM-Provision-Capability
to the manifest header. The format of theIBM-Provision-Capability
header uses standard OSGi LDAP filters. - Deploy the feature to the server.
Results
Automatic installation of auto-provisioned features
In the following example, if featuresrequiredFeature1-1.0
and
requiredFeature2-1.0
are provisioned, this feature is automatically provisioned. If
either of these required features are removed from the server.xml file, this
feature is 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))"
If all the required features are also installed, auto-provisioned features can be installed automatically.
To configure a feature to be
auto-installed, the
IBM-Install-Policy
header must be added to the feature
manifest. The header is optional. If the IBM-Install-Policy
header is specified,
the following values are valid:manual
: The feature is not auto-installed.when-satisfied
: If all required features are installed, the feature is auto-installed.
If the header is not set, then the feature is not auto-installed, which is equivalent to
setting the IBM-Install-Policy
header to manual
.