users@glassfish.java.net

How to change database source when using entity beans

From: <glassfish_at_javadesktop.org>
Date: Fri, 06 Feb 2009 06:27:33 PST

I want to change from the current database to a different database instance; the new instance is on a different url. I can do this from the netbeans ide, and I also have to recapture the schema from the database (after setting driver to the db url); I then rebuild and redeploy. I am using entity beans. This is the only way I know to change the db that the driver is pointing to and to change the *.dbschema file to point to the new db.

We have a requirement to be able to read from a config file and change the db upon a redeploy (not using netbeans). Do you know how this can be done in java code? Thanks for any help.
[Message sent by forum member 'pdecker' (pdecker)]

http://forums.java.net/jive/thread.jspa?messageID=330527