Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-3710

fixes for backward compatibility

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.4
    • 1.4
    • kernel
    • None
    • Any

    Description

      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!

      Attachments

        1. axisservlet.patch
          0.8 kB
          Saminda Wishwajith Abeyruwan

        Activity

          People

            dims Davanum Srinivas
            saminda Saminda Wishwajith Abeyruwan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: