public void setMaxConnectionAge ( long maxConnectionAge , TimeUnit timeUnit ) { this . maxConnectionAgeInSeconds = TimeUnit . SECONDS . convert ( maxConnectionAge , timeUnit ) ; }
Sets the maxConnectionAge . Any connections older than this setting will be closed off whether it is idle or not . Connections currently in use will not be affected until they are returned to the pool .