On Sat, Feb 25, 2012 at 11:04 AM, Amila Jayasekara <ami...@wso2.com> wrote:

> On Sat, Feb 25, 2012 at 10:47 AM, Thilina Buddhika <thili...@wso2.com>
> wrote:
> > Hi AmilaJ,
> >
> > The existing authentication handler and authorization handler are mainly
> > used for admin services which are exposed only thru the servlet
> transport.
> > These handlers will not process the message, if it is not an admin
> service.
>
> That is true. In the case of ESB (nhttp), are we using
> ServletTransport or NHTTP for admin service communication ?
>

In ESB, we are using Servlet transport for admin service communication.
That is mainly because of the way our Carbon core functionality is
implemented which is coupled with the servlet transport.

Thanks,
Thilina


I am not getting this error for other servers (AS, IS etc ...) but
> only getting for ESB. Thus while debugging i found that
> HTTPServletRequest is null for admin service call MessageContexts in
> ESB. (Please see the debug screen shots attached).
>
> If we are using same servlet transport for admin service communication
> in ESB, how HTTPServletRequest is getting null ?
>
> Thanks
> AmilaJ
>
> >
> > So with nhttp transport, it is not required to process the message at
> these
> > two handlers.
> >
> > Thanks,
> > Thilina
> >
> >
> > On Sat, Feb 25, 2012 at 10:35 AM, Amila Jayasekara <ami...@wso2.com>
> wrote:
> >>
> >> 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
> >
> >
> >
> >
> > --
> > 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
>



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

Reply via email to