Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » eclipselink programmatically generate persistentunit
eclipselink programmatically generate persistentunit [message #870643] Wed, 09 May 2012 07:50 Go to next message
abdullah ilhanlı is currently offline abdullah ilhanlıFriend
Messages: 2
Registered: May 2012
Junior Member
I have one problem when i tried to generate persistent unit programmatically.
I have two system. These are Configuration Manager(CM) and Business Managemer(BM).
They run on the different context. In BM I used eclipselink for data layer.
You can define database and its user on the CM for BM sign in.
When you define database and its users on the CM, BM didnt know this database and its user. Because on the BM JPA persistence.xml is predefined.
I don't know how many database created on the system.
I need generate persistence unit programmatically.

Is it possible any ideas?
Is it possible with hibernate?
Is it possible run JPA without persistence.xml ?

Thanks in advance

[Updated on: Wed, 09 May 2012 07:56]

Report message to a moderator

Re: eclipselink programmatically generate persistentunit [message #871022 is a reply to message #870643] Thu, 10 May 2012 14:41 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

You can pass persistence unit properties when creating an EntityManagerFactory to change the database and user.

James : Wiki : Book : Blog : Twitter
Previous Topic:use of a literal for EXISTS expressions
Next Topic:Using EclipseLink in OSGi with Gemini JPA. Two questions.
Goto Forum:

Current Time: Mon Jan 18 08:37:31 GMT 2021

Powered by FUDForum. Page generated in 0.01897 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top