In the JOnAS programmer's guide, you may read the
following, which is perfectly EJB standard, and which
may answer your question :
For the database user and password, you may choose to put it in the
DataSource description (<DataSource name>.properties file) and your
Enterprise Beans use the getConnection() method, or not to have it in the
DataSource description and having your Enterprise Bean use the
getConnection(String username, String password) method. In the resource
reference of the associated datasource, in the standard
deployment descriptor, the <res-auth> element should have the
corresponding value, i.e. Container or Bean.
Best regards,
Fran�ois
[EMAIL PROTECTED] wrote:
> I made an EJB (CMP-EB) that accesses a relational database. This works fine. Now I
>need the following:
> 1) The database password may not be seen from anyone but the bean programmer. This
>is due to the fact that the password is a
> company confidential and may not be seen even from the JOnAS admin. How could this
>be done (maybe there is a hook where JOnAS
> asks the bean for the password if it cannot find it in the DD)?
> 2) I need different user ID and Password for the access to the DB, because there are
>different user permissions. How can this
> be done without complete managing persistency manually?
> Thank you
> Markus
--
==================================================================
Francois EXERTIER Evidian (Groupe Bull)
1, rue de Provence, BP 208, 38432 Echirolles cedex, FRANCE
mailto:[EMAIL PROTECTED]
http://www.evidian.com/jonas http://www.objectweb.org/jonas
Tel: +33 (0)4 76 29 71 51 - Fax: +33 (0)4 76 29 76 00
==================================================================
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".