Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

changing database

 
kotesh yadav
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have an doubt that iam using JBoss AS, my scienraio is

inital when start my Application Server it will connects to mysql DB datasource, i will retrieve some values those are DB Names like oracle,sql server,db2 etc in my JSP page iam placed at combo box upto this i am very much successful but now my problem is after gettinh those values in html select box.

if user selects Oracle and in the same screen user can enter connection config details and after submitting the request. At runtime App Server want to connect for that particular Database.

for ex Oracle and its connection parameters then it want to connect that particular Database without restarting the server.

so mysql is internal DB and Oracle is external db. how to manage this scienraio

please anyone knows solution, pls help me out......

[edited to make meaningful subject - was "hi (urgent pls help me out)"]
[ August 03, 2006: Message edited by: Jeanne Boyarsky ]
 
Scott Selikoff
author
Saloon Keeper
Posts: 4032
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hard to follow this one... but have you tried setting of connection pools of each database server?
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know how you would dynamically create conenction pools in JBoss -- although it may be possible. This would be the first avenue of approach I would try.

Failing that, you might try creating your own database connection pooling servlet. It's tricky (the application server will have this implemented far better than any one developer will be able to), but it would be doable.

Another solution (depending on your situation) would be to just maintain a list of permissable database and have the connection pools statically created. The user then just selects one of the pre-defined connections. (Although this may not suit your application -- however, most applications do not have to connect to random databases).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic