How to trace the connection pool in a Java Web application - DBMS_APPLICATION_INFO

Posted by Cleiton Garcia on Stack Overflow See other posts from Stack Overflow or by Cleiton Garcia
Published on 2009-05-06T12:22:51Z Indexed on 2010/05/03 1:08 UTC
Read the original article Hit count: 370

Hello,

I need improve the traceability in a Web Application that usually run on fixed db user. The DBA should have a fast access for the information about the heavy users that are degrading the database.

5 years ago, I implemented a .NET ORM engine which makes a log of user and the server using the DBMS_APPLICATION_INFO package. Using a wrapper above the connection manager with the following code:

DBMS_APPLICATION_INFO.SET_MODULE('" + User + " - " + appServerMachine + "','');

Each time that a connection get a connection from the pool, the package is executed to log the information in the V$SESSION.

Has anyone discover or implemented a solution for this problem using the Toplink or Hibernate? Is there a default implementation for this problem?

I found here a solutions as I implemented 5 years ago, but I'd like to know with anyone have a better solution and integrated with the ORM.

http://stackoverflow.com/questions/53379/using-dbmsapplicationinfo-with-jboss

My application is above Spring, the DAO are implemented with JPA (using hibernate) and actually running directly in Tomcat, with plans to (next year) migrate to SAP Netwevare Application Server.

Thanks.

© Stack Overflow or respective owner

Related posts about logging

Related posts about application-pool