• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

changing database

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 4278
34
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hard to follow this one... but have you tried setting of connection pools of each database server?
 
Bartender
Posts: 1843
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic