我使用eclipselink 2.6.3,我需要確切知道連接池是否由Eclipselink創建和使用。Eclipselink:如何檢查是否使用連接池
我有以下設置,如果persistence.xml中
<property name="eclipselink.connection-pool.default.initial" value="5" />
<property name="eclipselink.connection-pool.default.min" value="10" />
<property name="eclipselink.connection-pool.default.max" value="10" />
<property name="eclipselink.jdbc.cache-statements" value="true" />
然而,日誌是相同的,對於兩種情況 - 當我使用這些設置,當我不行
[EL Finer]: connection: 2017-01-22 19:39:03.208--ServerSession(1440738283)--client acquired: 1177072083
[EL Finer]: transaction: 2017-01-22 19:39:03.218--ClientSession(1177072083)--acquire unit of work: 1482166692
[EL Finest]: query: 2017-01-22 19:39:03.239--UnitOfWork(1482166692)--Execute query ReadObjectQuery(...)
[EL Finest]: connection: 2017-01-22 19:39:03.243--ServerSession(1440738283)--Connection(2008547236)--Connection acquired from connection pool [read].
[EL Finest]: connection: 2017-01-22 19:39:03.243--ServerSession(1440738283)--reconnecting to external connection pool
[EL Fine]: sql: 2017-01-22 19:39:03.244--ServerSession(1440738283)--Connection(1590792382)-- SELECT ...
[EL Finest]: connection: 2017-01-22 19:39:03.25--ServerSession(1440738283)--Connection(2008547236)--Connection released to connection pool [read].
[EL Finer]: transaction: 2017-01-22 19:39:03.257--UnitOfWork(1482166692)--release unit of work
[EL Finer]: connection: 2017-01-22 19:39:03.257--ClientSession(1177072083)--client released
任何人都可以說如何檢查連接池的使用情況。
從池中返回的DataSource類(接口)實際上是不同的實現(DBCP,JBosss包等),然後從真正的JDBC驅動程序(Oracle,SqlServer,mysql),用調試器 –