No, you can't share a persistence unit across applications.
I am interested to know why you can't duplicate persistence unit along
with entity classes in each application. I understand duplication has
its own maintenance problems, but is that the only concern? Or, Are you
worried about performance impact like higher memory foot-print?
Thanks,
Sahoo
glassfish_at_javadesktop.org wrote:
> Thanks a lot for the follow-up.
>
> From what I understand from this and other forums, there is no packaging scheme that would allow different applications to use the same persistence unit. I could try to find some hack to let it work under glassfish, probably in a non-portable way, but I would then face the problem that entities come from a different classloader from the one I expect... Could someone confirm this? Do someone think I have an alternative to share a persistence unit?
> [Message sent by forum member 'ymajoros' (ymajoros)]
>
> http://forums.java.net/jive/thread.jspa?messageID=295574
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>