Hi all, I'm hoping someone might have a suggestion for a strange
challenge.  I'm using both T5 and GWT for the app, but I imagine the
core solution to be independent of either, although for implementation
T5 IOC may be called in.

OK here it is:
I am working on a web app where the app's server side makes
connections to hundreds of databases.
Yes, that's right.

Use case is like this:
User logs into main app, gets a user ASO, etc.
User can enter their personal login/password info for a database, and
select a database from a list.
(The database list items correspond to some hard coded connection
info, like the machine and port, etc.)
Once the connection info has been verified to work by making a test
connection, the connection info is saved as an ASO.
Then for each request, whatever DAO is being used will create a
connection using the info, do stuff, and then close the connection.
A user can only be logged into one of these databases at a time, and
they can change the settings to log into a different db, etc.
The database username and password is different for each user and each database.
There would probably be about 20 users online on average, with a peak of 100.

Right now I'm making Ad Hoc connections using a handmade jdbc
connection factory, and then i close the connection after each
request.
It's painfully slow and error prone, since the connections sometimes
fail to get created.

What I am wondering about is a way to assign a (small) connection pool
for each user that's logged into the system, which at the very least
would be discarded when they timeout or logout.   Custom use of DBCP?
Custom connection pool?  I'm thinking one or two connections per pool,
because I fear the memory requirements.

I'm using Tomcat, which has a read only JNDI, afaict.

Please let me know if you've faced a problem like this before, or how
you would approach it.

Thanks, Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to