This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Data source connection usage during nested method calls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Data source connection usage during nested method calls" Watch "Data source connection usage during nested method calls" New topic
Author

Data source connection usage during nested method calls

Wes Hughes
Ranch Hand

Joined: Jul 29, 2002
Posts: 31
Say I have a stateless session bean with a method that gets a connection from the data source, makes a database call and then for each record returned calls another method, possibly in another stateless session bean, which does its own database access. In this situation does each connection established correspond to a new physical connection to the database, or is the physical conncection somehow reused amonst these logical connections? This doesn't seem possible though as the first connection is not closed when the second is established.
Is it dependent on the transaction type of the method?

Basically, my concern is that if I have methods calling methods calling methods etc that it will use a lot of physical connections to the database.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data source connection usage during nested method calls
 
Similar Threads
why stateless bean are more scalable
stateless session bean instances tracking
Q: transaction mgt in session bean wrapping JDBC
Thin Line Between JNDI and Resource Managers
My SCEA Part 1Study Notes