Hello!
A problem:
I use several modules of GeoServer 1.5.x generation (data-1.5.2.jar,
platform-1.5.2.jar) and their dependencies from GeoTools in web application
running under Tomcat. My idea is to reuse DataStore/FeatureType
configuration stuff (like catalog.xml) from GeoServer and get DataStore
instances directly from business logic of my webapp to operate over
features. So, GeoServer configuration modules are built-in to my webapp.
There is a client mapping component (based on Mapbender application
framework) that communicates with my webapp that performs feature operations
through PostGISDataStore in PostGIS. When I come to the office in the
morning (I do not shutdown my testing Tomcat server) seems all connections
are dead in old good ConnectionPool of the PostGISDataStore instance, I
suppose because of long timeout.
With our OracleDataStore implementation this was not problem because
ConnectionPool.ConnectionPoolCleaner worked fine for OracleConnection. After
long timeout first request to ConnectionPool to get available connection is
failed, but not valid Connection instance is removed by
ConnectionPoolCleaner during this request and the next request creates
totally new Connection instance and put it to availableConnections list and
it starts to work. I have not encountered these problems with GeoServer
itself (when request PostGIS after long timeout). We use postgis_1.3.1.jar
and postgresql-8.2-505.jdbc3.jar with PostGIS 8.2.
Looking to the code of ConnectionPool. ConnectionPoolCleaner I see possible
reasons:
1) "PostGIS connection".isValid() returns always true
2) Who does call ConnectionPoolCleaner.disable() during the night ?
Any hints?
Vitali Diatchkov.
=========================================
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at
org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInput
Stream.java:135)
..................................
..................................
..................................
at
org.geotools.data.postgis.PostgisDataStore.getTypeNames(PostgisDataStore.jav
a:357)