Yes, I think so. and you have to use OpenJPA specified APIs instead of JPA 
standard one.

Here is an example:
OpenJPAPersistence.getEntityFactory(map);

The map instance contains the properties from local file.

Thanks

Gene.

> Date: Mon, 10 Sep 2007 20:58:11 -0500
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: Non-EE mapping classes?
> 
> So where can I put this xml file so it will work in my jar? I'm assuming 
> I can then load a properties file that will override the xml settings?
> 
> Gene Wu wrote:
> > In my opinion, for OpenJPA, you have to use one persistence.xml. Here is 
> > the reason.
> >
> > You might create a persistence entity manager without persistence.xml, but 
> > OpenJPA used to enhance java entity classes. The JAVA agent of OpenJPA 
> > (Runtime Enhancement) needs at least one persistence.xml (or orm.xml). 
> > Meanwhile, runtime enhancement has the minimum requirement on configuration 
> > file, even you didn't put your entity class in that file.
> >
> > Thanks,
> >
> > Gene.
> >
> >
> >
> >   
> >> Date: Mon, 10 Sep 2007 20:29:05 -0500
> >> From: [EMAIL PROTECTED]
> >> To: [email protected]
> >> Subject: Non-EE mapping classes?
> >>
> >> How do I map classes if I'm not using persistence.xml or EE? Usually you 
> >> use xml like this:
> >> <class>tutorial.Animal</class>
> >> but I'm using a properties file.
> >>
> >> -- 
> >> Justin Stanczak
> >> Stanczak Group
> >> 812-735-3600
> >>
> >> "All that is necessary for the triumph of evil is that good men do 
> >> nothing."
> >> Edmund Burke
> >>
> >>     
> >
> > _________________________________________________________________
> > Gear up for Halo® 3 with free downloads and an exclusive offer. It’s our 
> > way of saying thanks for using Windows Live™.
> > http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_2
> >   
> 
> -- 
> Justin Stanczak
> Stanczak Group
> 812-735-3600
> 
> "All that is necessary for the triumph of evil is that good men do nothing."
> Edmund Burke
> 

_________________________________________________________________
More photos; more messages; more whatever – Get MORE with Windows Live™ 
Hotmail®. NOW with 5GB storage.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_5G_0907

Reply via email to