How do we perform audit logging in Ibatis ?Please post the code in case you have any for Audit logging in Ibatis Framework.I dont want to write a Trigger becaause it is a costly operation and it will be tighly coupled to specific vendor/Database.Any generic soltuion/Code please share.
So i have 2 tables primarily
Primary table:Here Insert/Update/Delete is happening
Audit logging table: Column names are --> Entity/Table Name Inserted/Updated/Deleted|Updated By|Updated On
Please add more of your suggestions./advice you will give me for this approach.
Thanks and Regards
When The Going Gets Tougher,The Tougher gets Going
If you want to do the audit log then you can either write the SQL or execute the Stored procedure that would update the audit table.
Call to this can be embedded before you call your SQLs or Stored procedures in your application.
In a better way of implementing it you can re-factor the code to invoke the SQL or SP in a helper class. This would help you to embed the audit call at one place.
I am not very certain if you have any readily available tool in iBatis that would do the audit logging for you.
I would suggest using the Trigger which would anyway reduce one database call from Data access layer.