-->
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.  [ 3 posts ] 
Author Message
 Post subject: Concurrency access doubt
PostPosted: Tue Jan 11, 2005 1:49 pm 
Beginner
Beginner

Joined: Thu Dec 23, 2004 8:47 am
Posts: 32
Location: Brazil State:Rio Grande do Sul City:Porto Alegre
Hello all!
I´m a new Hibernate user , doing some application tests so..


Suppose i have two objects loaded in diferent sessions and they point to the same row in database .

Session 1 Object A is deleted then in
Session 2 i try to insert it (Object A) on another object.

How could i threat this situation !?
Show an error and say to client to repeat the operation !?
Using version (optimistic locking ) our pessimistic locking ?!

Thanks in advance.

I hope someone help me !

:)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 12, 2005 6:44 pm 
Regular
Regular

Joined: Tue Jun 22, 2004 8:01 pm
Posts: 106
Location: PowderTown, Utah, USA
For starts, go out and purchase "Hibernate In Action" whcih has several excellent chapters on this very subject (Especially read Chapter 5 which covers concurency). Next, set up a test case to experiment on what happens.

Understanding what will happen depends on your understanding of the Transaction Isolation level you've chosen. You'll need to take a look at what your concurrency needs are before choosing a level.

Concurrency is a fact of life in multi-user applications. It's important to understand the issues at hand and how the tool deals with them. Chapter 5 of the book will help you figure it all out.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 13, 2005 7:39 am 
Beginner
Beginner

Joined: Thu Dec 23, 2004 8:47 am
Posts: 32
Location: Brazil State:Rio Grande do Sul City:Porto Alegre
Thank you cardsharp , i´ll implement some tests.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.