d8888 888 888      88888888888 888      d8b                                 888       888          888       .d8888b.           888                               
      d88888 888 888          888     888      Y8P                                 888   o   888          888      d88P  Y88b          888                               
     d88P888 888 888          888     888                                          888  d8b  888          888      Y88b.               888                               
    d88P 888 888 888          888     88888b.  888 88888b.   .d88b.  .d8888b       888 d888b 888  .d88b.  88888b.   "Y888b.   88888b.  88888b.   .d88b.  888d888 .d88b.  
   d88P  888 888 888          888     888 "88b 888 888 "88b d88P"88b 88K           888d88888b888 d8P  Y8b 888 "88b     "Y88b. 888 "88b 888 "88b d8P  Y8b 888P"  d8P  Y8b 
  d88P   888 888 888          888     888  888 888 888  888 888  888 "Y8888b.      88888P Y88888 88888888 888  888       "888 888  888 888  888 88888888 888    88888888 
 d8888888888 888 888          888     888  888 888 888  888 Y88b 888      X88      8888P   Y8888 Y8b.     888 d88P Y88b  d88P 888 d88P 888  888 Y8b.     888    Y8b.     
d88P     888 888 888          888     888  888 888 888  888  "Y88888  88888P'      888P     Y888  "Y8888  88888P"   "Y8888P"  88888P"  888  888  "Y8888  888     "Y8888  
                                                                 888                                                          888                                        
                                                            Y8b d88P                                                          888                                        
                                                             "Y88P"                                                           888   

All Things WebSphere

Concerns and issues relating to all versions of WebSphere Application Server

Friday, May 18, 2012

 

How to speed up annotation processing in WAS V7/V8


There are a number of options to speed up annotations processing -
Those are mentioned in this technote...

1. Specify ​metadata-complete="true"​ in the Deployment Descriptor.  This means that NO annotation scanning will take place.

2. Move 3rd party jars that don't need to be scanned for annotations outside of the EAR into a Shared Lib,

3. Specify 3rd party jars  (from Spring and Hibernate) in the amm.filter.properties file.
http://www-304.ibm.com/support/docview.wss?rs=180&uid=swg1PK87053

4. Utilize echniques listed in the blog post on Performance considerations for deploying very large Java Enterprise Edition (JEE) applications
http://wasdynacache.blogspot.com/2011/05/websphere-application-server.html

5. Reducing annotation searches during application deployment
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.doc%2Finfo%2Fae%2Fae%2Ftrun_app_reduce_annot.html


6. org.eclipse.jst.j2ee.commonarchivecore.FILTERBINARIES  - A custom property that provides a list of files and directories that should not be processed as a part of the server start process.


Gory details

http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.doc%2Finfo%2Fae%2Fae%2Fxrun_jvm.html

com.ibm.ws.amm.scan.context.filter.archives


Use this property to provide a list of archives, or utility JAR files, that do not contain annotations. Archives or utility JAR files specified for this property are not be scanned for annotations.
When a Java Platform, Enterprise Edition (Java EE) 5 or 6 application is deployed or updated, the Annotations Metadata Manager (AMM) facility scans all of the annotation metadata. This scanning process can negatively affect the amount of time required to deploy an application. If the application includes archives or utilities that do not contain annotations, you can list these archives and utilities as the value for this property. If the application includes Java Packages that do not contain annotations, you can list them as the value for the Ignore-Scanning-Packages property.
The values specified for this properties are case sensitive, and must be expressed as a single string with a comma followed by a space used to separate the names of the archives or utility JAR files. Wildcards and REGEX expressions are not permitted.
As an alternative to using this custom property, you can add the Ignore-Scanning-Archives property to one of the following files or modules, and specify the archives and utilities that you do not want scanned as the value of that property:
  • The amm.filter.properties file that is located in the was_home/properties directory.
  • The amm.filter.properties file that is located in the profile_home/properties directory
  • The manifest file of an application, META-INF/MANIFEST.MF
  • The manifest of a web or Enterprise JavaBeans (EJB) module within an application
