Yes, my mistake.
I was thinking the appl. looks for the same persistence-unit name in
openjpa.xml as provided by
Persistence.createEntityManagerFactory("name").
I was wrong, it looks for the name provided in System properties or any
unit with the OpenJPA provider implementation.-Aditi -----Original Message----- From: Patrick Linskey [mailto:[EMAIL PROTECTED] Sent: Thursday, August 16, 2007 6:28 AM To: [email protected] Subject: Re: usage of openjpa.xml As you expected initially, it can be used for defaults. openjpa.xml is loaded before any other configuration data is loaded, so the settings in there will reset the normal defaults. If you also provide overlapping settings in your persistence.xml, then those will override the corresponding settings in openjpa.xml. -Patrick On 8/15/07, Das, Aditi <[EMAIL PROTECTED]> wrote: > Hi , > I am a bit puzzled about the usage of openjpa.xml. > Initially I thought I can define the properties which are used > commonly accross all <persistence-unit> here, and the specific > properties for each unit in persistence.xml. But I immediately > realized my mistake. > > openjpa.xml shares the same xsd as persistence.xml. So, in order to > use it, I have to write the whole <persistence-unit> which will anyway > be overwritten by data in persistence.xml. > > So, why and when do I open it ? Any pointers? > > > Regards, > Aditi > > -- Patrick Linskey 202 669 5907
