If busctrl.jar
isn't a "deployed" component (containing EJBs) then move it into lib/busctrl.jar
within the EAR file where it'll be visible on the classpath of the war file.
If it does contain EJBs, then some surgery needs to occur:
move EJBs definitions (implementations) into jar file(s) to be placed at the root level of the EAR file (
/busEjb.jar
).move remote EJB declarations into their own JAR file to be placed in the EAR library (
/lib/busEjbClient.jar
).move JPA entities & persistence.xml file into their own JAR file to be placed in the EAR library (
/lib/busModel.jar
).
Nothing in my review of the topic suggests that what you did in your original post shouldn't work in Glassfish, or other app servers. The class loader hierarchy should have made the persistence.xml file available.
That said, most discussions tend toward the best-practice of placing the persistence.xml file and entity classes into a separate library. I suspect this has to do with both the class loader hierarchy (possibly not a problem in this case) and with the internal search tooling to locate the persistence.xml file - which would be implemented by EclipseLink in this case. This discussion on EclipseLink may be relevant.