Values specified in the amm.filter.properties files are merged with those found in this custom property to form a server scoped set of filters. This merged set of filters applies to all of the applications that are deployed on that server.
Values specified in the manifest file of an application are merged with the server scoped set of filters to form a module scoped superset that applies to all modules within that application.
Values specified in the manifest file of a web or Enterprise JavaBeans (EJB) module are merged with the module scoped set of filters. This merged set of filters only applies to that module.
Avoid trouble Avoid trouble: Exercise caution if you update a manifest file. Manifest files have line length limitations, and other constraints that must be adhered to.
Example:
Ignore-Scanning-Archives : ant.jar,  avalon-framework-4.2.0.jar, axis.jar, CICS.jar, xerces.jar

com.ibm.ws.amm.scan.context.filter.packages.


Use this property to provide a list of Java Packages that do not contain annotations. The Java classes specified for this property are not scanned for annotations.
When a Java Platform, Enterprise Edition (Java EE) 5 or 6 application is deployed or updated, the Annotations Metadata Manager (AMM) facility scans all of the annotation metadata. This scanning process can negatively affect the amount of time required to deploy an application. If the application includes Java Packages that do not contain annotations, you can list them as the value for this property. If the application includes archives or utilities that do not contain annotations, you can list them as the value for the Ignore-Scanning-Archives property.
The value specified for this property are case sensitive and must be expressed as a single string with a comma followed by a space used to separate the names of the Java Packages. Wildcards and REGEX expressions are not permitted.
As an alternative to using this custom property, you can add the Ignore-Scanning-Packages property to one of the following files or modules, and specify the archives and utilities that you do not want scanned as the value of that property:
  • The amm.filter.properties file that is located in the was_home/properties directory
  • The amm.filter.properties file that is located in the profile_home/properties directory
  • The manifest file of an application, META-INF/MANIFEST.MF
  • The manifest of a web or Enterprise JavaBeans (EJB) module within an application
Values specified in the amm.filter.properties files are merged with those found in this custom property to form a server scoped set of filters. This merged set of filters applies to all of the applications that are deployed on that server.
Values specified in the manifest file of an application are merged with the server scoped set of filters to form a module scoped superset that applies to all modules within that application.
Values specified in the manifest file of a web or Enterprise JavaBeans (EJB) module are merged with the module scoped set of filters. This merged set of filters only applies to that module.
Avoid trouble Avoid trouble: The following example is properties file centric and cannot be used as is for a manifest file. Manifest files have a 72 byte line length limit, as well as other constraints that must be adhered to.
Example:
Ignore-Scanning-Packages : org.apache.avalon, org.apache.batik, org.apache.commons

com.ibm.ws.application.enhancedScanning

Use this property to disable several optimizations that decreases the time to deploy and start enterprise applications. The optimizations primarily involve Java Platform, Enterprise Edition (Java EE 5)-enabled applications. When you set this property to false, the following updates are disabled:
  • A new cache for modules files
  • A new cache for module classloading
  • Alternate code paths for annotation processing.
If you set this property to false, you might experience decreases in performance. Thus, by default, this property value is set to true

Comments:

Post a Comment

Subscribe to Post Comments [Atom]



Links to this post:

Create a Link



<< Home

Archives

December 2006   September 2008   January 2009   February 2009   March 2009   September 2009   October 2009   November 2009   December 2009   January 2010   February 2010   March 2010   April 2010   October 2010   January 2011   February 2011   April 2011   May 2011   June 2011   July 2011   August 2011   September 2011   October 2011   November 2011   December 2011   January 2012   February 2012   March 2012   April 2012   May 2012   June 2012   July 2012   August 2012   September 2012   October 2012   November 2012   January 2013   May 2013   June 2013   July 2013   September 2013   October 2013  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]