/** * sets advanced pool properties<br> * used during pool configuration (initialization) and re-configuration<br> * * @param poolResource Connector Connection Pool */ private void setAdvancedPoolConfiguration(ConnectorConnectionPool poolResource) { matchConnections = poolResource.matchConnections(); preferValidateOverRecreate = poolResource.isPreferValidateOverRecreate(); maxConnectionUsage_ = Integer.parseInt(poolResource.getMaxConnectionUsage()); connectionCreationRetryAttempts_ = Integer.parseInt (poolResource.getConCreationRetryAttempts()); //Converting seconds to milliseconds as TimerTask will take input in milliseconds conCreationRetryInterval_ = Integer.parseInt(poolResource.getConCreationRetryInterval()) * 1000L; connectionCreationRetry_ = connectionCreationRetryAttempts_ > 0; validateAtmostPeriodInMilliSeconds_ = Integer.parseInt(poolResource.getValidateAtmostOncePeriod()) * 1000L; boolean connectionLeakReclaim_ = poolResource.isConnectionReclaim(); long connectionLeakTimeoutInMilliSeconds_ = Integer.parseInt( poolResource.getConnectionLeakTracingTimeout()) * 1000L; boolean connectionLeakTracing_ = connectionLeakTimeoutInMilliSeconds_ > 0; if (leakDetector == null) { leakDetector = new ConnectionLeakDetector(poolInfo, connectionLeakTracing_, connectionLeakTimeoutInMilliSeconds_, connectionLeakReclaim_); } else { leakDetector.reset(connectionLeakTracing_, connectionLeakTimeoutInMilliSeconds_, connectionLeakReclaim_); } }
origCcp.setMaxConnectionUsage(ccp.getMaxConnectionUsage()); origCcp.setNonComponent(ccp.isNonComponent()); origCcp.setNonTransactional(ccp.isNonTransactional());
clone.setLazyConnectionEnlist(isLazyConnectionEnlist()); clone.setMaxConnectionUsage(getMaxConnectionUsage()); clone.setValidateAtmostOncePeriod(getValidateAtmostOncePeriod());