I have been facing issue in 2 of the batch processeses when Inactive Connection Timeout of connection pool is set as 30 sec. I am not sure from when timeout count down starts. My batch takes around 10 min to complete. Code looks as below
String retMessage = cstmt.getString(4);
In the log I see simetimes connection is getting closed (<Forcibly releasinng the connection....>) just before calling getLong and sometimes before calling getString and thus these calls fails with "Statement Already Closed" .
So should I increase the inactive timout to 900 sec, but I suppose then this is not the expected behavior. I believe timeout should start after execute() returns.
Weblogic version is 10.3.4.0 and Oracle DB is 11GR2.
Inactive timeouts should occur only if your code has not used the JDBC connection (or one of it's subobjects) for that long. Even if your code is simply waiting for a query to return results from the DBMS, or for a ResultSet to respond, that is considered active. It should be only for truly inactive JDBC connections that your timeout will trigger. It is only you who can know if your code has long periods of non-JDBC processing while you're still holding on to (and perhaps needing) a JDBC connection.