Historical Data and modified objects

My application receives object trees from a JMS topic, and must persist only those objects that have changed for historical purposes.

If, for example, it receives an object tree with objects A, B, C (which already exist in the database according to their ids) in this hierarchical order (A contains B which contains C), but only object C has changed, only that object will be stored in the database, creating a new entry for historical purposes.

What solution is best for this approach? What technologies (Hibernate, JPA) can help me achieving this?


Here are two fundamentally different approaches to get you started.

  1. Insert the object tree temporary in a table in the database, and then run a stored procedure to do the historical analysis.

  2. Pull out the matching object tree from the database and then determine what to do in your code.

The typical depth of your tree, whether most jms objects result in a change, the rate at which you receive objects, the difficulty of how to detect a change, whether the same objects are sent repeated or not, are all things that will affect the best design choice.

After that, you should worry about what technology to go with.

Need Your Help

Configure Xcode Source Trees from Command Line?


We have a project that uses Xcode "Source Trees".

How to call an array within an array value + foreach

php arrays loops foreach

I have a contact from that suppose to send emails to different people as the dropdown option.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.