Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This instrumenter configuration file prevents instrumentation from being applied to all calls to Java runtime classes (java.*) methods that take an int[] parameter from the stop() methods in the xmp.wfm package and sub-packages.

<?xml version='1.0'?>
<instrumenter-config>
     <ignore-config>
          <java-classes/>
               <invocation-relationship>
                    <java-class>
                         <class-name> xmp.wfm.* </class-name>
                         <methods>
                              <method>
                                   <name> stop </name>
                                   <params> <params/>
                              </method>
                         </methods>
                    </java-class>
                    <invoked-method> java.*.*(int[]) </invoked-method>
               </invocation-relationship>
          </java-classes>
     </ignore-config>
</instrumenter-config>

About instrumenting calls to EJB business method implementations

...

The marker classes and interfaces are expected to identify the EJB skeletons. As an example, consider these application classes:

public interface Account extends EJBObject {
     public void deposit(float amount);
}
public class AccountEJB implements SessionBean {
     public void deposit(float amount)
          updateAccount(getCurrentBalance() + amount);
     }
}

Under WebLogic 7.0, EJB skeletons extend the weblogic.rmi.internal.Skeleton class. The “Calls to EJB implementations” instrumentation feature can be configured to find the skeleton and instrument the call to deposit. As an example, the WebLogic skeleton might look as follows:

public class AccountEJB_bfqop_WKSkel
extends Skeleton
implements Account {
     public void init() { /* ... */ }
     public void invoke() { /* ... */ }
     public void deposit(float amount) {
          impl.deposit(amount);
     }
}

 

In this case, the call from AccountEJB_bfqop_WKSkel.deposit to AccountEJB.deposit is instrumented because the call is to a method with the same name and signature as the caller.

...

The EJBImpl.xml file looks like the following example:

<instrumenter-config>
     <planner-config>
          <class-name>com.precise.javaperf.instrument.planner. CallsToEJBImplementationPlanner
          </class-name>
          <property>
               <name> skeletonMarkerClass </name>
               <value> weblogic.ejb20.internal.BaseEJBObject </value>
          </property>
          <property>
               <name> logBeginMethodName </name>
               <value> logBeginEjbServer </value>
          </property>
          <property>
               <name> logEndMethodName </name>
               <value> logEndEjbServer </value>
          </property>
          <property>
               <name> invocationType </name>
               <value> EJBImpl </value>
          </property>
     </planner-config>
</instrumenter-class>

The <class-name> element identifies the name of the new “pluggable instrumentation planner.” The following table lists the recognized properties.

Table 18-1    Recognized 1 Recognized properties

Property

...

nameMultiplicityDescription

logBeginMethodName

OptionalIdentifies the logger method to call to report calls to EJB business methods.

...

logEndMethodNameOptionalIdentifies the logger method to call to report calls to EJB business methods.

...

invocationTypeOptionalIdentifies

...

how the logger events show up in Precise for J2EE.

...

skeletonMarkerClass

Any NumberIdentifies the classes that an EJB skeleton must extend. Only classes that extend a skeleton class or implement a skeleton interface are searched for calls to methods with matching name and signature.

...

skeletonMarkerInterface

Any NumberIdentifies the classes that an EJB skeleton must implement. Only classes that extend a skeleton class or implement a skeleton interface are searched for calls to methods with matching name and signature.

...

implementationMarkerClass

Any NumberIdentifies

...

the classes that must be extended by calls with a matching name and signature.

...

implementationMarkerInterface

Any NumberIdentifies the classes that must be implemented by calls with a matching name and signature.
Applying instrumentation using the "Calls to EJB" instrumentation feature

...

To apply instrumentation using the “Calls to EJB” instrumentation feature1.    Add

  1. Add the EJBImpl.xml file to the InstrumenterConfigList.xml file:
    <instrumenter-config-list>
         <config-file>
              EJBImpl.xml
         </config-file>
    </instrumenter-config-list>

...

  1. Restart the application server.

Anchor
AboutInstrumenterConfigFileReference
AboutInstrumenterConfigFileReference
About instrumenter configuration file reference

The purpose and schema of the various files that configure instrumentation for a monitored JVM is described in About the master configuration file, About the instrumenter configuration files, About the structure of instrumenter configuration files, and About common instrumenter configuration matching techniques.

Figure 18-1    Instrumenter 1 Instrumenter Configuration

 Image Added

About the master configuration file

...