The cmpopt script

The cmpopt script analyzes an enterprise bean JAR file to determine whether methods in a container-managed persistance (CMP) bean are read or update. If a method is specified as read-only in its deployment descriptor, the container can avoid a write operation to the database.

This function is a technology preview. For details on how cmpopt performs the analysis, see the /QIBM/ProdData/WebAS5/Base/bin/cmpopt.README.txt file.

Product

The cmpopt script is available with WebSphere Application Server only.

Authority

No special authority is needed to run this script. However, have appropriate authority to the JAR file being analyzed or updated.

Syntax

The syntax of the cmpopt script is:

cmpopt jarfile [ -report | -noreport ] [ -noupdate | -update ]
 [ -noFindForUpdate | -findForUpdate ] [ -ignoreOpenFields ]
 [ -ignoreNativeMethods ] [ -noWarn ] [ -version ] [ -usage ] [-help | -?]

Parameters

The parameters of the cmpopt script are:

Examples

These examples demonstrate correct syntax:

cmpopt /home/cmpopt/corp.jar

This example analyzes the CMP field usage of the enterprise beans in corp.jar and writes the result of this analysis to stdout.

cmpopt /home/cmpopt/corp.jar -update

This example analyzes the CMP field usage of the enterprise beans in corp.jar. The result of this analysis is written to stdout, and the JAR file is updated with the results by setting the enterprise bean methods to be read or update.