users@glassfish.java.net

Re: JPA: (toplink) can I share a persistence.xml among differnt modules?

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Fri, 25 Jul 2008 13:51:47 -0700

The web app needs to have at least the persistence.xml or the jar with all the
entities and the persistence.xml included. Also, depending on the way you access
the EMF in your web app, you might need to have a data-source ref in comparison
with the jdbc properties that you defined for the se app.

Regards,
-marina

glassfish_at_javadesktop.org wrote:
> Here is the case:
> I built one project for persistence only, contains all entity classes and of course persistence.xml file and dbschema.
> I also have another two project which use this entity project, one is a web app, the other is a java se app. if I run java se app seperately, everything is ok. But when my web app uses that entity project, it couldn't find any table.
> My question is it possible to do things like my way? if yes, what I did wrong?
> Thanks.
> [Message sent by forum member 'bobxu' (bobxu)]
>
> http://forums.java.net/jive/thread.jspa?messageID=288713
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>