-->
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: How to manage hibernate transactions using EJB
PostPosted: Thu Feb 08, 2007 7:54 am 
Newbie

Joined: Thu Jan 25, 2007 3:24 am
Posts: 6
We have two methods in Session Bean: A() and B().

A() and B() are called from another function in struts action class.

A() and B() saves and updates data using hibernate.

We want A() and B() operation to be atomic.

That is if A() passes but B() fails, updates done by A() should be rolled back and vice versa.

We want to use the J2EE framework, not the hibernate framework to do it.

session.beginTransaction and tx.commit/tx.rollback should not be used.

Can we do it using context.setRollbackOnly()?
If not can u suggest some way?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 09, 2007 1:46 am 
Newbie

Joined: Thu Jan 25, 2007 3:24 am
Posts: 6
Anbody have a clue?


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.