axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r543471 - in /webservices/axis2/trunk/java/modules: clustering/src/org/apache/axis2/clustering/context/ clustering/src/org/apache/axis2/clustering/context/commands/ clustering/src/org/apache/axis2/clustering/control/ clustering/test/org/apa...
Date Fri, 01 Jun 2007 12:27:08 GMT
Author: azeez
Date: Fri Jun  1 05:27:07 2007
New Revision: 543471

URL: http://svn.apache.org/viewvc?view=rev&rev=543471
Log:
1. Removing addContext & removeContext methods from ContextManager interface. 
2. Cleaning up all code related to 1
3. Handle situation where there is only a single member in the cluster. In such a case, this
member need not wait for ACKs.
4. ContextListener interface is no longer needed


Removed:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/CreateServiceContextCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/CreateServiceGroupContextCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/CreateSessionContextCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/DeleteServiceContextCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/DeleteServiceGroupContextCommand.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ContextListener.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/context/ContextListenerTest.java
Modified:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/DefaultContextManager.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceContextCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceGroupContextCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateResponseCommand.java
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/clustering/context/ContextManager.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java
Fri Jun  1 05:27:07 2007
@@ -197,46 +197,4 @@
         }
         return false;
     }
-
-    public static ContextClusteringCommand getCreateCommand(AbstractContext abstractContext)
{
-        if (abstractContext instanceof ServiceGroupContext) {
-            ServiceGroupContext sgCtx = (ServiceGroupContext) abstractContext;
-            ServiceGroupContextCommand cmd = new CreateServiceGroupContextCommand();
-            cmd.setUniqueId(UUIDGenerator.getUUID());
-            cmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName());
-            cmd.setServiceGroupContextId(sgCtx.getId());
-            return cmd;
-        } else if (abstractContext instanceof ServiceContext) {
-            ServiceContext serviceCtx = (ServiceContext) abstractContext;
-            ServiceContextCommand cmd = new CreateServiceContextCommand();
-            ServiceGroupContext sgCtx = (ServiceGroupContext) serviceCtx.getParent();
-            cmd.setUniqueId(UUIDGenerator.getUUID());
-            cmd.setServiceGroupContextId(sgCtx.getId());
-            cmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName());
-            cmd.setServiceName(serviceCtx.getAxisService().getName());
-            return cmd;
-        }
-        return null;
-    }
-
-    public static ContextClusteringCommand getRemoveCommand(AbstractContext abstractContext)
{
-        if (abstractContext instanceof ServiceGroupContext) {
-            ServiceGroupContext sgCtx = (ServiceGroupContext) abstractContext;
-            ServiceGroupContextCommand cmd = new DeleteServiceGroupContextCommand();
-            // TODO: impl
-            cmd.setUniqueId(UUIDGenerator.getUUID());
-            cmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName());
-            cmd.setServiceGroupContextId(sgCtx.getId());
-            return cmd;
-        } else if (abstractContext instanceof ServiceContext) {
-            ServiceContext serviceCtx = (ServiceContext) abstractContext;
-            ServiceContextCommand cmd = new DeleteServiceContextCommand();
-            // TODO: impl
-            cmd.setUniqueId(UUIDGenerator.getUUID());
-            cmd.setServiceGroupName(serviceCtx.getGroupName());
-            cmd.setServiceName(serviceCtx.getAxisService().getName());
-            return cmd;
-        }
-        return null;
-    }
 }

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/DefaultContextManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/DefaultContextManager.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/DefaultContextManager.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/DefaultContextManager.java
Fri Jun  1 05:27:07 2007
@@ -19,10 +19,9 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.clustering.ClusteringFault;
-import org.apache.axis2.clustering.MessageSender;
+import org.apache.axis2.clustering.context.commands.ContextClusteringCommandCollection;
 import org.apache.axis2.clustering.tribes.AckManager;
 import org.apache.axis2.clustering.tribes.ChannelSender;
-import org.apache.axis2.clustering.context.commands.ContextClusteringCommandCollection;
 import org.apache.axis2.context.AbstractContext;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ServiceContext;
@@ -49,19 +48,7 @@
 
     public DefaultContextManager() {
     }
