I'm using a JDBC Connection
with autocommit turned off. In my cleanup method I want to check to ensure that there is not a transaction currently in progress but I can't see any way of obtaining this information. How can I find out if a transaction is in progress given a JDBC Connection
?
Update
Although there's nothing in JDBC natively, the Tomcat JDBC connection pool has the concept of interceptors and I'm wondering if one could be written to track transactions at that level.