tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: Dynamic Connection
Date Wed, 26 Jan 2005 20:32:18 GMT
Sounds like you can just about totally abandon the idea of using any 
pooling functions provided by DBCP.  If I were designing, I'd construct 
an object that implements javax.sql.DataSource and store it in the 
session as soon as you know what db is being used.  Then on each 
request, get the DS from the session and use it as needed.  Just be sure 
you only store the DS in the session -- don't store the connections.

I'm sure there are other ideas out there as well.


micky none wrote:

>Hi Friends,
>I want to dynamically configure the database,username and password settings,instead of
putting them in conf/server.xml.In other words,I dont know beforehand which database to use,
>with which username and password.It all depends upon the person and the machine from which
it tries to make a connection.In yet another words,I just need to do what the BasicDataSource
is doing i.e get the 
>connection details before making a connection.I am not quite sure if you got my point,but
this is what i've been asked to do and I 
>have no clue as to where to go or what to do.If anyone of you got my point,please help

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message