[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Does loading a nested object use >1 database session/connect

btarbox do-not-reply at jboss.com
Fri Feb 9 13:01:04 EST 2007


If I do a non-lazy load of a object with sub-objects I know there will be multiple sql selects executed.  My question is: do each of these selects execute in their own DB session or do they share one.

I always assumed that a single Hibernate Session used a single database session/connection no matter now many queries it needed to populate a nested object.  I've been told this isn't the case and that each additional query for a nested object gets its own database session.

Can anyone tell me which one is true?  BTW my application is throwing Oracle 00018 out-of-session errors which is why this comes up.

Thank you.
Brian Tarbox

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013791#4013791

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013791



More information about the jboss-user mailing list