Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

History Tracking  RSS feed

kiran mahavir
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am using EJB in my projects.

I want to discuss/know about "How to track history of Domain object changes". An example may clear what I intend.

If an Employee's name is changed from Employee_A to Employee_B, this change has to be logged and must be shown to the user what all changes that particular employee has been through. So, what is the best strategy we can employ to track these changes?

All the attributes of the entity needs to be tracked. An entity has all kinds of relationships (many to many, one to many etc) with other entities.

Right now I am using a crude method. In Session beans (that interacts with entities), in am getting the old record and comparing the changes the front end has passed and logging it.

One of my team member has proposed using DB triggers. But that may lead to lot of replicated code.

I couldn't gather much info on Net.

Please put forward other solution of doing this.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!