-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Expected behavior
I'd expect the behavior of creating a GenericConnectionPool to also warm the connection pool based on the configuration of the pool itself (minIdle, etc). This would take place by calling the following method upon initialization of the connection pool:
this.internalPool.preparePool();
This method internally will attempt to ensure that the correct minIdle instances are available for threads to consume and use at the point the pool is first configured. One approach could be to make this optional via a specific pool parameter/argument to say "warmPool: true | false"
Actual behavior
The GenericObjectPool is created with the correct pool configurations, but the pool is never warmed. The logic within GenericObjectPool itself doesn't warm the pool itself upon creation this is up to the user of the object pool instance to maintain.