-->
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.  [ 1 post ] 
Author Message
 Post subject: Sync Detached Object
PostPosted: Fri Sep 23, 2011 9:04 am 
Newbie

Joined: Fri Sep 23, 2011 8:28 am
Posts: 1
hi, I been using hibernate for some time now, but I'm fairly new to it's tunning.
I'm in the following situation:
1. I've a daemon that recieves UDP datagrams with information from multiple Devices (that is parsed into objects and analized)
2. I've a Web interface for configuring this objects (such as the parser that is used for that particular object).

Both softwares uses hibernate for ORM.
Basically, when the daemon starts up it retrieves all the objects (Devices) from the DB, with it's associated configurations, and detach them form the session.
Later, the daemon recieves the datagrams and add the parsed information to the corresponding Device Objects, and then save that information in the DB (saveOrUpdate, and detaching again). Then sleeps 30 ms, wakes up and start all over again (without the retrieving).

Any user can change the configuration of the Device from the Web interface.
So what I need is one way of synching the object in the daemon with the changes made in the web interface, or at least making the daemon aware of the changes made.

To explain the situation more over, suppose I change the parser used by a Device Object in the web inteface, but the same Device Object (it's no the same object per se, the same representation in different JVM), that is detached, has the old parser associated. So, before the object is saved by the daemon (and the changes made by user reverted), I need to sync (or merge the changes), and then save the information recived from the datagram.

One consideration is that the Device Objects could be hundreds.

Hope I explain clearly enough the situation.

So, what do you recommend?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.