Though this might "work", it is not the recommended approach for
GlassFish V3. Bytecode weaving will not work with this approach. This is
because the pu in the lib dir is "loaded" by parent class loader of the
respective classloaders that loads myejb1.jar and myejb2.jar. The
bytecode transformers will be installed on the parent classloader and
will never be triggered while loading classes from myejb1.jar and
myejb2.jar. If you want to have entities in two different jars, put the
jars also in lib dir.
2) The jar file containing the persistence.xml doesn't need to embed an entity.
Thanks again, you made my day !
Le 22 mars 2011 à 19:26, Mitesh Meswani a écrit :
To declare a PU at ear level you need to put it in lib/ dir of the ear like as follows