-->
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 and session.iterate() (on websphere 5)
PostPosted: Tue Nov 25, 2003 4:20 pm 
Beginner
Beginner

Joined: Wed Sep 24, 2003 11:06 am
Posts: 21
Location: Denmark
Hi folks,

Normally when doing queries or loads and not any inserts or updates, I dont issue any session.beginTransaction(), and things seem to work just fine.. Suddenly it seems that session.iterate() does NOT work without being within a transaction, at least not on ibm websphere 5.. on websphere 4 it doesnt seem to matter.. my data source is enlisted with JTA.

Does hibernate require EVERY unit of work to be within
Transaction t = session.beginTransaction();
....
t.commit();

or is it only needed for updates and inserts..

regards...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 25, 2003 6:16 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I think its good practice that everthing is performed within a Transaction. This type of development/code consistency will avoid issues during the maintenance phase of the project.


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.