This content has been marked as final. Show 2 replies
Is it possible to separate my entityies and session beans?
Yes, its possible.
If I don't add persistence.xml to the JAR with entities hibernate don't see them (no tables will be created). If I add persistence.xml to both session beans JAR and entities JAR hibernate generate IllegalArgumentException: Unknown entity on each EntityManager call.
Add the persistence.xml in the META-INF folder of your ejb jar and use the jar-file element in the persistence.xml to point to the entities jar. If you run into any exceptions, please post the details which includes the JBoss, Java version and the entire exception stacktrace.
Thank you for the tip. It works.