#30 re-init of conf causes closure of connections

closed
nobody
5
2006-03-17
2006-03-14
hhu
No

Any calls to configuration parameter changing methods
in ComboPooledDataSource (e.g., setCheckoutTimeout())
causes the underlying PoolBackedDataSource to reset
pool manager, which in turn closes the pool and all
connections in the pool.

This practically makes it impossible to dynamically
and programmatically change pool configuration,
without risking closing active connections.

Discussion

  • Steve Waldman
    Steve Waldman
    2006-03-17

    • status: open --> closed
     
  • Steve Waldman
    Steve Waldman
    2006-03-17

    Logged In: YES
    user_id=175530

    Thanks! Fixed (although imperfectly) as of the next minor
    release of c3p0 (0.9.1 prerelease series). From the CHANGELOG:

    -- Fixed a problem whereby modifying the config of a
    ComboPooledDataSource
    programmatically, while in use, cause previously
    checked-out Connections
    to be close()ed underneath the user. Changing configs
    midstream still
    causes a complete resetting of the pool (because the
    pool holds most
    config params as immutable to avoid having to
    synchronized for every
    config param read), but old Connections from superceded
    pools will remain
    valid until they are rechecked into the pool. [Thanks to
    hhu for noticing
    this problem!]