Specify a single persistence.xml to be shared by all entities for an EAR file in EAP

Solution Verified - Updated -

Issue

  • An EAR file contains several modules with JPA entity classes packaged in different JAR files
  • Where should the persistence.xml be placed to be shared by all modules?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7
    • 6
    • 5
  • Hibernate
    • 5
    • 4
    • 3
  • JPA
    • 2.*
    • 1

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.