-->
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: how to keep database connection alive?
PostPosted: Thu Jan 15, 2009 8:44 am 
Newbie

Joined: Wed Jan 14, 2009 8:23 am
Posts: 3
Hi All,


I am using hibernate,Mysql and JBOSS server,i want to know how can i keep the database connection alive,i would communication link failure error after some period of time, I am sing c3p0 ,but it dint helped me out.

Can anyone say what configuration i should do to set for production.


I have used c3p0 to query the db,these r the settings i have done

in hibernate.cfg.xml
<property name="hibernate.c3p0.idle_test_period">25200</property>

and i have c3p0 jar file and property file contains

c3p0.preferredTestQuery=SELECT userName from test.user where userName='admin'
c3p0.testConnectionOnCheckout=true

even with these query its not keeping the mysql connection alive.And i want to know if no one pings within 8hrs whether we need to restart the server?if not how can i manage with c3p0,its not working fine.I have to restart the server if no one pings for 8hrs.

CAn any one suggest me the solution,i want to keep it running.

Thankx.


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.