Hi Amila, Just for my information, Where have we used this particular code ?
Thanks, Thilina On Fri, Feb 24, 2012 at 10:59 PM, Amila Jayasekara <ami...@wso2.com> wrote: > Hi All, > > For certain operations we get HttpServletRequest as follows, > > HttpServletRequest request = (HttpServletRequest) msgContext > .getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST); > > HttpSession httpSession = request.getSession(false); > ... > > But above will not be valid when it comes nhttp (ESB) transport. Thus > we have logic written assuming that if HttpServletRequest is null > handle request for NHTTP transport. > > As per current trunk if we try to get HttpServletRequest within ESB we > get null. But the situation is different in previous releases. (3.2.2 > and before). So in 3.2.2 ESB if i execute above code i will get an > implementation of HttpServletRequest. Thus the exact implementation is > org.wso2.carbon.core.transports.metering.MeteredServletRequest. > > I believe difference between trunk and 3.2.2 is after Tomcat OSGIfication. > > I am bit confused about this. What should be the correct > implementation here? (should HttpServletRequest be null for nhttp or > should it have a value ?). Also how nhttp is getting a servlet request > ? > > Due to this certain logic breaks as we get a HttpServletRequest object > in NHTTP transport. (cos - we write logic thinking that > HttpServletRequest is null for nhttp transport) > > Really appreciate your feedback as i am stuck on this. > > Thank you > Regards, > AmilaJ > > -- > Mobile : +94773330538 > > _______________________________________________ > Carbon-dev mailing list > Carbon-dev@wso2.org > http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- Thilina Buddhika Associate Technical Lead WSO2 Inc. ; http://wso2.com lean . enterprise . middleware phone : +94 77 44 88 727 blog : http://blog.thilinamb.com
_______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev