« Return to Thread: SessionEventListener and Transactions

Re: SessionEventListener and Transactions

by James Sutherland :: Rate this Message:

Reply to Author | View in Thread

Yes, if you use the event's session, it will be the UnitOfWork for the current transaction.


fcalfo wrote:
I'm thinking of using the SessionEventListener to trigger logic that inserts auditing data into a generic auditing table.

If I invoke this logic from the postCalculateUnitOfWorkChangeSet event, will it operate within the same transaction as the entity that is being persisted is operating within?

 « Return to Thread: SessionEventListener and Transactions