-
-    public String addContext(final AbstractContext context) throws ClusteringFault {
-//        ContextClusteringCommand cmd = ContextClusteringCommandFactory.getCreateCommand(context);
-//        processor.process(cmd);
-        return null;
-    }
-
-    public String removeContext(AbstractContext context) throws ClusteringFault {
-//        ContextClusteringCommand cmd = ContextClusteringCommandFactory.getRemoveCommand(context);
-//        processor.process(cmd);
-        return null;
-    }
-
+    
     public String updateContext(AbstractContext context) throws ClusteringFault {
         ContextClusteringCommand cmd =
                 ContextClusteringCommandFactory.getUpdateCommand(context,

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceContextCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceContextCommand.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceContextCommand.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceContextCommand.java
Fri Jun  1 05:27:07 2007
@@ -47,7 +47,7 @@
             try {
                 AxisService axisService =
                         configurationContext.getAxisConfiguration().getService(serviceName);
-                ServiceContext serviceContext = sgCtx.getServiceContext(axisService, false);
+                ServiceContext serviceContext = sgCtx.getServiceContext(axisService);
                 propertyUpdater.updateProperties(serviceContext);
             } catch (AxisFault e) {
                 throw new ClusteringFault(e);
@@ -68,14 +68,14 @@
                 sgCtx.setId(serviceGroupContextId);
                 if (scope.equals(Constants.SCOPE_APPLICATION)) {
                     configurationContext.
-                            addServiceGroupContextintoApplicatoionScopeTable(sgCtx);
+                            addServiceGroupContextIntoApplicationScopeTable(sgCtx);
                 } else if (scope.equals(Constants.SCOPE_SOAP_SESSION)) {
                     configurationContext.
-                            registerServiceGroupContextintoSoapSessionTable(sgCtx);
+                            addServiceGroupContextIntoSoapSessionTable(sgCtx);
                 }
             }
             try {
-                ServiceContext serviceContext = sgCtx.getServiceContext(axisService, false);
+                ServiceContext serviceContext = sgCtx.getServiceContext(axisService);
                 propertyUpdater.updateProperties(serviceContext);
             } catch (AxisFault axisFault) {
                 throw new ClusteringFault(axisFault);

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceGroupContextCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceGroupContextCommand.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceGroupContextCommand.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/UpdateServiceGroupContextCommand.java
Fri Jun  1 05:27:07 2007
@@ -43,7 +43,7 @@
                             .getServiceGroup(serviceGroupName);
             sgCtx = new ServiceGroupContext(configContext, axisServiceGroup);
             sgCtx.setId(serviceGroupContextId);
-            configContext.registerServiceGroupContextintoSoapSessionTable(sgCtx);  // TODO:
Check this
+            configContext.addServiceGroupContextIntoSoapSessionTable(sgCtx);  // TODO: Check
this
         }
         System.err.println("###### Gonna update SG prop in " + serviceGroupContextId + "==="
+ sgCtx);
         propertyUpdater.updateProperties(sgCtx);

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateCommand.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateCommand.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateCommand.java
Fri Jun  1 05:27:07 2007
@@ -47,22 +47,19 @@
             List cmdList = new ArrayList();
 
             // Add the service group contexts, service contexts & their respective properties
-            for (Iterator iter = configCtx.getServiceGroupContexts().keySet().iterator();
-                 iter.hasNext();) {
-                String id = (String) iter.next();
-                ServiceGroupContext sgCtx = configCtx.getServiceGroupContext(id);
-                cmdList.add(ContextClusteringCommandFactory.getCreateCommand(sgCtx));
-                ContextClusteringCommand updateCmd =
+            String[] sgCtxIDs = configCtx.getServiceGroupContextIDs();
+            for (int i  = 0; i < sgCtxIDs.length; i ++) {
+                ServiceGroupContext sgCtx = configCtx.getServiceGroupContext(sgCtxIDs[i]);
+                ContextClusteringCommand updateServiceGroupCtxCmd =
                         ContextClusteringCommandFactory.getUpdateCommand(sgCtx,
                                                                          excludedPropPatterns,
                                                                          true);
-                if (updateCmd != null) {
-                    cmdList.add(updateCmd);
+                if (updateServiceGroupCtxCmd != null) {
+                    cmdList.add(updateServiceGroupCtxCmd);
                 }
                 if (sgCtx.getServiceContexts() != null) {
                     for (Iterator iter2 = sgCtx.getServiceContexts(); iter2.hasNext();) {
                         ServiceContext serviceCtx = (ServiceContext) iter2.next();
-                        cmdList.add(ContextClusteringCommandFactory.getCreateCommand(serviceCtx));
                         ContextClusteringCommand updateServiceCtxCmd =
                                 ContextClusteringCommandFactory.getUpdateCommand(serviceCtx,
                                                                                  excludedPropPatterns,

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateResponseCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateResponseCommand.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateResponseCommand.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/control/GetStateResponseCommand.java
Fri Jun  1 05:27:07 2007
@@ -28,6 +28,8 @@
     private ContextClusteringCommand[] commands;
 
     public void execute(ConfigurationContext configurationContext) throws ClusteringFault
{
+
+        // Run this code only if this node is not already initialized
         if (configurationContext.
                 getPropertyNonReplicable(ClusteringConstants.CLUSTER_INITIALIZED) == null)
{
             configurationContext.

Modified: webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java
Fri Jun  1 05:27:07 2007
@@ -68,9 +68,6 @@
         serviceGroupContext1.setProperty(key2, val2);
         serviceContext1.setProperty(key3, val3);
 
-        clusterManager1.getContextManager().addContext(serviceGroupContext1);
-        clusterManager1.getContextManager().addContext(serviceContext1);
-
         clusterManager1.getContextManager().updateContext(configurationContext1);
         clusterManager1.getContextManager().updateContext(serviceGroupContext1);
         clusterManager1.getContextManager().updateContext(serviceContext1);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/clustering/context/ContextManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/clustering/context/ContextManager.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/clustering/context/ContextManager.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/clustering/context/ContextManager.java
Fri Jun  1 05:27:07 2007
@@ -27,24 +27,6 @@
 public interface ContextManager extends ParameterInclude {
 
     /**
-     * This method is called when a new {@link AbstractContext} is added to the system
-     *
-     * @param context
-     * @return The UUID of the message that was sent to the group communications framework
-     * @throws ClusteringFault
-     */
-    String addContext(AbstractContext context) throws ClusteringFault;
-
-    /**
-     * This method is called when a new {@link AbstractContext} is removed from the system
-     *
-     * @param context
-     * @return The UUID of the message that was sent to the group communications framework
-     * @throws ClusteringFault
-     */
-    String removeContext(AbstractContext context) throws ClusteringFault;
-
-    /**
      * This method is called when properties in an {@link AbstractContext} are updated.
      * This could be addition of new properties, modifications of existing properties or
      * removal of properties.

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
Fri Jun  1 05:27:07 2007
@@ -150,14 +150,6 @@
                     serviceGroupContext = cfgCtx.createServiceGroupContext(axisServiceGroup);
                     applicationSessionServiceGroupContexts
                             .put(serviceGroupName, serviceGroupContext);
-
-                    ClusterManager clusterManager = this.getAxisConfiguration().getClusterManager();
-                    if (clusterManager != null) {
-                        ContextManager contextManager = clusterManager.getContextManager();
-                        if (contextManager != null) {
-                            contextManager.addContext(serviceGroupContext);
-                        }
-                    }
                 }
                 messageContext.setServiceGroupContext(serviceGroupContext);
                 messageContext.setServiceContext(serviceGroupContext.getServiceContext(axisService));
@@ -174,7 +166,7 @@
                         serviceGroupContext = new ServiceGroupContext(this,
                                                                       (AxisServiceGroup)
axisService.getParent());
                         serviceGroupContext.setId(serviceGroupContextId);
-                        registerServiceGroupContextintoSoapSessionTable(serviceGroupContext);
+                        addServiceGroupContextIntoSoapSessionTable(serviceGroupContext);
 //                        throw new AxisFault("Unable to find corresponding context" +
 //                                            " for the serviceGroupId: " + serviceGroupContextId);
                     }
@@ -185,16 +177,8 @@
                     // set the serviceGroupContextID
                     serviceGroupContextId = UUIDGenerator.getUUID();
                     serviceGroupContext.setId(serviceGroupContextId);
-
-                    ClusterManager clusterManager = this.getAxisConfiguration().getClusterManager();
-                    if (clusterManager != null) {
-                        ContextManager contextManager = clusterManager.getContextManager();
-                        if (contextManager != null) {
-                            contextManager.addContext(serviceGroupContext);
-                        }
-                    }
                     messageContext.setServiceGroupContextId(serviceGroupContextId);
-                    registerServiceGroupContextintoSoapSessionTable(serviceGroupContext);
+                    addServiceGroupContextIntoSoapSessionTable(serviceGroupContext);
                 }
                 messageContext.setServiceGroupContext(serviceGroupContext);
                 messageContext.setServiceContext(serviceGroupContext.getServiceContext(axisService));
@@ -244,8 +228,7 @@
         }
     }
 
-    public void registerServiceGroupContextintoSoapSessionTable(
-            ServiceGroupContext serviceGroupContext) {
+    public void addServiceGroupContextIntoSoapSessionTable(ServiceGroupContext serviceGroupContext)
{
         String id = serviceGroupContext.getId();
         serviceGroupContextMap.put(id, serviceGroupContext);
         serviceGroupContext.touch();
@@ -254,8 +237,7 @@
         cleanupServiceGroupContexts();
     }
 
-    public void addServiceGroupContextintoApplicatoionScopeTable(
-            ServiceGroupContext serviceGroupContext) {
+    public void addServiceGroupContextIntoApplicationScopeTable(ServiceGroupContext serviceGroupContext)
{
         if (applicationSessionServiceGroupContexts == null) {
             applicationSessionServiceGroupContexts = new Hashtable();
         }
@@ -338,45 +320,13 @@
         return null;
     }
 
-    protected ArrayList contextListeners;
-
-    /**
-     * Register a ContextListener to be notified of all sub-context creation events.
-     * Note that we currently only support a single listener.
-     *
-     * @param contextListener a ContextListener
-     */
-    public void registerContextListener(ContextListener contextListener) {
-        if (contextListeners == null) {
-            contextListeners = new ArrayList();
-        }
-        contextListeners.add(contextListener);
-    }
-
-    /**
-     * Inform any listeners of a new context
-     *
-     * @param context the just-created subcontext
-     */
-    void contextCreated(AbstractContext context) {
-        if (contextListeners == null) {
-            return;
-        }
-        for (Iterator i = contextListeners.iterator(); i.hasNext();) {
-            ContextListener listener = (ContextListener) i.next();
-            listener.contextCreated(context);
-        }
-    }
-
     /**
      * Create a MessageContext, and notify any registered ContextListener.
      *
      * @return a new MessageContext
      */
     public MessageContext createMessageContext() {
-        MessageContext msgCtx = new MessageContext(this);
-        contextCreated(msgCtx);
-        return msgCtx;
+        return new MessageContext(this);
     }
 
     /**
@@ -387,9 +337,7 @@
      * @return a new ServiceGroupContext
      */
     public ServiceGroupContext createServiceGroupContext(AxisServiceGroup serviceGroup) {
-        ServiceGroupContext sgCtx = new ServiceGroupContext(this, serviceGroup);
-        contextCreated(sgCtx);
-        return sgCtx;
+        return new ServiceGroupContext(this, serviceGroup);
     }
 
     /**
@@ -457,7 +405,27 @@
      *
      * @return Returns hashmap of ServiceGroupContexts.
      */
-    public Hashtable getServiceGroupContexts() {
+    public String[] getServiceGroupContextIDs() {
+        String[] ids = new String[serviceGroupContextMap.size() +
+                                  applicationSessionServiceGroupContexts.size()];
+        int index =0;
+        for (Iterator iter = serviceGroupContextMap.keySet().iterator(); iter.hasNext();)
{
+            ids[index] = (String)iter.next();
+            index ++;
+        }
+        for (Iterator iter = applicationSessionServiceGroupContexts.keySet().iterator();
+             iter.hasNext();) {
+            ids[index] = (String)iter.next();
+            index ++;
+        }
+        return ids;
+    }
+
+    /**
+     * @deprecated Use {@link #getServiceGroupContextIDs} & {@link #getServiceGroupContext(String)}
+     * @return The ServiceGroupContexts
+     */
+    public Hashtable getServiceGroupContexts(){
         return serviceGroupContextMap;
     }
 
@@ -557,8 +525,7 @@
         }
     }
 
-    public void terminate()
-            throws AxisFault {
+    public void terminate() throws AxisFault {
         if (listenerManager != null) {
             listenerManager.stop();
         }
@@ -643,13 +610,10 @@
                     serviceGroupContextMap.remove(s);
                 }
             }
-
         }
     }
 
     public ConfigurationContext getRootContext() {
         return this;
     }
-
-
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContextFactory.java
Fri Jun  1 05:27:07 2007
@@ -87,7 +87,7 @@
             if (Constants.SCOPE_APPLICATION.equals(maxScope)) {
                 ServiceGroupContext serviceGroupContext =
                         configCtx.createServiceGroupContext(axisServiceGroup);
-                configCtx.addServiceGroupContextintoApplicatoionScopeTable(serviceGroupContext);
+                configCtx.addServiceGroupContextIntoApplicationScopeTable(serviceGroupContext);
                 DependencyManager.initService(serviceGroupContext);
             }
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
Fri Jun  1 05:27:07 2007
@@ -157,7 +157,6 @@
 
     public OperationContext createOperationContext(AxisOperation axisOp) {
         OperationContext ctx = new OperationContext(axisOp, this);
-        configContext.contextCreated(ctx);
         return ctx;
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java
Fri Jun  1 05:27:07 2007
@@ -19,8 +19,6 @@
 
 import org.apache.axiom.om.util.UUIDGenerator;
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.clustering.ClusterManager;
-import org.apache.axis2.clustering.context.ContextManager;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.engine.AxisConfiguration;
@@ -132,18 +130,6 @@
      * @throws AxisFault if something goes wrong
      */
     public ServiceContext getServiceContext(AxisService service) throws AxisFault {
-        return getServiceContext(service, true);
-    }
-
-    /**
-     * @param service
-     * @param replicate Indicates whether the newly created ServiceContext
-     *                  has to be replicated across the cluster
-     * @return
-     * @throws AxisFault
-     */
-    public ServiceContext getServiceContext(AxisService service,
-                                            boolean replicate) throws AxisFault {
         AxisService axisService = axisServiceGroup.getService(service.getName());
         if (axisService == null) {
             throw new AxisFault(Messages.getMessage("invalidserviceinagroup",
@@ -156,19 +142,7 @@
         ServiceContext serviceContext = (ServiceContext) serviceContextMap.get(service.getName());
         if (serviceContext == null) {
             serviceContext = new ServiceContext(service, this);
-            getRootContext().contextCreated(serviceContext);
             serviceContextMap.put(service.getName(), serviceContext);
-
-            if (replicate) {
-                ClusterManager clusterManager =
-                        axisService.getAxisConfiguration().getClusterManager();
-                if (clusterManager != null) {
-                    ContextManager contextManager = clusterManager.getContextManager();
-                    if (contextManager != null) {
-                        contextManager.addContext(serviceContext);
-                    }
-                }
-            }
         }
         return serviceContext;
     }
@@ -492,7 +466,7 @@
         this.setParent(cc);
 
         // register with the parent
-        cc.registerServiceGroupContextintoSoapSessionTable(this);
+        cc.addServiceGroupContextIntoSoapSessionTable(this);
 
         //-------------------------------------------------------
         // done, reset the flag

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java?view=diff&rev=543471&r1=543470&r2=543471
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java Fri Jun
 1 05:27:07 2007
@@ -22,8 +22,6 @@
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
-import org.apache.axis2.clustering.ClusterManager;
-import org.apache.axis2.clustering.context.ContextManager;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
@@ -146,20 +144,8 @@
                         .getParent());
 
         serviceGroupContext.setId(serviceGroupContextId);
-        configurationContext.registerServiceGroupContextintoSoapSessionTable(serviceGroupContext);
-        ServiceContext serviceContext = serviceGroupContext.getServiceContext(axisService);
-
-        ClusterManager clusterManager =
-                configurationContext.getAxisConfiguration().getClusterManager();
-        if (clusterManager != null) {
-        	ContextManager contextManager = clusterManager.getContextManager();
-        	if (contextManager!=null) {
-        		contextManager.addContext(serviceGroupContext);
-        		contextManager.addContext(serviceContext);
-        	}
-        }
-
-        return serviceContext;
+        configurationContext.addServiceGroupContextIntoSoapSessionTable(serviceGroupContext);
+        return serviceGroupContext.getServiceContext(axisService);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message