-->
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: Local Transaction & multiple queries & how many conn
PostPosted: Thu Feb 24, 2005 2:42 pm 
Beginner
Beginner

Joined: Wed Jul 21, 2004 8:12 pm
Posts: 35
I have question with regard to propblem I had in topic:

http://forum.hibernate.org/viewtopic.ph ... 01#2231901

I realized that that connections can not be shared within a local transaction containment boundary. Does it mean within a transaction block if I run five different queries, it eats up 5 connection from the connection pool?

Let's say if I have the following block:

session = util.getSession();
tx = util.startTransaction(session);

dao1.runquey1(session);
dao2.runquery2(session);
.
.
daon.runquery2(session)


util.commitTransaction(tx);
util.closeSession(session);


Then I need to have n connections per transaction block (if that is the case then , it is expensive to run multiple queries within a transaction block, all the connections in the connection pool are going to be eaten up fast if the volume of hits is high]. For those of you who things are not clear, take a look at :

http://www-1.ibm.com/support/docview.ws ... wg21121449


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.