-->
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.  [ 2 posts ] 
Author Message
 Post subject: No Login Timeout? (Connecting to Oracle DB)
PostPosted: Mon Oct 18, 2004 7:00 am 
Newbie

Joined: Mon Oct 18, 2004 4:35 am
Posts: 2
Hibernate version: 2.1.6
Name and version of the database you are using: Oracle 9

The Oracle DB i am trying to connect, is now in some bad state.
When i try to connect i am waiting forever. I have the same effect
when i try to connect with other tools to the DB.

My question here:
Is there a way to set an "loginTimeout" in c3p0 or in the Oracle connectstring?

I have set hibernate.c3p0.timeout to 120s but there is no timeout when i try to connect with the Oracle DB.
###########################
### C3P0 Connection Pool###
###########################
hibernate.c3p0.max_size 2
hibernate.c3p0.min_size 2
hibernate.c3p0.timeout 120
hibernate.c3p0.max_statements 100
hibernate.c3p0.idle_test_period 60
hibernate.c3p0.acquire_increment 2
hibernate.c3p0.validate false

I have tryed the DBCP Connection Pool, but with the same Problem.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 28, 2004 5:06 am 
C3P0 Developer
C3P0 Developer

Joined: Tue Jan 06, 2004 8:58 pm
Posts: 145
Hi... there are two issues here: does the pool timeout if it can't get to the database? and do clients timeout if they cannot acquire a Connection in a reasonable time?

The latest (still prerelease) versions of c3p0 allow fairly complete control over all this stuff. (If you can, wait 'til the weekend, when the next prerelease will be released on sourceforge. I have one more TODO to take care of. If you can't wait, e-mail me at swaldman@mchange.com for the current development snapshot.)

Re the interaction between the pool and the database, there are 3 new config params:

c3p0.acquireRetryDelay -- milliseconds. if the pool fails to acquire a connection from the DB, how long does it wait before it tries again?

c3p0.acquireRetryAttempts -- number. how many times will the pool try, fail, and delay the time period set above, before the pool gives up and throws an Exception to any Connection waiting on a Connection?

c3p0.breakAfterAcquireFailure -- true or false. if a pool goes through a whole round of trying to acquire database Connection using the parameters above, then fails, should it consider itself permanently broken, or be willing to retry all over again when it receives new client requests?

Re the interaction between clients and the pool (BUT wait 'til Monday or write me -- not yet in current sourceforge release -- first public release with this config will be c3p0-0.8.5-pre7):

c3p0.checkoutTimeout -- milliseconds. how long will a client will wait for a Connection from the pool before giving up and seeing an SQLException? clients wait for a Connection either because the pool is trying to acquire more Connections from the database, or because the pool has reached its maximum size and all Connections are checked out, so the pool is waiting for other clients to return connections.

Please note these properties cannot be changed in hibernate's config's file, but you must use c3p0's native config tools, such as a c3p0.properties file. See http://forum.hibernate.org/viewtopic.ph ... highlight= for more on this.


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

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.