axis-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1577345 - /axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
Date Thu, 13 Mar 2014 22:17:56 GMT
Author: veithen
Date: Thu Mar 13 22:17:56 2014
New Revision: 1577345

URL: http://svn.apache.org/r1577345
Log:
Correctly override the AxisServlet init method to avoid the issue described in AXIS2-3710.

Modified:
    axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java

Modified: axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java?rev=1577345&r1=1577344&r2=1577345&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
(original)
+++ axis/axis2/java/core/trunk/modules/osgi/src/org/apache/axis2/osgi/OSGiAxisServlet.java
Thu Mar 13 22:17:56 2014
@@ -15,9 +15,9 @@
  */
 package org.apache.axis2.osgi;
 
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.transport.http.AxisServlet;
-import org.apache.axis2.transport.http.ListingAgent;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
@@ -42,19 +42,25 @@ public class OSGiAxisServlet extends Axi
         this.context = context;
     }
 
-
-    public void init(ServletConfig servletConfig) throws ServletException {
-        this.servletConfig = servletConfig;
+    @Override
+    protected ConfigurationContext initConfigContext(ServletConfig config) throws ServletException
{
         ServiceReference reference =
                 context.getServiceReference(ConfigurationContext.class.getName());
         if (reference == null) {
             throw new ServletException(
                     "An instance of ConfigurationContext is not available to continue the
proccess.");
         }
-        configContext = (ConfigurationContext) context.getService(reference);
-        axisConfiguration = configContext.getAxisConfiguration();
-        agent = new ListingAgent(configContext);
-        initParams();
+        return (ConfigurationContext) context.getService(reference);
+    }
+
+    @Override
+    protected void initTransports() throws AxisFault {
+        // Not sure if this is correct, but the original OSGiAxisServlet code effectively
skipped
+        // the invocation of the initTransports method.
+    }
+
+    public void init(ServletConfig servletConfig) throws ServletException {
+        super.init(servletConfig);
         ServletContext servletContext = servletConfig.getServletContext();
         if (servletContext != null) {
             servletContext.setAttribute(this.getClass().getName(), this);



Mime
View raw message