The only server independent way I can think of is to pass the username and
password as a parameter to all of the related EJB objects.

You could do this in a specially built serializable object, which could then
hold additional data if you need it.

Good luck.



Jonathan Baker
Internet Applications Division



Dirk Koschuetzki wrote:
>
> Hello,
>
> my customer uses ordinary database authentication mechanisms based
> on userid and password. This "legacy" system has to be encapsulated
> into ejbs. Therefore, I need a way to forward the identity of different
> users of the ejbs to the database. What's the usual way of doing this
> kind of user identification?
>
> The current setup is:
>
> -  One stateless session bean, which receives the userid and passwd in
>    the create method. This bean does not contact the database directly,
>    instead entity beans are used.
>
> -  The entity bean receives the userid and password from the sb and
>    opens the database connections as necessary. The eb receives the
>    user identification either during the call of create or via the only
>    parameter of the findByPK method. BUT: This is ugly, as I have to
>    wrap the user identity into the PK.
>
> Does a "cleaner" mechanism of forwarding the identify (including the
> password!) exist?
>
> Regards,
> Dirk
>
> PS.: A discussion of adopting the database is not helpful to me, as
>      the customer declines this.
>
> ===========================================================================
> 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