My application is based on EJB3 persistence.
All perstistence operations is performed using the credentials of the user specified in the datasource declared inside persistence.xml.
Every time the application writes a new object on database, a trigger logs this operation saving the user that has performed the write ( that's the same user connected to db!!).
Can i dynamically change the user of datasource connection, so the user logged is the user currently authenticated in my application??
I can't modify the logging system based on trigger, it's legacy application!!
My legacy application use mssql server.
Thanks a lot