-->
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: Transaction handling Hibernate with Session beans
PostPosted: Sat Jul 21, 2012 12:21 am 
Newbie

Joined: Sat Jul 21, 2012 12:06 am
Posts: 1
Hi

I am new to JEE. I am planning to to place "OrderSessionFasad" to responsible business logics related to orders (EJB 2.x or 3.x). Example (AddOrder , EditOrder , DeleteOrder) In each method I can define transaction attributes like "Required".

In hibernate tutorials I have seen that , Hibernate also managing transactions.
example Session session = HibernateUtil.currentSession();
try {
Transaction tx = session.beginTransaction();
Order order = new Order();

If I use only Sessionbean and Hibernate in business layer (where my presentation layer is struts2)
1. Do I need to disable Hibernate transactions as it is handle by session bean?
2. What is the recommended practice if my session bean is stateless?
3. What is the recommended practice if my session bean is statefull?


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.