javax.sql.DataSource.getConnection(String username, String password) is
probably what you want. That will give you a connection (pooled when
possible) with that logged in user + password. Of course if you *should* use
the db as the security-layer is another topic. Big topic.

Hope it helps!

/Magnus Stenman, the Orion team
http://www.orionserver.com/


----- Original Message -----
From: "david sims" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 03, 2000 7:49 PM
Subject: database connection pooling per caller principal


> Does anyone know if the EJB 1.1 or forthcoming 2.0 spec addresses the
situation
> where each caller principal into an EJB container needs to create its own
> database connection.
>
> Typically, it seems that an EJB container will open a few pooled
connections to
> the database all using a single username/password.
>
> But the security people don't like to see a "proxy" accessing the
database.
> They want the actual EJB caller principal names to be used when creating
> database connections.
>
> I could write this code manually in my BMP beans. Not a problem. But is
there a
> portable way I can do this? Do any of the specs address this issue?
>
> thanks,
> david
>
> --
> David Sims               [EMAIL PROTECTED]
> Sims Computing, Inc.       www.simscomputing.com
>
>
===========================================================================
> 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".

===========================================================================
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