How can I create a custom PDB in order to monitor an in-house application?
Any Dx Agent release.
About the classes that you want to monitor, you can instrument each one by checking what trace group you want to enable, as long as the Java components is supported by default:
Components That Default PBDs Trace
Applying in one example:
Let's try to move to one of your examples "com.ibm.ejs.container.EJSContainer::EjbPreInvoke"
1. Usually you want to define a flag to be able to toggle on/off easily:
SetFlag: EJSContainerTracing
TurnOn: EJSContainerTracing
2. Identify the class you want to instrument:
IdentifyClassAs: com.ibm.ejs.container.EJSContainer EJSContainerTracing
3. Instrument specific method with tracer:
TraceOneMethodIfFlagged: EJSContainerTracing EjbPreInvoke BlamePointTracerDifferentInstances "EJSContainer|{classname}"
TraceOneMethodIfFlagged: EJSContainerTracing preInvokeActivate BlamePointTracerDifferentInstances "EJSContainer|{classname}"
You can use the below structure to mount any custom group to assign any custom classes.
TurnOn: MyCustomTracerGroup
SetFlag: MyCustomTracerGroup
IdentifyClassAs: my.class.acme.com MyCustomTracerGroup
IdentifyInheritedAs: my.class.acme.com MyCustomTracerGroup
TraceComplexMethodsIfFlagged: MyCustomTracerGroup BlamePointTracer "Custom|{packageandclassname}|{method}"
The custom group trace can be defined as below examples:
IdentifyAllClassesAs
Above examples, I used IdentifyClassAs and TraceOneMethodIfFlagged, you can drill down by checking the directives' documentation as above. The best way to find a good example is to check any autoprobe log.
You can also use the same flag to group all your custom instrumentations.