I don't think this is such a good solution. You would be effectively
coding around the connection pooling of your appserver. When you have a
whole bunch of users concurently using your app, you would have the same
whole bunch of pool instances running. Keep in mind that a DB connection
uses about 2 megs of memory for each connection, this is besides the
memory used by the appserver to manage the pools.

I wonder why you would need to use each users database login to connect
to the database. If you're concerned with the security issue, say some
users may not alter the payroll records you should imho create security
roles and check if the user is in the role.

sven

"Bhattacharyya, Ana" wrote:
>
> what u can do is -- this is weblogic specific ---
> have pools for each user/password pair -- the pool size being 1 (max) (u can
> create connection pools in weblogic.properties file.
> maintain that mapping in a prop file like
> user1=pool1
> user2=...
>
> whenever a request comes identify who the user is and from the prop file
> find what pool it maps to. then just call
> DataSource ds = (javax.sql.DataSource)
>            ctx.lookup("java:comp/env/jdbc/"+poolname);
> and ds.getConnection();
> job done.
> HTH
> Ana


--
======================================================================================
Sven van 't Veer                                              http://www.cachoeiro.net
Java Developer                                                      [EMAIL PROTECTED]
======================================================================================

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to