Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gemini-dev] Gemini JPA - EntityManager question

Hi Andras,

Yes, that is precisely what the EntityManagerFactoryBuilder is for. You can leave out the properties from the persistence.xml file, and then when you call createEntityManagerFactory() on the builder you can pass them in as properties.

-Mike

P.S. There is a forum that you can post questions to that we encourage people to use. That way others who may have the same questions can see the replies. See http://www.eclipse.org/forums/index.php/f/153

On 9/29/2011 6:00 AM, András Liter wrote:
Dear Gemini developers,

I know its a developer ml, but I just didnt find any user mail list for Gemini JPA, so I put my question here.

Is it possible to configure an EntityManager with the database URL from code, via EntityManager's EntityManager(Map m) constructor?

So far I made it work from persistence.xml, but I tried to have a Map in the constructor of EM (with only one URL property, other props stayed in persistence.xml), and get the following error during EM instantiantion:

Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: URL was not specified

Do you have any ideas, how to make this "programmable" configuration work?

Thank in advance,
András Liter
_______________________________________________ gemini-dev mailing list gemini-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/gemini-dev

Back to the top