logger.warn("pool is null {}", source.getJdbcUrl()); } else { dataSourceInfo.setEstablishedConnections(pool.getTotalCreatedConnections());
public int getTotalCreatedConnections() { return this.pool.getTotalCreatedConnections(); }
/** * Get a status information of the JDBC connections. * * @return The status information of the JDBC connections. */ public String getConnectionStatus() { String status = "unknown"; if (dataSource instanceof BoneCPDataSource) { BoneCPDataSource bcpDataSource = (BoneCPDataSource) dataSource; BoneCP bcp = bcpDataSource.getPool(); status = "JDBC connections: " + bcp.getTotalLeased() + " in use / " + bcp.getTotalFree() + " in pool / total created " + bcp.getTotalCreatedConnections(); } return status; }