views:

61

answers:

2

Hi,

I've switched my webserver from tomcat to jetty and encounter a "java.sql.SQLException: Io exception: Connection reset" when back from idle time (eg. i go out for a while) :(

This issue doesn't appear when i use tomcat. Does it come from jetty or i've done something wrong ?

Here is my datasource config

<bean id="dataSourceOracle" class="com.mchange.v2.c3p0.ComboPooledDataSource">
  <property name="driverClass" value="oracle.jdbc.driver.OracleDriver"></property>
  <property name="jdbcUrl" value="jdbc:oracle:thin:@127.0.0.1:1521:ORCL"/>
  <property name="user" value="admin"/>
  <property name="password" value="123"/>
  <property name="initialPoolSize" value="0"></property>
  <property name="minPoolSize" value="0"></property>
  <property name="maxPoolSize" value="100"/>
 </bean>

<bean id="hibernateSessionFactory2" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  <property name="dataSource" ref="dataSourceOracle"/>
  <property name="mappingLocations">
   <list>
    <value>classpath:hibernate/mapping/User.hbm.xml</value>
    <value>classpath:hibernate/mapping/Address.hbm.xml</value>
    <value>classpath:hibernate/mapping/Province.hbm.xml</value>
    <value>classpath:hibernate/mapping/Service.hbm.xml</value>
    <value>classpath:hibernate/mapping/AccessLog.hbm.xml</value>
   </list>
  </property>
  <property name="hibernateProperties">
      <value>
       hibernate.connection.shutdown=false
       hibernate.show_sql=true
       hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
      </value>
     </property>
 </bean>

Thank you!

A: 

Does it use different connection settings / pooling in datasource definition ?

binary_runner
no, i use the same datasource.
robinmag
A: 

I've switch to bonecp and it's solved with the default bonecp config :)

robinmag