The call to getCallerPrincipal() need not return the same value.

For example, the app server may perform

  instance.setCallerPrincipal(user)

just before calling the business method, and the getCallerPrincipal() method
refers to this value.

- Avi
--
This signature intentionally left blank.

> -----Original Message-----
> From: A B [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 23, 2001 19:14
> To: [EMAIL PROTECTED]
> Subject: setSessionContext in Stateless Session Beans
>
>
> I have a problem understanding how stateless session
> beans pick up the current principal.
>
> According to the life cycle diagram, the flow for a
> slsb is  :
>
>  - newInstance()
>  - setSessionContext()
>  - ejbCreate()
>
> ... and when the slsb goes to the "method ready "
> pool, business methods are invoked until it is
> removed.
>
> So how is it that when I ran some tests,
> ctx.getCallerPrincipal().getName() returns me
> the current user who invoked that slsb ? How does
> the slsb get the current, updated caller right if
> setSessionCOntext is called only once in its lifetime
> ?
>
> btw, I also ensured that there was only one slsb in
> the pool.
> - (I checked the weblogic console which showed only
> one active bean.)
>
> Would be grateful if anybody could clarify.
>
> Regards
> - arun
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with
> Yahoo! Messenger
> http://phonecard.yahoo.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