>>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
>>?
I believe via the the EJBObject that you invoked the
remote method on and ThreadLocal storage all of that
is "remembered" by the appserver.
>>-----Original Message-----
>>From: A B [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, July 23, 2001 11:14 AM
>>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".