You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by daniel steel <se...@yahoo.com> on 2007/03/13 14:23:02 UTC

DBCP and databse url

hi all,
    i am using dbcp - connection pooling with tomcat 5.i am defining  my database credentials and daatabse name in my context file.
  
  but for some of the queries, we need to refer to another database for  reference and i could not find any documentation on how to change the  database once conenction pool is established.
  
  for eg..when pool is started the connections connect to database  helloworld and 95 % of the queries run against it. but for 5% of  queries i have to connect to database test and i do not how to change  the database on the fly.
  
  could any one please let me know on this?
  
  thanks
  dan
  
 
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.

Re: DBCP and databse url

Posted by Mark Shifman <ma...@yale.edu>.
Why don't you just create a second connection pool and grab the one 
datasource or the other
as needed? I have a couple of datasources defined in my context and it 
works fine.
mas


daniel steel wrote:
> hi all,
>     i am using dbcp - connection pooling with tomcat 5.i am defining  my database credentials and daatabse name in my context file.
>   
>   but for some of the queries, we need to refer to another database for  reference and i could not find any documentation on how to change the  database once conenction pool is established.
>   
>   for eg..when pool is started the connections connect to database  helloworld and 95 % of the queries run against it. but for 5% of  queries i have to connect to database test and i do not how to change  the database on the fly.
>   
>   could any one please let me know on this?
>   
>   thanks
>   dan
>   
>  
> ---------------------------------
> It's here! Your new message!
> Get new email alerts with the free Yahoo! Toolbar.
>
>   


-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shifman@yale.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org