Re: How to Log MySQL DB Connection Obtain & Release Time in OpenJPA?
Posted by: Filipe Silva
Date: September 17, 2021 07:26AM

Assuming Connector/J is being used, you can implement a `com.mysql.cj.jdbc.interceptors.ConnectionLifecycleInterceptor` and enable it with the connection option connectionLifecycleInterceptors. Some of the most important connection events are intercepted and you can do whatever you want in your interceptor code.

IHTH.

Options: ReplyQuote


Subject
Written By
Posted
Re: How to Log MySQL DB Connection Obtain & Release Time in OpenJPA?
September 17, 2021 07:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.