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 Session and Transaction Issue
PostPosted: Tue Apr 22, 2008 1:12 pm 
Newbie

Joined: Tue Apr 22, 2008 1:03 pm
Posts: 1
Location: India
Hi all,



I have created a session bean (EJB 2.0) in which I am interacting with Hibernate 3.0 via DAO layer in RAD 7.0

The session bean will call a POJO which will initiate the Transaction .

This transaction will internally call another transaction. Transaction management has to be done using CMP.



The situation is like:



I have 4 independent methods in a session bean.

This bean calls to four different methods namely method1, method2, method3 and method4.

The method1, method2 and method4 are in one session and in one transaction.

Method3 is in a separate session and different transaction.

The container transaction has been set as “REQUIRED” for method1, method2 and method4 & “REQUIRES NEW” for method3.



The call goes like this –

Sessionbean()

{

Method1

Method2

Method3

Method4

}



In normal scenario things go well.

But if have any exception occurs in method4 then only method3 (which is in a separate session and transaction) should get committed and rest are to be rolled back

But here even method3 is getting Rolled back.



Any pointers?

_________________
Thanks
Gaurav


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.