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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content