Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes Change datasource of BMP during runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Change datasource of BMP during runtime" Watch "Change datasource of BMP during runtime" New topic
Author

Change datasource of BMP during runtime

yik yang
Greenhorn

Joined: May 30, 2002
Posts: 6
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Change datasource of BMP during runtime
 
Similar Threads
Populating DropDown in javascript
how to implement Concurrent access to records..Please help me URGENTLY
change my BMP's datasource name during runtime?
Runtime JNDI username change not work
change my BMP's datasource name during runtime?