The easiest way is to package your entity classes directly inside
ejb-jar. See the following structure. <jar-file> element is typically
used to reference jar files inside the EAR, not ejb-jar. See JPA spec
Chapter 6 Entity Packaging for more details (jcp.org JSR 220)
jar tvf foo-ejb.jar:
META-INF/
META-INF/MANIFEST.MF
META-INF/persistence.xml
META-INF/ejb-jar.xml
com/foo/ejb30/XBean.class
com/foo/entities/A.class
com/foo/entities/B.class
-cheng