-->
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.  [ 4 posts ] 
Author Message
 Post subject: disconnect - reconnect data objects
PostPosted: Tue Mar 09, 2004 1:06 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
Hello,

We are implementing thick clients using swings. For binding data objects with data objects, at client side, we are using some kind of binding mechanism so that changes can be synchronized on both sides, ie as soon as user make any change or vice versa. So as per our requirement, we have to pass data objects from the server to the client side and vice versa for persisting states to database.

I need help for this scenario, that how can we achieve it. Ok, we can pass the data object to the client after getting it from database and then can work on it. But after getting that object back to the server,

1. How will we synchronize it with the existing system?

2. Do we need to implement Interceptor.isUnsaved method to indicate that this object is a new one or just for updation?

3. And whats about concurrency management, as if two clients demand the same data object at the same time and make changes, then how this will be managed while saving object? "Point is that we got both data objects from the client after deserialization".

Waiting for help..

Thanks!

_________________
Mohit Gupta
Software Engineer
Gurgaon, India


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 1:08 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
There is a writting mistake in second line, this should be:

For binding data objects with UI, at client side, we are using some kind of binding mechanism so that changes can be synchronized on both sides, ie as soon as user make any change or vice versa.

_________________
Mohit Gupta
Software Engineer
Gurgaon, India


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 5:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
1. reatattch the object with session.lock(object, LockMode.NONE).

2. No, unsaved-value is enough if you use non-composite ids or a version/timestamp property

3. Use optimistic locking with a version/timestamp column.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 11, 2004 3:17 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
I will take care not to crosspost the topics, that was just mistake.

And Thanks for the solution. I will try with recommended approaches.

_________________
Mohit Gupta
Software Engineer
Gurgaon, India


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