This topic applies to WebSphere Application Server Liberty V8.5.5.9 and earlier. For the latest Liberty topics, see the WebSphere Application Server Liberty documentation.

Feature management

Features are the units of functionality by which you control the pieces of the runtime environment that are loaded into a particular server.

Use the configuration file server.xml to declare which features you want to load. The set of features is enclosed within the <featureManager> element, and each feature within the <feature> subelement. For example:
<server>
  <featureManager>
    <feature>servlet-3.0</feature>
    <feature>localConnector-1.0</feature>
  </featureManager>
</server>

You can specify any feature in the server configuration file. Some features include other features within them. The same feature can be included in one or more other features. At run time, the feature manager computes the combined list of content that is required to support the requested set of features.

For information about the main available features, see Liberty features. For information about the restrictions that apply to each feature, see Runtime environment known issues and restrictions.

Dynamic changes to feature configuration

When you change the feature configuration, the feature manager recalculates the list of required bundles, stops and uninstalls those bundles that are no longer required, and installs and starts any additions. Therefore, all features are designed to cope with other features that are being dynamically added or removed.

[8.5.5.4 or later]

Singleton Features

With the delivery of the first set of features for Java™ EE 7, there are now two versions of the same feature:
  • servlet-3.0
  • servlet-3.1
Unlike other application servers, you can choose which version of this feature to use in a server configuration. servlet-3.0 preserves behavior for existing applications, while servlet-3.1 provides new capabilities for new or modified applications. Although there is a choice of specification versions, no additional configuration properties are required, or provided, to control individual differences between the two versions.
The servlet feature is a singleton feature, which means that you can configure only one version for use in a server: either servlet-3.0 or servlet-3.1. If you have applications that need different versions of the servlet feature, you must deploy them in different servers. Many other features include the servlet feature as a dependency. In the WebSphere® Liberty product, these features have been updated to work with either version. This ensures that you can configure a complete "stack" of features when you use servlet-3.1, but features from other sources might not have been updated to "tolerate" servlet-3.1. To enable features to "tolerate" servlet-3.1, modify the feature manifest as follows:
Subsystem-Content: com.ibm.websphere.appserver.servlet-3.0; ibm.tolerates:="3.1"; type="osgi.subsystem.feature"
If your server configuration includes multiple versions of a singleton feature, either through direct configuration in the server.xml file, or through feature dependencies, that configuration is in error and neither version of that feature is loaded. This error results in a message similar to the following:
[ERROR ] CWWKF0033E: The singleton features servlet-3.1 and servlet-3.0 cannot be loaded at the same time. The configured features servlet-3.1 and servlet-3.0 include one or more features that cause the conflict.
To resolve this problem, ensure that the configured features all specify, or tolerate, the same version of that singleton feature. If you have hard requirements on both feature versions, you must move some of your applications to a different server. For more information on tolerating singleton features, see Tolerating singleton features.

Superseded features

The superseded label on a feature indicates that a new feature or a combination of features might provide an advantage over using the superseded feature. For example, new, finer-grained features might be used in place of the superseded one in order to reduce the server footprint by excluding content that might not be necessary. The new feature or features might not completely replace the function of the superseded feature, so you must consider your scenario before deciding whether to change your configuration. Superseded features remain completely supported and valid for use in your configuration; the superseded label just provides an indication that you might be able to improve your configuration.

Very occasionally, a feature that includes other features is superseded by a new version of the feature that does not include all those features; the features that are not included in the new version are considered to be separated. If your application needs to use the functions of a separated feature, you must explicitly add the separated feature to your configuration.

For example, featureA and featureB have the following conditions:
  • featureA-1.0 includes featureB-1.0
  • featureA-2.0 does not include featureB-1.0 (or any later versions of featureB)
If your application uses featureB functions, either of these configurations will work:
  • Include featureA-1.0 in your server.xml file
  • Include featureA-2.0 and featureB-1.0 in your server.xml file

Icon that indicates the type of topic Concept topic



Timestamp icon Last updated: Tuesday, 12 December 2017
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-libcore-mp&topic=cwlp_feat_mgmt
File name: cwlp_feat_mgmt.html