1. Not sure if you are specifically trying to track connection leaks with the Hibernate logging you are using. You can do something very similar by enabling conection leak tracing as discussed
by IBM here. 2. Amplifying on that, you can then use intelligent management health policies to trigger output showing when the connection was acquired and the associated stack traces where the application using a custom action either periodically or on a specific condition (for example when more than a specified number of connections in the pool are in use). The attached file is a simple jython script that was used with a wrapper shell script when triggered with health policies. You can pick up the server name from the "server" environment variable when the health condition was triggered.
3. The trace logging set up by the connection leak logic is very low overhead and shouldn't impact your performance.
John
------------------------------
John Kroll
Johnson Controls
Milwaukee WI
1-234-456-7890
------------------------------
Original Message:
Sent: Fri September 17, 2021 06:16 AM
From: Fepzi Bajaj
Subject: WebSphere Default JPA Log For DB Connection Acquire And Release Time
WebSphere uses OpenJPA as default. I am familiar with Hibernate. But I would want to try out the default JPA implementation in WebSphere. I have a question. Currently we use Hibernate logs to monitor when db connection is getting acquired & getting released by our application threads. It helps us in debugging & performance optimisation. Does OpenJPA have something similar as that? Anyone knows some way to do that? We want to try it out in a test application.
What I am looking for is something similar to this https://www.w3spot.com/2021/04/log-when-jdbc-connection-is-acquired.html . If you have alternate better way to track it, please share that also.
------------------------------
Fepzi Bajaj
------------------------------