|
From: Rod J. <rod...@in...> - 2003-10-10 21:25:19
|
> I have an additional feature planned - maybe for M3. It is a DataSource wrapper > with callbacks that would be called just before the getConnection() returns the > connection to the JDBCTemplate and before close() is called on the connection. > This would allow you to prepare and un-prepare the connection with custom > database calls. I would use this internally to pass in a web app login user > name and then have triggers use this name instead of the user name used for the > JDBC pool in audit logs and updated_by columns. Yes, I've seen requirements for such functionality. This could also be implemented via an AOP interceptor, and applied to any DataSource defined as a bean. This would be slightly slower, but that wouldn't matter with anything JDBC. Regards, Rod |