2 Replies Latest reply on Jun 3, 2011 10:22 AM by shyenuganti

    Does ENVERS do an audit only when the transaction is committed?

    shyenuganti

      I am having a short running BPEL where everything goes end to end in one single transaction. Inside this flow, we have several insert and update operations . We are using Hibernate to work with Database. We are getting the session from context and doing a session.flush() when required. But we cannot start a transaction and end that transaction inside this global transaction.

       

      The problem now is the audit records are not being inserted for the insert/update operations inside the flow. Only the last update at the end of the transaction is being audited. But I can see that the listeners are being called for every update but the audit tables are not populated with audit records.

       

      How can I make Envers to insert audit records for all the inserts/updates? Or is it that Envers only audits when the transaction is committed?