users@glassfish.java.net

How to dynamically connect Glassfish to different Databases

From: <glassfish_at_javadesktop.org>
Date: Wed, 16 Apr 2008 11:36:18 PDT

I have a good question for you all. We have couple of Databases here like production DB, Testing DB, Development DB etc...This are all different physical DB. Now some times I may need to connect to Development Db and sometimes and may need to connect to Testing DB. For this everytime i need to go in Glassfish and configure DB connection settings. Do we have any way where in I can connect which ever DB I want to through a runtime changes without actually going to Glassfish server and making changes there .Using a seperate glassfish instance for every Db may not help me. Here I can have a GUI screen where user can select which DB he wants to connect. Based on this selection I need to make changes programmatically so that my middle tier project goes and connects to that particular DB.

Regards

Cool Deep
[Message sent by forum member 'cool9889' (cool9889)]

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