Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 56480 invoked from network); 7 Apr 2008 10:21:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Apr 2008 10:21:42 -0000 Received: (qmail 58316 invoked by uid 500); 7 Apr 2008 10:21:39 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 58262 invoked by uid 500); 7 Apr 2008 10:21:39 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 58251 invoked by uid 99); 7 Apr 2008 10:21:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 03:21:39 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of samindaa@gmail.com designates 64.233.184.238 as permitted sender) Received: from [64.233.184.238] (HELO wr-out-0506.google.com) (64.233.184.238) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 10:20:47 +0000 Received: by wr-out-0506.google.com with SMTP id 68so989587wra.7 for ; Mon, 07 Apr 2008 03:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=IdRu38kquwstEC5Qv5Bpa6/bACLnGf1itTJ/HF6Fx0M=; b=XyPPsKoB+R1EXaTi0pD2oUg3Kb6aVtnyHLDXdHZMf69eBeEEAz6J8G0S6U9v2VJ88WLcL3LLwuDXT2Tjss+ui/xtdeiHpdcAXxoMvskRyJ3S+NqqxxOPTQ251XW1fz0THgpVeP5Gr7H3kRtEPGesa9cuRwoskuVJDa8esbNt80o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=aT2s/HCMsVDO8TDmoc7NsmCtPa1CrNfb8OVB2NeJfYyft1kVqhpZ7ipE23BtMCfpMUVqpaltrbmZNvWTNrP+MW7VaYgPXd3iYtg1sYzg9Df7Khf6KipZGHBqPXRTcDM29vZiuMyyqn3RoezIwOgyN44QgE8PKi6sh8O2poRIU2E= Received: by 10.141.162.5 with SMTP id p5mr1265485rvo.221.1207563666363; Mon, 07 Apr 2008 03:21:06 -0700 (PDT) Received: by 10.141.44.7 with HTTP; Mon, 7 Apr 2008 03:21:06 -0700 (PDT) Message-ID: Date: Mon, 7 Apr 2008 15:51:06 +0530 From: "Saminda Abeyruwan" To: axis-dev@ws.apache.org Subject: Re: svn commit: r644329 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java Cc: gawor@apache.org In-Reply-To: <20080403143340.3F35C1A9832@eris.apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_16820_87598.1207563666359" References: <20080403143340.3F35C1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_16820_87598.1207563666359 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Is there a particular reason to add the line. msgContext.setProperty(HTTPCon > > stants.MC_HTTP_SERVLETCONTEXT, getServletContext()); You will be able to access the context from http servlet request object. Beside the prior added line will break some of the existing production code. getServletContext() will work properly, IFF the user's servlet inherit the init method or if over-rides, it should called the parent init method. In AxisServlet, yes it dose over-rides the init method and calls the parent init. But those of us who have extended AxisServlet to work with, where over-rides the init method to intialize the AxisConfiguration the way our production system wants does not call the parents (AxisServlet) init method. ex: public class MyServlet extends AxisServlet { ... public void init(ServletConfig config) { // my way of initializing axisconfiguration and listeners rather using parent // init, but inheriting parents do* from AxisServlet. } } We used AxisServlet as show above for quite a long time. I'm afraid the prior line of code has broken the backward compatibility of re-using AxisServlet in production environments. Thus, the correct way is to obtain the servlet context from request, rather setting the property. Thus, I would humbly ask to revert the commit to preserve backward compatibility. Thank you! Saminda > msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, > getTransportHeaders(request)); > msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, > request); > msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, > response); > + msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT, > getServletContext()); > > //setting the RequestResponseTransport object > msgContext.setProperty(RequestResponseTransport.TRANSPORT_CONTROL, > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-cvs-help@ws.apache.org > > -- Saminda Abeyruwan Senior Software Engineer WSO2 Inc. - www.wso2.org ------=_Part_16820_87598.1207563666359 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

Is there a particular reason to add the line.

msgContext.setProperty(HTTPCon
stants.MC_HTTP_SERVLETCONTEXT, getServletContext());

You will be able to access the context from http servlet request object.

Beside the prior added line will break some of the existing production code.

getServletContext() will work properly, IFF the user's servlet inherit the init method or if over-rides, it should called the parent init method.

In AxisServlet, yes it dose over-rides the init method and calls the parent init.

But those of us who have extended AxisServlet to work with, where over-rides the init method  to intialize the AxisConfiguration the way our production system wants  does not call the parents (AxisServlet) init method.

ex:
public class MyServlet extends AxisServlet {
    ...
   public void init(ServletConfig config) {
      // my way of initializing axisconfiguration and listeners rather using parent
     // init, but inheriting parents do* from AxisServlet.
  }

}

We used AxisServlet as show above for quite a long  time.

I'm afraid the prior line of code  has broken the backward compatibility of re-using AxisServlet in production environments.

Thus, the correct way is to obtain the servlet context from request, rather setting the property.

Thus, I would humbly ask to revert the commit to preserve backward compatibility.

Thank you!

Saminda






        msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, getTransportHeaders(request));
        msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, request);
        msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, response);
+        msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT, getServletContext());

        //setting the RequestResponseTransport object
        msgContext.setProperty(RequestResponseTransport.TRANSPORT_CONTROL,



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org




--
Saminda Abeyruwan

Senior Software Engineer
WSO2 Inc. - www.wso2.org ------=_Part_16820_87598.1207563666359--