-----Original Message-----
From: Thomas Moore <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, March 25, 1999 6:18 AM
Subject: Connection Pool (was Re: Can anyone explain this to me.)



<snip>


>> I have different users logging in, I
>> am unable to get their user ID and password, as the variables have not
>> yet been initialised.
>Well, then you won't be able to use this particular pattern...
>ObjectPools are for instances when one object is virtually identical to
>another, such that it doesn't matter which instance a client uses.
>While it would work for a hard coded (e.g. guest) account, it will not
>serve well for a connection based on an individual's login and
>password...
>


I think one could still use an objectpool.
Just keep connections i the pool, open the connection as administrator (or
at least someone who can switch user-ids).
Then when the client requests a connection, switch from administrator-user
to whatever user you want and use the connection.
Switch back after the client is done with the connection and it is restored
in the pool.
There is a drawback to this.
You are giving up security. You might not want to do that, or you have to
work your way around.
We tried it and it worked. We just specified the userid & password when we
requested the connection, but it can also be done
at a later time.

It is a tradeoff one makes


Hope this helps,
Vince M. Treur

-----------------------------------------
In stereo, where available.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to