• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Audit Logging in Ibatis.

 
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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.

Example:See below
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.

Please reply.....

Thanks and Regards
Deepak Lal
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I need help on this post.
Thanks and Regards
Deepak lal
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I need help on this post. Please help me Ranchers
Thanks and Regards
Deepak lal
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please need help,Anyone who can help me out.
 
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
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.

hope this helps,
Amit
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amit and Ranchers,
I want to accomplish this WITHOUt USING a Trigger (or) a Stored procedure,Any other way ?
Best Regards
Deepak lal
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Help please
 
reply
    Bookmark Topic Watch Topic
  • New Topic