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

-----Original Message-----
From: Chen, Andy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 12, 2000 3:44 PM
To: [EMAIL PROTECTED]
Subject: [Q] How can a BMP connect to DB w/ each user's pwd and id?


Hi, I wonder if anybody try this before.

I am trying to create a BMP Entity Bean with a getConnection() method to
connect to a database. Instead using a general account to connect the
database to those BMP Beans through. JDBC or data source, we like to use
each end user's password and id to create the connection. (Just like those
old client-server programs)

Is this possible? Is this against the EJB rules? If not, where should I
store this info?  PrimaryKey? EJBBean? Or SessionBean?

Thanks in advance,

Andy

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


STATEMENT OF CONFIDENTIALITY.   The information contained in this electronic
message and any attachments to this message are intended for the exclusive
use of the addressee(s) and may contain confidential or privileged
information. If you are not the intended recipient, please notify
USPowerSolutions Corporation immediately at (617) 547-3800, or at
[EMAIL PROTECTED], and destroy all copies of this message and any
attachments.

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