-->
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.  [ 4 posts ] 
Author Message
 Post subject: Transaction control in Jboss
PostPosted: Fri Mar 05, 2004 12:30 pm 
Newbie

Joined: Sun Feb 29, 2004 9:34 pm
Posts: 3
Location: Washington DC
Hi,
My environment : Jboss3.2.3, Hibernate2.1.2 , windows-xp( this o/s is only for development env.)

High level architectural flow

Stateless session bean -> Hibernate -> my data source ->database

1) Data source : local-tx-datasource
I


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 05, 2004 8:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
If you use CMT or JTA Transactions, don't forget to set hibernate.transaction.manager_lookup_class, hibernate.transaction.factory_class and jta.UserTransaction


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 06, 2004 8:08 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
In session beans, I do not use the Hibernate transaction. Instead, I get a session from the factory bound to JNDI, use it and then flush and close the session. Exceptions cause a roll back.

I believe (someone please confirm) that the Hibernate session from the factory bound to JNDI is tied to the session bean transaction.

So don't use Hibernate transactions in session beans.


Sherman


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 06, 2004 8:15 pm 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
Here is a good discussion about transactions http://forum.hibernate.org/viewtopic.php?t=928620


Cheers,



Sherman


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.