no check of connection validity on ConnectionPool
-------------------------------------------------

                 Key: GEOT-1698
                 URL: http://jira.codehaus.org/browse/GEOT-1698
             Project: GeoTools
          Issue Type: Bug
          Components: data jdbc
    Affects Versions: 2.1.0
         Environment: All
            Reporter: Federico Nieri


There's no check when returning an available connection from a Pool if that 
connection is valid yet.
The method getConnection on ConnectionPool check only if there is an available 
connection in the pool, but doesn't check if that connection is valid.

We work with a timeout on connections and Oracle may close sessions after some 
minutes if they are not used. So we obtain exception when trying to use that 
connections.

In the class ManagedPooledConnection there is the isValid() method that is not 
called from PoolConnection, but also if it did the isValid() method check the 
connection trying to close it.
I think it would be better to create a method that check validity of connection 
calling a rollback() on it. That method could be called from the getConnection 
method of ConnectioPool before returning the connection. If the connection is 
not valid anymore, it should create a new connection.

I think this issue is also on later versions!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to