-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: java.net.SocketException, underlying cause: Connection reset
PostPosted: Wed Apr 30, 2008 2:09 am 
Newbie

Joined: Wed Apr 30, 2008 1:29 am
Posts: 1
Hi
I have a simple web application(running on tomcat) which uses mysql for database . iam using hibernate to connect to it. The hibernate.cfg.xml is as follows
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">test</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/rmsdb</property>
<property name="hibernate.connection.username">test_user</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

<property name="show_sql">true</property>
<property name="current_session_context_class">thread</property>


<mapping resource="RMSDatabase/utilities/testSsn/ssnmain.hbm.xml"/>
<mapping resource="RMSDatabase/utilities/testSsn/ssntype.hbm.xml"/>
<mapping resource="RMSDatabase/utilities/testSsn/type.hbm.xml"/>
<mapping resource="RMSDatabase/utilities/testSsn/feed.hbm.xml"/>
</session-factory>


The application works fine but after some amount of inactivity (2-3hrs) I get socket exception:connection reset. If i restart tomcat everything works fine but fails again after inactivity. Is there some property for connection pooling that should be set?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.