-->
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: Can a session reuse a single jdbc connection for many txns?
PostPosted: Thu Jan 03, 2008 2:48 pm 
Newbie

Joined: Wed Mar 08, 2006 5:59 pm
Posts: 2
Location: Los Angeles
I'm using Hibernate 3.2 with Spring, with OpenSessionInViewFilter building a session for each request. Everything is working properly.

However, as I began to performanc-tune the application, I noticed that a lot of threads were blocked trying to return JDBC connections to the pool (DBCP, under Tomcat). Looking at thread dumps showed that many of these returns are inside my business logic, rather than during OSIV completion. They seem to occur durring the commit of a sub-transaction executed as part of my business logic. Presumably the next txn grabs a new connection from the pool.

Again, this works correctly, but it appears that all that extra pool activity is the current bottleneck on scaling my app. It seems to me that it would work just as well if the Hibernate session held onto a single connection for all its work during the full lifetime of the session.

Am I wrong about this? Or is there a way to make that happen?


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.