Disable Envers for a specific deployment

Solution Verified - Updated -

Issue

User uses a common domain model for a number of different deployments and would like to activate auditing with Envers for some deployments and not for others.

It appears though, that as soon as user add @Audited annotations to domain entities, Envers is automatically picking those up and looks for the tables that are required for logging. Is there a way to disable Envers in persistence.xml for some deployments? In previous versions it had to be enabled explicitly by adding EJB phase listeners to persistence.xml.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.