|Re: Initialize EclipseLink at runtime [message #523469 is a reply to message #523268]
||Fri, 26 March 2010 14:01
| Martin Taal
Registered: July 2009
Thanks, I am generating the orm mapping at runtime therefore it is far more handier to not have it in a file somewhere.|
The easiest would be if there is an api which just gets an inputstream or string which I can use. Does such an api exist
(this is what the MetaDataProcessor can do, correct?)?
Btw, I could not find the MetadataProcessor class (I am using Helios), where is it located?
I still would need a persistence.xml file somewhere? Or is there a way to also do that part programmatically?
> Using the JPA Persistence class, you need to have a persistence.xml.
> You could call the EclipseLink PersistenceProvider class directly, or
> create the EclipseLink EntityManagerFactoryImpl directly.
> You would still need some way to define your persistence info and
> mappings. You could create your EclipseLink ServerSession and
> ClassDescriptor and DatabaseMappings directly through code, or use the
> MetadataProcessor to parse your annotations if you have that.
> Why can't you have a file? Where is your mapping info coming from?
With Regards, Martin Taal
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: firstname.lastname@example.org - email@example.com
Web: www.springsite.com - www.elver.org
Powered by FUDForum
. Page generated in 0.02906 seconds