atom feed5 messages in net.java.dev.glassfish.usersRe: Packaging an ear with shared pers...
FromSent OnAttachments
Cédric MarconeMar 22, 2011 4:07 am 
Mitesh MeswaniMar 22, 2011 11:25 am 
Cédric MarconeMar 23, 2011 8:26 am 
SahooMar 23, 2011 10:34 am 
Mitesh MeswaniMar 23, 2011 12:00 pm 
Subject:Re: Packaging an ear with shared persistence.xml
From:Sahoo (sanj@oracle.com)
Date:Mar 23, 2011 10:34:24 am
List:net.java.dev.glassfish.users

Put your persistence.xml and entity classes in a separate jar in ear/lib.

On Tuesday 22 March 2011 04:38 PM, Cédric Marcone wrote:

Hello,

I'm pretty sure there is an easy way to solve my problem but I clearly failed to
find a solution alone...

I'm building an application that has 2 EJB modules. Both of those modules contain entities. Those entities needs to persist in the same database. The target app server is GF 3.1.

I could clearly declare 2 persistence.xml (one per EJB module) but :

1) that's far from ideal 2) one of those modules is a library that cannot be modified

I saw that I could package the persistence.xml at the ear level but I cannot get
it to work.

Did anyone ever tried - or succeeded ;) - in doing such a thing ?

Thanks for your help.