users@glassfish.java.net

Re: Overriding mappings in a persistence unit

From: vince kraemer <Vince.Kraemer_at_Sun.COM>
Date: Thu, 15 Jun 2006 16:31:35 -0700

Marina Vatkina wrote:
> Vince,
>
> You'll need to add an orm.xml in the same META-INF/ as your
> persistence.xml
> with the mapping information, and redeploy the app.
This sounds okay for a developer... what should someone doing
application assembly and/or deployment do?

If the UP is in the WEB-INF/lib of a war file te recipe would read like:
1. explode the war file
2. copy the pu's jar file to some temp location (outside the exploded
war file, preferably)
3. explode the pu jar
4. write an orm.xml file that.... overrides selected mappings OR
overrides all the mappings in the annotated classfiles that are part of
the PU.
5. rebuild the pu jar
6. copy it into the exploded war file.
7 rebuild the war file and redeploy.

Does this sound about right?

Do you know if that orm.xml file could be part of a JSR-88 deployment plan?

vbk
>
> thanks,
> -marina
>