-->
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: Hibernate 3.1 and MySQL without transactions
PostPosted: Sat Apr 15, 2006 11:49 am 
Beginner
Beginner

Joined: Tue Feb 08, 2005 7:01 am
Posts: 21
It seems that from 3.1 Hibernate doesn't like non-transactional access, a quote from the migration guide:

Quote:
Or, if you believe that you can "read data without or outside of a transaction", you will likely face problems in Hibernate 3.1. Of course, there can be no data access outside of a transaction, be it read or write access


Also in 3.2 there will be other changes which seems to make harder (or at least different) to work outside of transactions.

Most mysql setups use the non-transactional MyISAM tables, where auto-commit mode is a natural choice. Is it a good idea to upgrade to Hibernate 3.1 or 3.2 in such a case?

For example consider this (not that extreme) situation: a session consists of a single read from the database which actually served from the secondary cache. In 3.0 I assume there were no communication between the application and the database at all. In 3.1 - if I understand the doc well - it is strongly recommended to use transactions, so the same operation will require two roundtrips to the database server, one to start the transactions, and then to commit it. Will this be a performance hit? Or is there some kind of optimalization (after all MyISAM tables don't support transactions anyway)?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 15, 2006 8:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You should use Innodb tables and the transactions infrastructure its just good practice to ensure data integrity.


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.