• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Change datasource of BMP during runtime

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do i change my BMP's datasource name during runtime? I have a login page to let me to choose which datasource i need, for example, jdbc/datasource1 and jdbc/datasource2. After i choose a datasource name, how can i pass it to my BMP and based on the datasource name and hence i can retrieve data from different database.
If use SessionContext, how to set the SessionContext to store this datasource name? I tried but i could not find any method for me to do so. And can this SessionContext passed to my BMP? What if 2nd user login but choose another datasource name, can the BMP smarts enough to tell which datasource name can it uses? 1st user can see 1st datasource data, and 2nd user can see another database's data based on the datasource.
Pls advise. Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic