commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sic <sic_1...@naver.com>
Subject Re: [dbcp] Re: Oracle session excess over maxActive
Date Fri, 02 Apr 2010 02:43:51 GMT

According to your advice, I just try to patch the previous contents.
But certain process cannot be configured completely for some reasons so it
is running with this configurations now.
This process is just using 1 thread, commons-dbcp-1.3, commons-pool-1.5.4
and  jdk 1.5.
<bean id="dataSource"
         class="org.apache.commons.dbcp.BasicDataSource" 
         destroy-method="close">
         <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
         <property name="url" value=""/>
          <property name="username" value=""/>
          <property name="password" value=""/>
          <property name="initialSize" value="1"/>
          <property name="testWhileIdle" value="true"/>
          <property name="validationQuery" value="select 1 from dual"/>
          <property name="testOnReturn" value="true"/>
          <property name="timeBetweenEvictionRunsMillis" value="10000"/>
          <property name="defaultAutoCommit" value="false"/>
    </bean>
And I'm using a raw code( e.g. conn = ds.getConnection())
In this situation, the following error message occurred.

java.sql.SQLException: Io exception: Connection reset
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
        at
oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3678)
        at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:352)
        at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365)
        at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
        at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
        at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
        at TargetSource ...
        at java.lang.Thread.run(Thread.java:801)

I have already known that running the evictor every 10 seconds is
improper(will be removed) and using the Spring's JDBC stuff is more
efficient(will use such as conn = DataSourceUtils.getConnection(ds);).
Nonetheless I wonder it(modify the evictor conf and use spring jdbc) would
solve this problem.

regards,
sic
-- 
View this message in context: http://n4.nabble.com/DBCP-Oracle-session-excess-over-maxActive-tp1584311p1748785.html
Sent from the Commons - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message