Fork me on GitHub

Hello, I'm trying to get the transaction state, getTransactionState from a Postgres PgConnection that is wrapped in a HikariProxyConnection , but it throws

No matching field found: unwrap for class com.zaxxer.hikari.pool.HikariProxyConnection
I've checked the source for HikariProxyConnection which extends ProxyConnection and which in turn does implement unwrap. The following is what I would like to run successfully,
(.getTransactionState (.unwrap (jdbc/get-connection (config/db-spec))))
P.S. This is for some logging while debugging an impenetrable race condition where starting a read-only transaction throws Cannot change transaction read-only property in the middle of a transaction.


Nevermind, had to do this,

(.getTransactionState (.unwrap (jdbc/get-connection (config/db-spec)) org.postgresql.jdbc.PgConnection))