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.