You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Saminda Wishwajith Abeyruwan (JIRA)" <ji...@apache.org> on 2008/04/07 12:42:24 UTC
[jira] Created: (AXIS2-3710) fixes for backward compatibility
fixes for backward compatibility
---------------------------------
Key: AXIS2-3710
URL: https://issues.apache.org/jira/browse/AXIS2-3710
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: kernel
Affects Versions: 1.4
Environment: Any
Reporter: Saminda Wishwajith Abeyruwan
Assignee: Davanum Srinivas
Priority: Blocker
Fix For: 1.4
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!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-3710) fixes for backward compatibility
Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586390#action_12586390 ]
Keith Godwin Chapman commented on AXIS2-3710:
---------------------------------------------
The reason is our servlet extends AxisServlet but does not call super.init(), cause we wanna do some specific stuff. Hence the init method in HTTPServlet does not get called. This causes a nullPointer to occur when getServletContext() is done cause the servlet config is not set and is null.
> fixes for backward compatibility
> ---------------------------------
>
> Key: AXIS2-3710
> URL: https://issues.apache.org/jira/browse/AXIS2-3710
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.4
> Environment: Any
> Reporter: Saminda Wishwajith Abeyruwan
> Assignee: Davanum Srinivas
> Priority: Blocker
> Fix For: 1.4
>
> Attachments: axisservlet.patch
>
>
> 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!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-3710) fixes for backward compatibility
Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586404#action_12586404 ]
Jarek Gawor commented on AXIS2-3710:
------------------------------------
In general super.init(ServletConfig) should always be called (as described in JavaDocs and probably the spec too) but it sounds like this cannot be fixed for existing production code but this should be fixed for the future code.
> fixes for backward compatibility
> ---------------------------------
>
> Key: AXIS2-3710
> URL: https://issues.apache.org/jira/browse/AXIS2-3710
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.4
> Environment: Any
> Reporter: Saminda Wishwajith Abeyruwan
> Assignee: Davanum Srinivas
> Priority: Blocker
> Fix For: 1.4
>
> Attachments: axisservlet.patch
>
>
> 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!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-3710) fixes for backward compatibility
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davanum Srinivas resolved AXIS2-3710.
-------------------------------------
Resolution: Fixed
Checked in an alternate fix (645520 in trunk and 645521 in 1.4 branch)
> fixes for backward compatibility
> ---------------------------------
>
> Key: AXIS2-3710
> URL: https://issues.apache.org/jira/browse/AXIS2-3710
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.4
> Environment: Any
> Reporter: Saminda Wishwajith Abeyruwan
> Assignee: Davanum Srinivas
> Priority: Blocker
> Fix For: 1.4
>
> Attachments: axisservlet.patch
>
>
> 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!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-3710) fixes for backward compatibility
Posted by "Saminda Wishwajith Abeyruwan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Saminda Wishwajith Abeyruwan updated AXIS2-3710:
------------------------------------------------
Attachment: axisservlet.patch
fix
> fixes for backward compatibility
> ---------------------------------
>
> Key: AXIS2-3710
> URL: https://issues.apache.org/jira/browse/AXIS2-3710
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.4
> Environment: Any
> Reporter: Saminda Wishwajith Abeyruwan
> Assignee: Davanum Srinivas
> Priority: Blocker
> Fix For: 1.4
>
> Attachments: axisservlet.patch
>
>
> 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!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-3710) fixes for backward compatibility
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586364#action_12586364 ]
Davanum Srinivas commented on AXIS2-3710:
-----------------------------------------
Saminda,
Can you please explain How can adding a line here affect your existing code, especially when you *don't* call AxisServlet 's init?
thanks,
dims
> fixes for backward compatibility
> ---------------------------------
>
> Key: AXIS2-3710
> URL: https://issues.apache.org/jira/browse/AXIS2-3710
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.4
> Environment: Any
> Reporter: Saminda Wishwajith Abeyruwan
> Assignee: Davanum Srinivas
> Priority: Blocker
> Fix For: 1.4
>
> Attachments: axisservlet.patch
>
>
> 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!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org