scalar-labs / btm

JTA Transaction Manager
Apache License 2.0
424 stars 152 forks source link

How to get native connection from PoolingDataSource of Bitronix #76

Closed vka255 closed 7 years ago

vka255 commented 7 years ago

How to get the native connection (Native oracle connection in my case) from bitronix poolingdatasource inside spring @Transactional Method

lorban commented 7 years ago
Connection nativeConnection = connectionFromBtmPool.unwrap(java.sql.Connection.class);

See: https://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html