hi all,
it seems that connection to datastore are not release and after some configuration request, i've got this exception :
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
any idea ??
is it a new bug ?
i am working with 1.6 beta3
--
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre __at__ meteo.fr
Sébastien Geindre ha scritto:
hi all,
it seems that connection to datastore are not release and after some configuration request, i've got this exception :
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
any idea ??
is it a new bug ?
Sigh... it's more of a hole in the geotools datastore API.
It has no way to ask a datastore to tear down whatever resources it's
using when closing it down. At the same time, each time you do
apply your changes geoserver destroys and recreates all of the datastores (since the configuration subsystem has no way to notify
what changed).
The only thing I could do was to add a finalizer to the jdbc datastore
classes that will close the pool, but this happens only when the class
is garbage collected, and garbage collection is not predictable,
this means connections are eventually released, but if you do many
changes in a row you may hit the exact issue you're facing.
There are two ways to address this:
* allow the usage of JNDI configured pools, that won't be destroyed
along with the datastore. It's the best solution if you can
depend on the web container to setup the pools, and we already have
the code to refer to a JNDI provided pool, but we miss the UI for it.
* have the jdbc datastore implement a special interface with a "dispose"
method, and have geoserver call it before releasing the reference to
the datastore (when re-creating it). This is something we simply
don't have.
Can you open a jira issue about this?
Cheers
Andrea