You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ga...@apache.org on 2008/04/03 16:33:39 UTC
svn commit: r644329 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Author: gawor
Date: Thu Apr 3 07:33:39 2008
New Revision: 644329
URL: http://svn.apache.org/viewvc?rev=644329&view=rev
Log:
pass servlet context around
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java?rev=644329&r1=644328&r2=644329&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java Thu Apr 3 07:33:39 2008
@@ -669,6 +669,7 @@
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
Re: svn commit: r644329 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Posted by Saminda Abeyruwan <sa...@gmail.com>.
Hi Dims,
https://issues.apache.org/jira/browse/AXIS2-3710
Also attach the patch to rectifier the problem.
Thank you!
Saminda
On Mon, Apr 7, 2008 at 4:01 PM, Davanum Srinivas <da...@gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Saminda,
>
> JIRA Please as Blocker and Fix version as 1.4
>
> thanks,
> dims
>
>
> Saminda Abeyruwan wrote:
> | 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
> |>
> |>
> |
> |
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Cygwin)
>
> iD8DBQFH+fgYgNg6eWEDv1kRAnHYAKD0+1IYP2Dd4uxqyvToX2V+BSxVnACg168g
> Y+B1E/jjq8tcg6bb0A2BJA4=
> =SgmB
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Saminda Abeyruwan
Senior Software Engineer
WSO2 Inc. - www.wso2.org
Re: svn commit: r644329 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Posted by Davanum Srinivas <da...@gmail.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Saminda,
JIRA Please as Blocker and Fix version as 1.4
thanks,
dims
Saminda Abeyruwan wrote:
| 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
|>
|>
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
iD8DBQFH+fgYgNg6eWEDv1kRAnHYAKD0+1IYP2Dd4uxqyvToX2V+BSxVnACg168g
Y+B1E/jjq8tcg6bb0A2BJA4=
=SgmB
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: svn commit: r644329 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Posted by Saminda Abeyruwan <sa...@gmail.com>.
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