Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] Defining persistence.xml programmatically?

Tim,

You can definitely avoid putting any database login information in your EclipseLink configuration files. I have recently blogged about a common framework I use for testing JPA outside of a container. This will work as well for any JavaSE or RCP application usage where the additional properties are passed in through a properties map to the Persistence.createEntitymanagerFactory call.

http://java-persistence.blogspot.com/2008/02/testing-eclipselink-jpa-in-javase.html

On Friday night I moved some of this content into the EclipseLink wiki example pages to make it more available.

http://wiki.eclipse.org/EclipseLink/Examples/JPA/OutsideContainer

I hope this addresses your issue,

Doug

-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx]On Behalf Of Tim Hollosy
Sent: Monday, March 31, 2008 11:49 AM
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] Defining persistence.xml programatically?


I'm looking into using EclipseLink in an RCP application, and for
obvious reason's i'm not keen on distributing my database login info
in an xml file.

I'd like to define it programatically in java, however all the
documentation I can find just talks about defining a project.xml or
sessions.xml

Has anyone done this?

--
./tch
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top