On Sat, Feb 25, 2012 at 10:20 AM, Thilina Buddhika <thili...@wso2.com> wrote:
> Hi Amila,
>
> Just for my information, Where have we used this particular code ?

@Thilina,

We have used code like below in AuthorizationHandler as well as in
existing AuthetnicationHandler.

@carbon-dev
Also did we verify ESB functionality after Tomcat OSGIfication ? If so
was that verification successful ? Cos, ideally a user should not be
able to login to ESB as HttpServletRequest in message context is null.
Should throw a NullpoionterException in AuthenticationHandler.

Thanks
AmilaJ



>
> 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
>



-- 
Mobile : +94773330538
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to