-->
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: why use transaction when doing query with hibernate ?
PostPosted: Thu Apr 07, 2005 6:01 am 
Newbie

Joined: Thu Apr 07, 2005 5:54 am
Posts: 2
as transaction is used when we failed commited sth, the transaction will do the rollback action to protect data.
but when doing query in DB, we don't need anything rollback, so why hibernate still using transaction in this case? is it will influence the performance? I get puzzled.
thank you for anyone's help! : )

linna.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 9:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The database uses transactions anyway to maintain data integrity. The locking implementation varies from vendor to vendor. Use the transaction API. It will is the correct way to access a transactional resource.


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.