> I'm not sure but I think InvalidSessionException is not a subclass of SQLException so I guess that is the reason why connections do not get refreshed. Is there a way to change the behaviour so that de data connection would be reset?
InvalidSessionException will be converted to a SQLException with the SQL State 08S01. It may need an error handler to know what the sql state means. Alternatively you should be able to configure a test query or have the pool use the isValid check on the connection.