aspose file tools*
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
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.
 
 
subject: Change datasource of BMP during runtime