-->
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.  [ 3 posts ] 
Author Message
 Post subject: Embedded Transactions from Single Session?
PostPosted: Thu Jul 14, 2005 4:08 pm 
Regular
Regular

Joined: Sun Sep 26, 2004 9:27 pm
Posts: 75
Location: Atlanta, GA, USA
Is it possible to have two Transaction objects returned from the same Session?

The javadoc for Session.beginTransaction() states:

Quote:
If a new underlying transaction is required, begin the transaction. Otherwise continue the new work in the context of the existing underlying transaction.


Does this mean there is a way to specify instances where a new underlying transaction could be created from a Session that already has one? Or that an existing transaction will always be returned?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 14, 2005 5:52 pm 
Senior
Senior

Joined: Thu May 12, 2005 11:40 pm
Posts: 125
Location: Canada
A session runs one transaction at a time. If you need another, either commit the first, or open a new session.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 14, 2005 5:54 pm 
Regular
Regular

Joined: Sun Sep 26, 2004 9:27 pm
Posts: 75
Location: Atlanta, GA, USA
Makes sense. Thanks for the clarification.


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