inactive JDBC sessions [message #92458] |
Sun, 25 July 2004 17:11 |
Laurence Prescott
Messages: 1 Registered: July 2004
|
Junior Member |
|
|
Problem with inactive JDBC connections:
We're reporting via a web browser from an Oracle9i Database using Apache HTTP Server Version 1.3.
The connection code is as follows:
[<]%@ page import="java.sql.*, oracle.jdbc.pool.*" %[>]
<jsp:useBean
id="cods"
class="oracle.jdbc.pool.OracleConnectionCacheImpl"
scope="application"
>
[<]%
// Work out what database instance to connect to...
cods.setURL("jdbc:oracle:thin:@localhost:1521:"+ request.getServerName().toUpperCase().substring(0,5));
cods.setUser("user");
cods.setPassword("password");
cods.setStmtCacheSize(5);
cods.setMinLimit(1);
cods.setMaxLimit(5);
cods.setCacheScheme(OracleConnectionCacheImpl.DYNAMIC_SCHEME);
%[>]
</jsp:useBean>
--------------------------------------------------------------
JDBC Thin Client Inactive Sessions keep accumulating until no more connections can be made.
Following is the current statement of the inactive sessions:
SELECT VALUE
FROM nls_instance_parameters
WHERE parameter = 'NLS_DATE_FORMAT'
All record sets, statements and connections are closed explicitely by the JSP code.
Currently we're getting around the problem by bouncing the server when necessary, but this is obviously an unsatisfactory solution.
Can any-one help?
Thanks
|
|
|