-->
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: nested transaction
PostPosted: Tue Mar 16, 2004 2:35 pm 
Beginner
Beginner

Joined: Wed Feb 25, 2004 10:58 am
Posts: 43
Is this supported in hibernate ?


Method A
Start tx
call method b
Commit tx
End A


Method B
Start tx
do some work
Commit tx
End A


I have some DAO methods that call others , would it be best to start
tx at higher level ?


Top
 Profile  
 
 Post subject: Re: nested transaction
PostPosted: Tue Mar 16, 2004 3:51 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Use this way :

Code:
Start tx


Method A
          call method b
End A


Method B
      do some work
End A

Commit tx


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 17, 2004 12:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
baliukas approach is best - see the 'Thread Local Session' pattern which helps with this architecture. http://hibernate.bluemars.net/42.html


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.