-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Question about JPA and Persistence.xml
PostPosted: Tue Mar 08, 2011 1:05 pm 
Newbie

Joined: Thu Jan 24, 2008 1:35 am
Posts: 9
Hello,

I am starting to use JPA 2 with Hibernate. Is it possible to set the connection information that is in the Persistence.xml file programmatically?

In my case the connection parameters will be entered through the UI and will not be available at startup. If this possible how can I do this?
If not, can I do this with Hibernate directly?

thanks for your help


Top
 Profile  
 
 Post subject: Re: Question about JPA and Persistence.xml
PostPosted: Thu Mar 10, 2011 7:19 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
yes you can do this, have a look in the source code: almost each test starts a differently configured EntityManager, so we need to do it programmatically.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.