vladmihalcea / flexy-pool

FlexyPool adds metrics and failover strategies to a given Connection Pool, allowing it to resize on demand.
Apache License 2.0
1.09k stars 120 forks source link

Throw UnsupportedOperationException for BoneCp and Vibur DBCP on pool resize #10

Closed vladmihalcea closed 9 years ago

vladmihalcea commented 9 years ago

BoneCP and Vibur DBCP does not support pool resizing natively, as C3P0. This way, it's impossible to guarantee what will happen to the current acquired connections one the pool has to be destroyed and recreated, only to take into consideration the new pool size.

Therefore, the safest approach is to throw an UnsupportedOperationException whenever the max pool size is about to be changed and document the behavior.

vladmihalcea commented 9 years ago

Fixed in release 1.2.1