Author: supun
Date: Thu Sep 23 05:20:47 2010
New Revision: 1000321

URL: http://svn.apache.org/viewvc?rev=1000321&view=rev
Log:
Fixes for api changes

Modified:
    
synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseAxisServlet.java

Modified: 
synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseAxisServlet.java
URL: 
http://svn.apache.org/viewvc/synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseAxisServlet.java?rev=1000321&r1=1000320&r2=1000321&view=diff
==============================================================================
--- 
synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseAxisServlet.java
 (original)
+++ 
synapse/branches/2.0/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseAxisServlet.java
 Thu Sep 23 05:20:47 2010
@@ -43,14 +43,17 @@ public class SynapseAxisServlet extends 
     public void init(ServletConfig config) throws ServletException {
         ServletContext servletContext = config.getServletContext();
 
-        //TODO SUPUN
-        /*this.configContext = (ConfigurationContext) 
ServerManager.getInstance().
-                getServerContextInformation().getServerContext();*/
-        this.axisConfiguration = this.configContext.getAxisConfiguration();
-        servletContext.setAttribute(this.getClass().getName(), this);
-        this.servletConfig = config;
-        agent = new ListingAgent(configContext);
-        initParams();
+        ServerManager serverManager = (ServerManager) 
config.getServletContext().
+                getAttribute(SynapseStartUpServlet.SYNAPSE_SERVER_MANAGER);
+        if (serverManager != null) {
+            this.configContext = (ConfigurationContext) serverManager.
+                    getServerContextInformation().getServerContext();
+            this.axisConfiguration = this.configContext.getAxisConfiguration();
+            servletContext.setAttribute(this.getClass().getName(), this);
+            this.servletConfig = config;
+            agent = new ListingAgent(configContext);
+            initParams();
+        }
     }
 
     public void initContextRoot(HttpServletRequest req) {


Reply via email to