-->
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.  [ 4 posts ] 
Author Message
 Post subject: opening JDBC connection blocked
PostPosted: Tue Jul 04, 2006 7:32 am 
Beginner
Beginner

Joined: Tue Jun 06, 2006 3:37 am
Posts: 29
Hi I'm facing a trouble when I'm been using hibernate with spring framework, the server is blocked after opening JDBC connection.

Any idea ?

my best regards

Hibernate version:
3.0

Name and version of the database you are using:
mysql 5.0

Debug level Hibernate log excerpt:
DEBUG http-8080-Processor23 com.mtsa.ebonus.core.db.UsedTableDbDAO - finding UsedTableDb instance by example (with params)
DEBUG http-8080-Processor23 org.springframework.orm.hibernate3.SessionFactoryUtils - Opening Hibernate Session
DEBUG http-8080-Processor23 org.hibernate.impl.SessionImpl - opened session at timestamp: 4718642005274624
DEBUG http-8080-Processor23 org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 3)
DEBUG http-8080-Processor23 org.hibernate.jdbc.ConnectionManager - opening JDBC connection


Top
 Profile  
 
 Post subject: Received this error too
PostPosted: Wed Aug 16, 2006 3:01 pm 
Newbie

Joined: Wed Dec 15, 2004 9:45 am
Posts: 7
Did you get a resolution to this??


Top
 Profile  
 
 Post subject: Re: Received this error too
PostPosted: Wed Aug 16, 2006 3:56 pm 
Beginner
Beginner

Joined: Tue Jun 06, 2006 3:37 am
Posts: 29
lstroud wrote:
Did you get a resolution to this??


yes I solved this by adding a property in the applicationContext properties file

<prop key="hibernate.connection.release_mode">auto</prop>


Top
 Profile  
 
 Post subject: we got it too
PostPosted: Wed Aug 16, 2006 5:27 pm 
Newbie

Joined: Wed Dec 15, 2004 9:45 am
Posts: 7
we found it too....though a different way

we were using spring's dao support class to manage sessions (until i get off my lazy butt and put a filter on the app for transactional mgmt). I didn't read the spring javadoc completely, though. In some places I was using the HibernateTemplate class. In others (mostly simple cases), I was using getSession(). Stupidly, I didn't realize that I aslo needed to call release session when I was done with it. So, adding that fixed the problem as well.

I will look into the auto property, too. It seems interesting to prevent errors like this in the future.

Thanx for the help,
LES


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.