persistence@glassfish.java.net

Re: how to configure different orm.xml files again

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Tue, 8 Jan 2008 09:39:58 +0100

Hi,

On Tue, Jan 08, 2008 at 09:32:54AM +0100, Johannes Hoehne wrote:
> We use the same EAR file for different EJB servers. Each server uses a
> different data base schema. As it is no problem to use different databases with
> no extra configuration (different targets of the JNDI name) it is not possible
> to use different schemes. At the moment we tell the server by system property
> the name of the configuration file of our (old fashion) persistence framework.
> So we can deploy all the different configuration files within one EAR.
> So far so good but we want to use JPA now. Is there any possibility to redirect
> the file name of the orm.xml. Maybe be an (JNDI) property in the ebj-jar.xml?
>
> Last time I got the answer to inspect the tutorials and examples Of course I
> did this before I wrote this mail. I wasn't able to find a solution of my
> problem. So please help:)

A while back I looked into JBoss Seam and they have a few examples that can be
deployed on different app servers. The reason I bring this up is that they had
an elegant way to include config files for the different app servers in their
ear files. Basically they included an ant script that builds different ear files
for different app servers including the config files for the specific app server
they are building the ear for. Not sure if that is an option for you. Basically
what I suggest is to build different ear files for the different database
schema's. I'm sure you looked into this and discarded this option. But I thought
I'd bring it up anyway :-)


HTH, Wouter van Reeven

-- 
People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"