Is it possible to add the entity jar with the jar-file tag within the persistence.xml?
Issue
-
There is an
EARapplication withEJBandhibernateentity classes with additional library ofhibernateentity classes "entityJPA.jar". -
The problem is to tell the additional library classes, where their
data 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 the "testProjectJPA.jar" asJPA jarand handles thepersistenceunit. -
Is it possible to add the "entityJPA.jar" with the
<jar-file>tag within thepersistence.xml, so that theentityJPA.jarclasses are within the class path and can use thedata sourceof the "testProjectJPA.jar"?
Environment
-
Red Hat JBoss Enterprise Application Platform
- 6.x
-
JPA 2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
