The OpenJPA Fetch Statistics Tool (FST) monitors persistent field access
and helps determine which fields in an application are not used. This tool
is a development / test time tool that can help a developer properly tune
Currently, FST only works with runtime enhancement (javaagent or in JEE
The persistent fields which satisfy all the following conditions will be
The field is fetched eagerly.
The field is not a primary key.
The field is not defined as a version field.
The latest OpenJPA FST jar file can be download from the SNAPSHOT Repository
or can be built from the source code in [svn|https://svn.apache.org/repos/asf/openjpa/trunk/openjpa-tools/openjpa-fetch-statistics/]
by using Maven 2.2.1 and Java SE 6.
JSE - Append the path of openjpa-fetch-statistics-version-SNAPSHOT.jar
file to the classpath prior to lanuching the JVM.
OSGi -- ?? -- Probably need another module that creates a proper bundle.
Statistics Collecting and Monitoring
There will be a large performance impact when running this tooling. It is
not supported, nor recommended for production use. This tool should not be
used on a production machine.
When this tool is configured, it will be active for all persistence units
in the JVM. Statistics will be dumped via the openjpa.Runtime channel with
the INFO level every 10 minutes, or when the JVM terminates.