I was halfway through writing a note saying the exact same thing :)

Basically the problem with using Servlets as an intermediary is that
you end up with the threads blocking while waiting for the target
service. The result is very inefficient use of threads and (with a
fixed threadpool size) very poor CPU utilization.

What is your axis2.xml like - did you change from the default? And
which port are you making the request on - the Servlet engine port or
the NHTTP transport endpoint?

I think Asankha is asking the right question --- if you can give us a
better view of what you are trying to achieve we can probably figure
that out without sacrificing the performance.

Paul

On Jan 15, 2008 2:18 PM, Asankha C. Perera <[EMAIL PROTECTED]> wrote:
>
>  Hi Kumaran
>
>  This is to be expected as Synapse by default uses a high performance
> non-blocking http/s transport implementation instead of a servlet runtime
> based transport. Thus typically you do not have a HttpServletRequest around.
> Are you trying to build a 'stateful' mediation configuration? One
> possibility would be to implement your required logic within your custom
> mediator - which is able to store state, and also replicate it within a
> clustered environment. If you can elaborate the business requirement you are
> trying to achieve by accessing the http session, we could suggest a
> technical alternative to achieve the same over the NIO-http/s transport
>
>  asankha
>
>
>
>  Venkatesan, Kumaran wrote:
>
>
> Hi,
>
> We have planned to use the synapse as mediation layer for our service based
> architecture.
>
> There is a requirement to get the handle of the HttpServletRequest object
> under the custom mediator(SessionMediator.java) to tackle the session
> management.
>
> Have tried the below but giving null value for the "HttpServletRequest"
> object.
>
> public class SessionMediator implements Mediator {
>
>     private static final Log log =
> LogFactory.getLog(DiscountQuoteMediator.class);
>
>     public SessionMediator(){}
>
>     public boolean mediate(MessageContext mc) {
>
>
>
>         Axis2MessageContext axis2mc = (Axis2MessageContext)mc;
>
>         org.apache.axis2.context.MessageContext axis2MessageCtx =
> axis2mc.getAxis2MessageContext();
>
>
>
>         HttpServletRequest request =
> (HttpServletRequest)axis2MessageCtx.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
>
> Pls help how to get the "HttpServletRequest"
>
> With Regards
>
> Kumaran
>
>  This email is confidential. If you are not the addressee tell the sender
> immediately and destroy this email
> without using, sending or storing it. Emails are not secure and may suffer
> errors, viruses, delay,
> interception and amendment. Standard Chartered PLC and subsidiaries
> ("SCGroup") do not accept liability for
> damage caused by this email and may monitor email traffic.
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to