|
Hi David,
I have attached a patch. I used a different logic for path resolution. This is because on going through the spec I found that the paths should be relative to the jar containing the ejb and not the ear. ref 16.10.2 The Application Assembler specifies the path name of the root of the referenced persistence unit and appends the name of the persistence unit separated from the path name by # . The path name is relative to the referencing application component jar file. In this manner, multiple persistence units with the same persistence unit name may be uniquely identified when persistence unit names cannot be changed. Example from the spec
For example, ... <enterprise-beans> <session> ... <ejb-name>InventoryManagerBean</ejb-name> <ejb-class> com.wombat.empl.InventoryManagerBean </ejb-class> ... <persistence-unit-ref> <description> Persistence unit for the inventory management application. </description> <persistence-unit-ref-name> persistence/InventoryAppDB </persistence-unit-ref-name> <persistence-unit-name> ../lib/inventory.jar#InventoryManagement </persistence-unit-name> </persistence-unit-ref> ... </session> </enterprise-beans> Here if the path is relative to the EAR we will never have to give ../ as all paths will start from the ear root. Also only the jars in a single EAR are required to be referenced so we will not have to give ../ at all. patch[1]_r485581_
This patch fixes issues with the previous one which caused test failures. All the tests are passing with this patch. Pls use this and not the other one Patch with the tests as instructed by David B
Thanks for the patches Manu T George.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
org.apache.openejb.assembler.classic.JndiEncBuilder
org.apache.openejb.assembler.classic.JndiEncInfo
org.apache.openejb.jee.JndiConsumer
org.apache.openejb.alt.config.EjbJarInfoBuilder
org.apache.openejb.test.entity.cmp.CmpJndiEncTests
org.apache.openejb.test.entity.bmp.BmpJndiEncTests
org.apache.openejb.test.stateless.StatelessJndiEncTests
org.apache.openejb.test.stateless.StatefulJndiEncTests