Comments on: How to trace a java application through a connection pool using DBMS_MONITOR https://technology.amis.nl/2007/04/04/how-to-trace-a-java-application-through-a-connection-pool-using-dbms_monitor-6/ Friends of Oracle and Java Wed, 24 Jun 2015 09:59:44 +0000 hourly 1 http://wordpress.org/?v=4.2.2 By: Harm Verschuren https://technology.amis.nl/2007/04/04/how-to-trace-a-java-application-through-a-connection-pool-using-dbms_monitor-6/#comment-4514 Wed, 11 Apr 2007 14:03:55 +0000 http://technology.amis.nl/blog/?p=1794#comment-4514 Just thoughs:
Thinking outside the box, you could set any string-value as client-ID: it does not have to be the current user. For instance you could make a very elaborate unit test in which you also include the database performance (and suppose this is usefull…). Then, you could set the name of the unit test, or create a logical name for each unit test, and use this name as client-ID. When tkprof’ing the tracefiles you obtain performance characteristics per unit test.

]]>
By: Harm Verschuren https://technology.amis.nl/2007/04/04/how-to-trace-a-java-application-through-a-connection-pool-using-dbms_monitor-6/#comment-4513 Wed, 11 Apr 2007 14:01:10 +0000 http://technology.amis.nl/blog/?p=1794#comment-4513 Yes you can. I’m not too familiar with hibernate or toplink, so I can’t point you to the exact classes/methods, but I’m told both frameworks do have classes and methods which are invoked each time a database transaction is started. This is where you invoke the forementioned prepared statement.

In addition, you could create a class that invokes the prepared statement to set the client-ID an inject this into you’re application using AOP.

]]>
By: queequeg https://technology.amis.nl/2007/04/04/how-to-trace-a-java-application-through-a-connection-pool-using-dbms_monitor-6/#comment-4512 Wed, 04 Apr 2007 13:05:12 +0000 http://technology.amis.nl/blog/?p=1794#comment-4512 Is it possible to do the same thing without using ADF BC, i.e, with EJB/Toplink? What class do i have to extend to implement the prepareSession method?

]]>