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 set up the datasource as follows
pds = PoolDataSourceFactory.getPoolDataSource();
pds.setConnectionFactoryClassName(factoryClassName);
pds.setMaxPoolSize(maxPoolSize); maxPoolSize 10
pds.setMinPoolSize(minPoolLimit); minPoolLimit 1
pds.setMaxIdleTime(idleMaxTime); idleMaxTime 50
pds.setMaxConnectionReuseTime(connectionReUseTime); connectionReUseTime 5
pds.setConnectionWaitTimeout(waitTimeOut); waitTimeOut 100
pds.setAbandonedConnectionTimeout(abandonedConnectionTimeout); abandonedConnectionTimeout 10
pds.setInactiveConnectionTimeout(inactivityTimeout); // time in seconds inactivityTimeout300
pds.setTimeToLiveConnectionTimeout(timeToLiveConnection); timeToLiveConnection 30
In the class that actually uses it I create a method variable for the connection object. Closing the connection as well as
pds.getConnection().close(); | |
e
I am thinking that at the most I should have only one inactive connection showing up when I monitor the session. How do I configure the pool as to only show on inactive connection? I am running the test queries once every five minutes. But I am opening three connections each time.
Thank you