This article explains how to start tracing stand-alone application using JENNIFER. Cars Application is used as an example application. The application illustrates Java and MySQL database example.
There are four tasks that can be executed from this application (New, Delete, Refresh and Save).
Installing and configure JENNIFER agent
In order for JENNIFER to start tracing transactions from this application, we need to find out our target start point first. In JENNIFER agent configuration file we set tx_server option to start tracing the main class and main method as follow:
After starting the application, JENNIFER was able to hock-up to this application, but no transactions are identified yet.
We enabled tracing external transactions port (MySQL port 3306). By examining the stacktrace extracted from the application's transactions, we noticed that each of the following tasks (Refresh and Save) handled by inner class located within the CarView class.
We tested te (RefreshTask, SaveTask) by adding the classes names and methods to tx_server option like follow:
After restarting the application, transactions were successfully identified but there was no SQL data.
We did more investigation to find the start point for the other two tasks (New, Delete). The finaltx_server option looked like follow:
In order to detect SQL, we rebuilt LWST module. We disabled JDBC hocking when we build the LWST module by editing "lwst40.sh" file and set build_jdbc=false
set OPT=%OPT% -Dbuild_jdbc=false
Also in JENNIFER agent configuration file, we disabled the following option (enable_jdbc_datasource_trace)
Finally, we enabled direct sql tracing by add the following option:
After restarting the agent, SQL information were successfully detected.
In order to start tracing a Stand-alone application, we need to identify the application's starting point. The starting point can be found by enabling remote port trace. However, the best way to find the starting point for such applications is through communications with the application's developer.