This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class OracleDialect(private val dbInfo: DbDialect.DbInfo, val jdbcTemplate: JdbcTemplate) : DbDialect { | |
| private val log = LoggerFactory.getLogger(this.javaClass) | |
| private val connection = jdbcTemplate.dataSource.connection | |
| ... | |
| private fun getDbNetInfoFromOracleDriver() { | |
| try { | |
| //HikariProxyConnection@1025792385 wrapping oracle.jdbc.driver.T4CConnection | |
| val delegate = FieldUtils.readField(connection, "delegate", true) | |
| //спускаемся в черную дыру ораклового драйвера |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PostgresqlDialect(private val dbInfo: DbDialect.DbInfo, val jdbcTemplate: JdbcTemplate) : DbDialect { | |
| private val log = LoggerFactory.getLogger(this.javaClass) | |
| private val connection = jdbcTemplate.dataSource.connection | |
| ... | |
| private fun getDbNetInfoFromPostgresDriver() { | |
| try { | |
| //HikariProxyConnection wrapping org.postgresql.jdbc.PgConnection | |
| val delegate: Any = FieldUtils.readField(connection, "delegate",true) |