We are converting a very large multi-module software package from EJB2.1 BMP to EJB3 CMP. Accessing entities from another jar file requires that the persistence.xml file lists the jar file using the "<jar-file>../One.jar</jar-file>" syntax.
Any jar dependencies from the persistence.xml file in "One.jar" also need to be listed in the persistence.xml file in "Two.jar" for the system to load without exceptions.
Can somebody explain why these dependencies cannot be resolved at run-time. Here's an example: -
One.jar -------- <persistence> <persistence-unit> <jar-data-source>java:/db</jta-data-source> </persistence-unit> </persistence> Two.jar -------- <persistence> <persistence-unit> <jar-data-source>java:/db</jta-data-source> <jar-file>../One.jar</jar-file> </persistence-unit> </persistence> Three.jar -------- <persistence> <persistence-unit> <jar-data-source>java:/db</jta-data-source> <jar-file>../Two.jar</jar-file> <jar-file>../One.jar</jar-file> </persistence-unit> </persistence>