We use TanantLazyLoaderValve to load the tenant, if the first request is
coming for webapps. In here we catch the incoming request and load the
tenant and then do remap of request to let tomcat know about the new
contexts added, and the let the request reach the end point. So in here the
requestedSessionID may get change when doing the remap.

But as I verified, the session does not get change. You can do so by
invoking the Carbon Authentication Sample or Servlet Session sample in AS.
So the correct way here to use "request.getSession.getId()", which will
give you the correct result.

Please note that you have to put the this valve *after* CompositeValve in
the catalina-server.xml.

Thanks,
Kishanthan.


On Mon, May 27, 2013 at 4:42 PM, Geeth Munasinghe <[email protected]> wrote:

> Hi
>
> I am writing a component for AS to get web app requests statistics through
> BAM. This component publish requestSessionID in the  stream to BAM.
>
>
> I noticed the $subject few times. Tenant is unloaded after a certain time.
> But when I send a request to that tenant, it get loaded, and request is
> served with one session id. but for the next request, it gets a another
> session id. and all the other requests goes with the second session id.
>
>  Is this suppose happen or is there a bug in tenant loading ?
>
> thanks
> Geeth
>
>
>
>
>
> *G. K. S. Munasinghe
> *
> *Software Engineer,*
> *WSO2, Inc. http://wso2.com *
> *lean.enterprise.middleware.*
> *
> *
> email: [email protected]
> phone:(+94) 777911226
>



-- 
*Kishanthan Thangarajah*
Senior Software Engineer,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com*
Twitter - *http://twitter.com/kishanthan*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to