-->
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: transactions
PostPosted: Mon May 30, 2005 8:34 am 
Newbie

Joined: Mon May 30, 2005 8:26 am
Posts: 3
I'm using jboss 4.0.1 and hibernate 2.1

I have a stateless session bean which accesses a DAO class which has heibernate code to insert, update... I noticed that if in this DAO class I use hibernate transactions, with transaction.begin() and transaction.commit() when the transaction.commit() line is executed the database is not updated.
Why that happens? Shouldn't the data be commited to the database when commit is executed?

Other thing I tried was to use JBoss' UserTransaction class but it also didn't work. How can I be sure that when the transaction.commit() is executed the database is really updated?

Thank you

Kelly.



Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 7:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
SLSB can use JTA/CMT if you have configured the correct Transaction semantics for SLSB method(s), eg, tx required. If you do this then you do not need to call any Transaction API methods since the container will manage it. You do need to provide the rollback hint as per CMT standards if an error occurs or the situation requires a rollback.


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.