-->
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.  [ 5 posts ] 
Author Message
 Post subject: object retrieval and transactions
PostPosted: Tue Feb 15, 2005 7:06 am 
Newbie

Joined: Tue Feb 15, 2005 6:54 am
Posts: 3
Hi,
I have started to do an evaluation o Hibernate.
Now I am wondering whether it is really necessary to start a transaction before retrieving objects by sesion.get(..)?
Is it dangerous to do this call without transaction?
Is the retrieved object instantiated in the second level cache, then?

Hibernate version: 2.1.7


Name and version of the database you are using: Oracle 9i

Thanks in advance for any hint, Rolf


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 15, 2005 7:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Yes, you should always manage your transactions.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 15, 2005 7:41 am 
Newbie

Joined: Tue Feb 15, 2005 6:54 am
Posts: 3
Hi Michael,
thanks for the quick reply.

I would like to understand this requirement. Up to now I thought I need no transaction as long as I do not change persistent objects. I know this behaviour from other O/R mappers.

Why do I need a transaction and what could happen if I call a query without transaction. Could this cause serious problems?

Regards, Rolf


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 15, 2005 8:12 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This has been discussed extensively already here at this forum. Please use the search function.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 15, 2005 8:59 am 
Newbie

Joined: Tue Feb 15, 2005 6:54 am
Posts: 3
Sorry to disturb you again,
which key words would lead to the right discussion?

Thanks Rolf


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.