Adding entity jar with the jar-file tag within the persistence.xml in JBoss EAP 6
Issue
- There is an
EARapplication withEJBandhibernateentity classes with additional library ofhibernateentity classes "entityJPA.jar". The problem is to tell the additional library classes, where theirdata sourceis. Following is directory structure of that application.
------- EAR structure -------
testProject.ear
|
|- META-INF
| |- application.xml
| |- jboss-deployment.structure.xml
|
|- testProjectJPA.jar
| |
| |- persistence.xml
|
|- lib
| |
| |- entityJPA.jar
------------------------------------
-
JBossscans theJPA jarfor thepersistence.xmland recognizes thetestProjectJPA.jarasJPA jarand handles thepersistenceunit. -
Is it possible to add the
entityJPA.jarwith the<jar-file>tag within thepersistence.xml, so that theentityJPA.jarclasses are within the class path and can use thedata sourceof thetestProjectJPA.jar?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- Java Persisteance API (JPA)
- 2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.