-->
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: Transaction Handling with EJBs and Hibernate
PostPosted: Mon Mar 15, 2004 1:50 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 7:53 am
Posts: 24
I am going ahead using Hibernate :-) and integrate it with my EJBs .
I have a question : Hibernate provides its own SessionFactory , Transactions .. But I dont want to use them. If I am using a Session Bean(CMT) then all my transaction handling is already done by the container. I dont want to mess my code with all transaction and exception handling doing rollback commit etc. This is VERY IMPORTANT

Please let me know is this possible? I dont want code like calling begin transaction and rollback.

sf = cfg.buildSessionFactory();
session = sf.openSession();
tx = session.beginTransaction();


If any examples demonstrating these kinda stuff...pls let me know..


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 15, 2004 7:30 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
If you are in a CMT, then set the datasource as your connection provider,

and don't use hibernate Tx API, It'll work fine

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 16, 2004 8:50 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 7:53 am
Posts: 24
Thanks emmanuel . It worked fine.


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.