-->
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: Hibernate + c3p0
PostPosted: Fri Jan 06, 2006 10:07 pm 
Newbie

Joined: Thu Dec 15, 2005 5:34 pm
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3

c3p0 version: c3p0-0.8.5

General question regarding reconnection upong connection loss to MySQL database. Previously I was using the hibernate (not for production use) connection pooling mechanism and got a few communications link failure exception. I tried adding some code to deal with these different communication link failure problems, but to no avail. I read online mesasge boards and did quite a few searches, and found out about c3p0's support for automatically re-acquiring lost connection.

My question is, if I have successfuly set the properties in c3p0.properties:

c3p0.acquireRetryAttempts=-1
c3p0.automaticTestTable=C3P0TestTable
c3p0.initialPoolSize=20
c3p0.acquire_increment=5
c3p0.idle_connection_test_period=36000
c3p0.max_idle_time=0
c3p0.timeout=18000
etc.

then I would not need to do checks on whether a session is connected or not (e.g. session.isConnected() etc) and just delegate to c3p0 to make sure connections are still up and if it is lost, c3p0 will reacquire it?

My application implement short conversations, where i open/close transactions/sessions immediately after action on the database. The fear is only at the very end when I use a ScrollableResults to update a massive amount of data, that connections might get lost in between.

Thanks,
E


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.