We are using:
WLS 5.1 SP_9 on Solaris 2.6
Oracle 8.1.6 DB
DB pooled coonections (weblogic.properties):
weblogic.jdbc.connectionPool.mercury_oracle_pool=\
url=jdbc20:weblogic:oracle,\
driver=weblogic.jdbc20.oci.Driver,\
loginDelaySecs=1,\
initialCapacity=4,\
maxCapacity=10,\
capacityIncrement=2,\
allowShrinking=true,\
shrinkPeriodMins=15,\
refreshMinutes=10,\
testTable=dual,\
props=user=<ora_user>password=<ora_password>;server=SERVER_NAME
weblogic.jdbc.TXDataSource.mercury_oracle_pool=mercury_oracle_pool
We use both continer-manager-persistence entity beans and db access via JDBC (using
the above pooled connection).
Our JDBC access is via:
instInitCtx = new InitialContext();
DataSource instDataSource = (javax.sql.DataSource) instInitCtx.lookup(m_sMercuryPool);
Connection instConn = instDataSource.getConnection();
After each use of the JDBC poole we cleanup via:
Statement.close()
COnnection.close()
After running the server for 10-15 minutes, during which it does a few hundred
transaction it sudenly stops; giving the error message (jdbc.log):
Executing: SELECT SYSDATE FROM DUAL
java.sql.SQLException: Pool connect failed: None available
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.<init>(Throwable.java:94)
at java.lang.Exception.<init>(Exception.java:42)
at java.sql.SQLException.<init>(SQLException.java:82)
at weblogic.jdbcbase.pool.Driver.connect(Driver.java:184)
at weblogic.jdbcbase.jts.Driver.connect(Driver.java:233)
at weblogic.jdbc20.common.internal.RmiDataSource.getConnection(RmiDataSource.java:55)
at weblogic.jdbc20.common.internal.RmiDataSource_ServiceStub.getConnection(RmiDataSource_ServiceStub.java:179)
at mercury.infrastructure.dbconnector.DBConnector.getConnection(DBConnector.java:60)
ANY IDEAS/CLUES
Cheers,
Sid
Try looking at what is happening to the pool size in the console.
Is there any way around the connection.close() statement in the code,
for instance in the following
try{
//blah blah, initialise connection etc
con.close();
}catch (SQlException e){
//blah
}
if there is an SQLException in the main body of the code the connection
won't be closed, if con.close() was in a 'finally' then this problem
wouldn't arise
terry