|Re: dynamically configure javax.persistence.jdbc.url? [message #531834 is a reply to message #531822]
||Thu, 06 May 2010 10:16
| Tom Eugelink
Registered: July 2009
On 2010-05-06 11:55, Olu wrote:|
> I'm writing a desktop app in Jave SE and want to be able to enable the
> users to change the embedded JavadDB database they are working from on
> the fly.
> Does any know if there is a way to pgramatically change the value of
> javax.persistence.jdbc.url and effectively restart the app?
> I guess the longer (possibly "proper") way of doing this would be to
> make the modification/dB selection from a separate launcher app which
> makes the change to the url and restarts the main windown app.....anyone
> know a framework for doing this?
Map<String, Object> lOptions = new HashMap<String, Object>();
EntityManagerFactory lEntityManagerFactory = Persistence.createEntityManagerFactory("xxxx", lOptions);
Powered by FUDForum
. Page generated in 0.11084 seconds