Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production | 0 |
PL/SQL Release 12.1.0.2.0 - Production | 0 |
CORE | 12.1.0.2.0 | Production | 0 |
TNS for Linux: Version 12.1.0.2.0 - Production | 0 |
NLSRTL Version 12.1.0.2.0 - Production | 0 |
Using JavaSE-1.7
Using ucp.jar,ons.jar and OJDBC7.jar
I have the following:
public class ucpDataSource
PoolDataSource pds;
private ucpDataSource() {
pds = PoolDataSourceFactory.getPoolDataSource();
pds.setConnectionFactoryClassName(factoryClassName);
pds.setMaxPoolSize(maxPoolSize); 10
pds.setMinPoolSize(minPoolLimit); 1
pds.setMaxIdleTime(idleMaxTime); 50
pds.setMaxConnectionReuseTime(connectionReUseTime); 5
pds.setConnectionWaitTimeout(waitTimeOut); 100
pds.setAbandonedConnectionTimeout(abandonedConnectionTimeout); 10
pds.setInactiveConnectionTimeout(inactivityTimeout);30
pds.setTimeToLiveConnectionTimeout(timeToLiveConnection); 30
pds.setTimeoutCheckInterval(30);
}
public Connection getConnection() throws SQLException {
return pds.getConnection();
}
public void CloseConn() {
try {
pds.getConnection().close();
} catch (Exception e) {
}
}
In the calling body. I getConnection, CloseConn. I close the Connection in the class as well as any statements result sets etc.Please see attached .
The problem is that connections aren't being closed and the those connections are remaining active on the database. How do I prevent these connections from remaining active?