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 na...@apache.org on 2008/07/21 06:53:16 UTC

svn commit: r678345 - /webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java

Author: nandana
Date: Sun Jul 20 21:53:15 2008
New Revision: 678345

URL: http://svn.apache.org/viewvc?rev=678345&view=rev
Log:
AXIS2-3908 Fixing in the branch 

Modified:
    webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java

Modified: webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java?rev=678345&r1=678344&r2=678345&view=diff
==============================================================================
--- webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis2/branches/java/1_4/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java Sun Jul 20 21:53:15 2008
@@ -92,6 +92,8 @@
     private boolean closeReader = true;
 
     private static final int BUFFER_SIZE = 1024 * 8;
+    
+    private boolean initCalled = false;
 
     /**
      * Implementaion of POST interface
@@ -421,6 +423,9 @@
      * @throws ServletException
      */
     public void init(ServletConfig config) throws ServletException {
+        
+        // prevent this method from being called more than once per instance
+        initCalled = true;
         super.init(config);
         try {
             this.servletConfig = config;
@@ -494,7 +499,7 @@
      * @throws ServletException
      */
     public void init() throws ServletException {
-        if (this.servletConfig != null) {
+        if (this.servletConfig != null  && !initCalled) {
             init(this.servletConfig);
         }
     }