2 Replies Latest reply on Feb 19, 2009 1:43 PM by Samuel Doyle

    On demand triggering?

    Samuel Doyle Apprentice

      Hi,

      I just started looking at envers for a specific feature request.

      Is it possible to disable envers and request the versioning in an *on demand* fashion?

      There are times when storing all the version information would be overkill but would be very nice in certain situations.

      Thanks

        • 1. Re: On demand triggering?
          Adam Warski Master

          Hello,

          no, this is not yet implemented (there is a feature request for it, though), but you can easily do it yourself.

          You just need to extend AuditEventListener and override all of the pre/post methods, delegating to super only if your should-version condition is met. And then specify the new event listener in the configuration.

          --
          Adam

          • 2. Re: On demand triggering?
            Samuel Doyle Apprentice

             

            "adamw" wrote:
            Hello,

            no, this is not yet implemented (there is a feature request for it, though), but you can easily do it yourself.

            You just need to extend AuditEventListener and override all of the pre/post methods, delegating to super only if your should-version condition is met. And then specify the new event listener in the configuration.

            --
            Adam


            Great and thanks!