openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: usage of openjpa.xml
Date Fri, 17 Aug 2007 13:49:54 GMT
Yep -- if we only looked for things with the same name, then we'd just
be letting you specify the same data in two places, which wouldn't be
that useful. The goal of that feature is to allow easy configuration
of common defaults without having to use a bunch of XML entity tags.

-Patrick

On 8/16/07, Das, Aditi <Aditi.Das@schwab.com> wrote:
> 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:plinskey@gmail.com]
> Sent: Thursday, August 16, 2007 6:28 AM
> To: users@openjpa.apache.org
> 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 <Aditi.Das@schwab.com> 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
>


-- 
Patrick Linskey
202 669 5907

Mime
View raw message