users@glassfish.java.net

Re: persistence.xml in multiple EJB module EAR

From: Sahoo <sahoo_at_sun.com>
Date: Tue, 08 Apr 2008 21:07:44 +0530

Put common classes (classes used by multiple modules) in a jar in lib
directory in the the ear. Then add a persistence.xml to each ejb module.
Don't forget to run verifier with your ear, it is good at finding
packaging issues related to persistence.xml.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> Hey guys,
>
> I'm having significant problems with glassfish correctly deploying my EAR. It consists of multiple EJB modules, all having their own entities but some entities from one ejb module inherit from entities in another. My question now is, where am I supposed to put which persistence.xml? I've tried giving each ejb module it's own persistence.xml, this fails with glassfish claiming it cant find the relevant class (so it knows which entity class to examine somehow, but fails to find the same class it needed to make this determination).
>
> In short, given this scenario and the following application.xml (removed some clutter), how and where do i define the persistence.xml in the ear, in which jar or which directory of the EAR :
>
> <application>
> <display-name>project-ear</display-name>
> <module>
> <ejb>base.jar</ejb>
> </module>
> <module>
> <ejb>extension.jar</ejb>
> </module>
> </application>
> [Message sent by forum member 'remonvv' (remonvv)]
>
> http://forums.java.net/jive/thread.jspa?messageID=268173
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>