IBM Support

Custom Properties for improving application startup in WebSphere Application Server

Technote (troubleshooting)


Problem(Abstract)

In WebSphere Application Server traditional V9.0, Contexts and Dependency Injection (CDI) 1.2 is enabled by default. Enablement of CDI 1.2 might increase unnecessary performance overhead if the application does not use CDI.

Symptom

The application starts slowly.


Resolving the problem

Disable CDI processing steps for applications or archives that do not contain CDI content, and for which the steps are unnecessary. The following Java custom properties and manifest attributes are introduced to disable CDI processing steps:


    Name: com.ibm.ws.cdi.enableImplicitBeanArchives
    Allowed Values: true, false
    Default Value: true
    Description: By setting the com.ibm.ws.cdi.enableImplicitBeanArchives custom property to false, CDI-related annotation scanning steps are disabled for archives that do not contain a bean descriptor, for example, the beans.xml file.

    Name: com.ibm.ws.cdi.enableCDI
    Allowed Values: true, false
    Default Value: true
    Description: By setting the com.ibm.ws.cdi.enableCDI custom property to false, all CDI steps are disabled. Set the value to false if no CDI is needed on the server level.


In addition to these Java custom properties that impact all applications that are deployed to the target server, the following properties can be set in the server-wide amm.filter.properties file and as manifest attributes of application archive files.
    System Property Name: com.ibm.ws.cdi.enableImplicitBeanArchives
    Property and Manifest Attribute Name: Enable-Implicit-Bean-Archive
    System Property Name: com.ibm.ws.cdi.enableCDI
    Property and Manifest Attribute Name: Enable-CDI

Note:
  • The amm.filter.properties file is located at WAS_HOME/properties/amm.filter.properties.
  • Manifest attributes are set as main manifest attributes in Java EE-related application archive files, such as EAR, WAR, RAR, and JAR files.
  • The Enable-CDI property affects an entire application. Set this property on the Manifest.mf file of the application. Setting this property only for a module archive has no effect.

In this way, the property value from the least enclosing scope is used. An attribute value on a module manifest takes precedence over the attribute value on the application. The attribute value on the application takes precedence over a java custom property value. The java custom property value takes precedence over a property value set in the amm.filter.properties file.

For more information about similar properties, see Reducing annotation searches during application deployment in IBM Knowledge Center.

Related information

WebSphere Application Server Version 9.0 release notes


Cross reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Application Server for z/OS Not Applicable z/OS 9.0.0.0

Historical Number

RTC215690

Document information

More support for: WebSphere Application Server

Software version: 9.0.0.0

Operating system(s): AIX, HP-UX, IBM i, Linux, OS X, Solaris, Windows, iOS, z/OS

Software edition: Base, Network Deployment

Reference #: 1983564

Modified date: 23 June 2016