Thanks a lot for your advice Andrea,

Adding "params.put(VALIDATECONN.key, Boolean.TRUE);" seems to have done 
the trick.

Cheers,
Gerson

On 05/27/2011 04:52 PM, Andrea Aime wrote:
> On Fri, May 27, 2011 at 4:48 AM, Gerson Galang<[email protected]>  wrote:
>> Hi again,
>>
>> I've written a portlet that needs to perform a number of PostGIS queries
>> per http request. There are times when the query just wouldn't work.
>> Whenever the query fails, I get this on the log file...
> My guess is that your postgis is setup to drop the connections to the client
> after a certain timeout.
> The best thing would be to enable the connection validation in the params,
> the connection pool with then first send a fast query (normally getting
> the current date) to check if the connection is still valid before giving it
> back to the code in the data store
>
> Cheers
> Andrea
>
>


------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to