packagePrefixExclusions property

Specifies a pipe-separated list of domains and subdomains of the Java™ packages that you do not want to include in stack traces.

If you use the property stackTraceDepth with the property packagePrefixExclusions, pureQuery ignores stackTraceDepth.

There is no default value. You can use this property only when you are capturing statements.

For example, you might want to exclude entries for Java packages in an IBM® product and another application. IBM's Java packages begin with com.ibm. The Java packages for the other application might all start with com.other. You can do the filtering like this:
com.ibm|com.other
packagePrefixExclusions does not accept implicit or explicit wildcards. For example, neither of these entries are valid for filtering out packages that begin with com.ibm:
  • Implicit wildcard
    com.i
  • Explicit wildcard
    com.i*

You can set this property locally or globally, as explained in How to set properties for client optimization. If you set it in a pdq.properties file, the value of the property applies to all pureQueryXML files that are in the applications that reference the pdq.properties file. If you set the property as a JVM system property, the value applies to all of the pureQueryXML files that are in the application that you start with the java command.

If you are performing incremental capture: If you change the value for packagePrefixExclusions after you capture statements, then in subsequent capturing, pureQuery compares existing stack traces with new stack traces. If the new stack trace that results from the change to packagePrefixExclusions is part of the existing stack trace, pureQuery does not capture the new stack trace.

Example:

For example, here is a stack trace that pureQuery captured with packagePrefixExclusions set to Test2:

<trace>
	<traceEntry classFile="myClass" containingPkg="com.myPackage" fileName="Unknown Source" isNative="false" lineNo="" method="addBatch"/>
	<traceEntry classFile="jas114962" containingPkg="Test4" fileName="jas114962.java" isNative="false" lineNo="127" method="funaddbatch1"/>
	<traceEntry classFile="jas114962" containingPkg="Test4" fileName="jas114962.java" isNative="false" lineNo="117" method="funaddbatch_new"/>
	<traceEntry classFile="jas114962" containingPkg="Test3" fileName="jas114962.java" isNative="false" lineNo="118" method="funaddbatch_new"/>       
</trace>

Suppose that you change the value of packagePrefixExclusions so that it now includes Test4: Test2|Test4

When you perform incremental capture and run the same SQL statement, the following stack trace results:

<trace>
	<traceEntry classFile="myClass" containingPkg="com.myPackage" fileName="Unknown Source" isNative="false" lineNo="" method="addBatch"/>
	<traceEntry classFile="jas114962" containingPkg="Test3" fileName="jas114962.java" isNative="false" lineNo="118" method="funaddbatch_new"/>
</trace>

However, pureQuery does not capture this new stack trace. Instead, pureQuery keeps the previous stack trace because the entire new stack trace is a part of the original stack trace.

If you change the value of packagePrefixExclusion to Test4, the following stack trace results:

<trace>
	<traceEntry classFile="myClass" containingPkg="com.myPackage" fileName="Unknown Source" isNative="false" lineNo="" method="addBatch"/
	<traceEntry classFile="jas114962" containingPkg="Test3" fileName="jas114962.java" isNative="false" lineNo="118" method="funaddbatch_new"/>
	<traceEntry classFile="jas892832" containingPkg="Test2" fileName="jasmanoj.java" isNative="false" lineNo="114" method="funaddbatch"/>
	<traceEntry classFile="jas892832" containingPkg="Test2" fileName="jasmanoj.java" isNative="false" lineNo="91" method="main"/>
</trace>

In this case, pureQuery records the new stack trace, which was not a part of the original stack trace.


Feedback