Troubleshooting
Problem
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:
Note:
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
For more information about similar properties, see Reducing annotation searches during application deployment in IBM Knowledge Center.
- Name: com.ibm.ws.cdi.enableImplicitBeanArchives
Value: false
Description: By setting thecom.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, thebeans.xml
file.
Name: com.ibm.ws.cdi.enableCDI
Value: false
Description: By setting thecom.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.
For navigation see "Setting JVM Custom Properties"
https://www.ibm.com/support/knowledgecenter/SSEQTP_9.0.5/com.ibm.websphere.base.doc/ae/xrun_jvm.html
https://www.ibm.com/support/knowledgecenter/SSEQTP_9.0.5/com.ibm.websphere.base.doc/ae/xrun_jvm.html
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 atWAS_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.
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
[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF014","label":"iOS"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"},{"code":"PF022","label":"OS X"}],"Version":"9.0.0.0","Edition":"Base;Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS7K4U","label":"WebSphere Application Server for z\/OS"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"9.0.0.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Historical Number
RTC215690
Was this topic helpful?
Document Information
Modified date:
09 March 2020
UID
swg21983564