How do I implement a control interceptor using iBATIS?

I want to log all changes to my database for auditing purposes using an AuditEvent table that stores changed row id (primary key), table name, column name, previous value, new value, modified date (timestamp), operation type (insert / update / delete) and the name of the user who made the change.

I am using SQL Server 2005, but I do not want to use triggers, because since I am using a connection pool, it will be difficult to find the current user.

Hibernate's Interceptor solution is pretty straightforward. How can I do something like this when using iBATIS / iBATOR?

0


a source to share


1 answer


If you are using spring, you can use SqlMapClientDaoSupport to create templated Dao objects that carry over auditing with any supported transaction. If not, there is an option iBatis Doa template, iBatis DAO. This has been discounted so you might be better off with Spring.



0


a source







All Articles