jdbc instrumentation using 'asm' byte code manipulation framework
I am using The ASM bytecode manipulation framework to instrument my classes. I would like to capture sql query of prepared statements and callable statements using asm. Please help.
For example given below is the code for prepared statement.
PreparedStatement pStmt= con.prepareStatement("Select * from emp");
Here I would like to print the sql triggerd by pStmt.executeUpdate() and response time taken by executeUpdate method. I am aware how to get respose time taken by executeUpdate method, but I am unable to get query triggered by executeUpdate method at byte level.
For example the output should be like:
executeUpdate() method has triggered the sql query : "Select * from emp" and this method executeUpdate() took 10 millisecs of time to execute
Thanks in advance