-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate Transactions
PostPosted: Fri May 14, 2010 7:16 am 
Newbie

Joined: Tue Mar 23, 2010 9:48 am
Posts: 8
Hi,

I want use hibernate transaction ..any body please explain me how to use Hibernate Transaction in proper way.

Here is my scenario :

I have 3 tables i.e user ,address ,and account tables.And every table having its own POJO
if user logged into my site i have to update the above 3 tables.

step 1 .Once user logged in i have to update the user status in side user table
step 2.then update the his address details which are inside address table.
step 3. finally update his account details based on user table status .

if any step is failed Transaction has to be roll back ..

for each step i have implemented logic in different methods
i.e updateUser(string puserId) ,updateAddress(String pUserId) ,updateAccount(String pAccountId) .

I'm calling these three methods inside my main method
i.e
updateUserInfo(){

updateUser(string puserId) ;
updateAddress(String pUserId) ;
updateAccount(String pAccountId) ;
}


Thanks,
Malli.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.