-->
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.  [ 2 posts ] 
Author Message
 Post subject: Beginning two transctions in one session
PostPosted: Fri Oct 15, 2004 8:25 am 
Newbie

Joined: Tue Aug 31, 2004 6:48 am
Posts: 2
Hibernate version: 2.x

- Hibernate session allows to call "beginTransaction"
twice and get two different transaction objects.

- How changes in the session are propogated to database
when commit is called for the first and for the second transaction?

- Does this scenario (shown below) makes any sense at all?
Code:
Transaction tx1 = session.beginTransaction();
Transaction tx2 = session.beginTransaction();

// do something with session
//....

tx1.commit();
tx2.commit();


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 15, 2004 1:56 pm 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
In a word, no. Only one active transaction per session ( really per connection ) makes sense.


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