You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by az...@apache.org on 2007/05/21 13:54:28 UTC
svn commit: r540126 [1/3] - in /webservices/axis2/trunk/java/modules:
clustering/ clustering/src/org/apache/axis2/cluster/configuration/
clustering/src/org/apache/axis2/cluster/configuration/commands/
clustering/src/org/apache/axis2/cluster/context/ cl...
Author: azeez
Date: Mon May 21 04:54:18 2007
New Revision: 540126
URL: http://svn.apache.org/viewvc?view=rev&rev=540126
Log:
Refactoring the clustering code so that it can be reused by other implementations which can be based on different group communication mechanisms.
Added:
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/ConfigurationClusteringCommandFactory.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManager.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManagerListener.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ApplyServicePolicyCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/CommitCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ExceptionCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/LoadServiceGroupsCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/PrepareCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ReloadConfigurationCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/RollbackCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/UnloadServiceGroupsCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/ContextClusteringCommandFactory.java
- copied, changed from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessageFactory.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManager.java
- copied, changed from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManagerListener.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/PropertyUpdater.java
- copied, changed from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/PropertyUpdater.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceContextCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateServiceContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceGroupContextCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateServiceGroupContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateSessionContextCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateSessionContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/DeleteServiceContextCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/DeleteServiceContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/DeleteServiceGroupContextCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/DeleteServiceGroupContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/ServiceContextCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/ServiceContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/ServiceGroupContextCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/ServiceGroupContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/UpdateConfigurationContextCommand.java
- copied, changed from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/UpdateConfigurationContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/UpdateContextCommand.java
- copied, changed from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/UpdateContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/UpdateServiceContextCommand.java
- copied, changed from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/UpdateServiceContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/UpdateServiceGroupContextCommand.java
- copied, changed from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/UpdateServiceGroupContextCommand.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/TribesUtil.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/util/TribesUtil.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/ClusteringCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/CommandMessage.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/MessageSender.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationClusteringCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/ConfigurationCommand.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextClusteringCommand.java
- copied, changed from r539747, webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextCommandMessage.java
Removed:
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/util/
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/CommandMessage.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/CommandType.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationEvent.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationType.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextCommandMessage.java
Modified:
webservices/axis2/trunk/java/modules/clustering/maven.xml
webservices/axis2/trunk/java/modules/clustering/pom.xml
webservices/axis2/trunk/java/modules/clustering/project.xml
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/ChannelListener.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/ChannelSender.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/TribesClusterManager.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/info/TransientTribesChannelInfo.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/info/TransientTribesMemberInfo.java
webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/info/TribesInfoWebService.java
webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ClusterManagerTestCase.java
webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ManageContextTestCase.java
webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java
webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/ConfigurationManagerTestCase.java
webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/TestConfigurationManagerListener.java
webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/tribes/ConfigurationManagerTest.java
webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/tribes/ManageContextTest.java
webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/tribes/UpdateStateTest.java
webservices/axis2/trunk/java/modules/kernel/conf/axis2.xml
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManager.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManagerListener.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManagerListener.java
webservices/axis2/trunk/java/modules/kernel/test-resources/deployment/CustomDeployerRepo/axis2.xml
webservices/axis2/trunk/java/modules/samples/jms/client_repository/conf/axis2.xml
webservices/axis2/trunk/java/modules/samples/jms/server_repository/conf/axis2.xml
Modified: webservices/axis2/trunk/java/modules/clustering/maven.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/maven.xml?view=diff&rev=540126&r1=540125&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/clustering/maven.xml Mon May 21 04:54:18 2007
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="jar"
- xmlns:j="jelly:core"
- xmlns:u="jelly:util"
- xmlns:maven="jelly:maven"
- xmlns:deploy="deploy"
- xmlns:ant="jelly:ant">
-
+ xmlns:j="jelly:core"
+ xmlns:u="jelly:util"
+ xmlns:maven="jelly:maven"
+ xmlns:deploy="deploy"
+ xmlns:ant="jelly:ant">
+
<preGoal name="itest:compile">
<u:file var="file" name="${maven.itest.src}"/>
<j:if test="${!file.exists()}">
<j:expr value="${context.setVariable('maven.itest.skip', 'true')}"/>
</j:if>
- </preGoal>
-
+ </preGoal>
+
</project>
Modified: webservices/axis2/trunk/java/modules/clustering/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/pom.xml?view=diff&rev=540126&r1=540125&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/clustering/pom.xml Mon May 21 04:54:18 2007
@@ -15,49 +15,51 @@
! See the License for the specific language governing permissions and
! limitations under the License.
!-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-parent</artifactId>
- <version>SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
- <artifactId>axis2-clustering</artifactId>
- <name>Apache Axis 2.0 - Clustering</name>
- <description>Axis2 Clustering module</description>
- <dependencies>
- <dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-kernel</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tribes</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>juli</artifactId>
- </dependency>
- </dependencies>
- <build>
- <sourceDirectory>src</sourceDirectory>
- <testSourceDirectory>test</testSourceDirectory>
- <resources>
- <resource>
- <directory>conf</directory>
- <excludes>
- <exclude>**/*.properties</exclude>
- </excludes>
- <filtering>false</filtering>
- </resource>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- </build>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-parent</artifactId>
+ <version>SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <artifactId>axis2-clustering</artifactId>
+ <name>Apache Axis 2.0 - Clustering</name>
+ <description>Axis2 Clustering module</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-kernel</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tribes</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>juli</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>conf</directory>
+ <excludes>
+ <exclude>**/*.properties</exclude>
+ </excludes>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ </build>
</project>
Modified: webservices/axis2/trunk/java/modules/clustering/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/project.xml?view=diff&rev=540126&r1=540125&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/project.xml (original)
+++ webservices/axis2/trunk/java/modules/clustering/project.xml Mon May 21 04:54:18 2007
@@ -27,7 +27,7 @@
<dependencies>
- <dependency>
+ <dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>${axiom.version}</version>
@@ -42,11 +42,11 @@
<artifactId>axis2-kernel</artifactId>
<version>${pom.currentVersion}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>${pom.currentVersion}</version>
- </dependency>
+ </dependency>
<!-- external JARs -->
<dependency>
<groupId>commons-logging</groupId>
@@ -56,7 +56,7 @@
<module>true</module>
</properties>
</dependency>
- <!-- added for the QName -->
+ <!-- added for the QName -->
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
@@ -108,21 +108,21 @@
</properties>
</dependency>
<dependency>
- <groupId>org.apache.tomcat.juli</groupId>
+ <groupId>org.apache.tomcat.juli</groupId>
<artifactId>juli</artifactId>
- <version>${tomcat.juli.version}</version>
+ <version>${tomcat.juli.version}</version>
<properties>
<module>true</module>
</properties>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.apache.tomcat.tribes</groupId>
<artifactId>tribes</artifactId>
- <version>${tomcat.tribes.version}</version>
+ <version>${tomcat.tribes.version}</version>
<properties>
<module>true</module>
</properties>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.apache.neethi</groupId>
<artifactId>neethi</artifactId>
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/ConfigurationClusteringCommandFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/ConfigurationClusteringCommandFactory.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/ConfigurationClusteringCommandFactory.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/ConfigurationClusteringCommandFactory.java Mon May 21 04:54:18 2007
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration;
+
+/**
+ *
+ */
+public final class ConfigurationClusteringCommandFactory {
+}
Copied: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManager.java (from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManager.java?view=diff&rev=540126&p1=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java&r1=539747&p2=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManager.java&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManager.java Mon May 21 04:54:18 2007
@@ -14,36 +14,29 @@
* limitations under the License.
*/
-package org.apache.axis2.cluster.tribes.configuration;
+package org.apache.axis2.cluster.configuration;
+import org.apache.axiom.om.OMElement;
+import org.apache.axis2.AxisFault;
import org.apache.axis2.cluster.ClusteringFault;
-import org.apache.axis2.cluster.CommandType;
-import org.apache.axis2.cluster.configuration.ConfigurationEvent;
-import org.apache.axis2.cluster.configuration.ConfigurationManager;
-import org.apache.axis2.cluster.configuration.ConfigurationManagerListener;
-import org.apache.axis2.cluster.listeners.DefaultContextManagerListener;
-import org.apache.axis2.cluster.tribes.ChannelSender;
+import org.apache.axis2.cluster.MessageSender;
+import org.apache.axis2.cluster.configuration.commands.*;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.Parameter;
-import org.apache.axis2.AxisFault;
-import org.apache.catalina.tribes.Channel;
-import org.apache.catalina.tribes.ChannelException;
-import org.apache.catalina.tribes.Member;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.axiom.om.OMElement;
import java.util.*;
-public class TribesConfigurationManager implements ConfigurationManager {
+public class DefaultConfigurationManager implements ConfigurationManager {
+ private static final Log log = LogFactory.getLog(DefaultConfigurationManager.class);
- private List listeners = null;
- private ChannelSender sender = null;
- private ConfigurationContext configurationContext = null;
+ private List listeners;
+ private MessageSender sender;
+ private ConfigurationContext configurationContext;
private Map parameters = new HashMap();
- private static final Log log = LogFactory.getLog(TribesConfigurationManager.class);
-
- public TribesConfigurationManager() {
+
+ public DefaultConfigurationManager() {
listeners = new ArrayList();
}
@@ -56,153 +49,160 @@
}
public void applyPolicy(String serviceGroupName, String policy) throws ClusteringFault {
-
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::applyPolicy");
-
- ConfigurationCommand command = new ConfigurationCommand(CommandType.APPLY_POLICY);
+ log.debug("Enter: DefaultConfigurationManager::applyPolicy");
+
+ ApplyServicePolicyCommand command = new ApplyServicePolicyCommand();
command.setServiceName(serviceGroupName);
command.setPolicy(policy);
send(command);
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::applyPolicy");
+
+ log.debug("Exit: DefaultConfigurationManager::applyPolicy");
}
public void commit() throws ClusteringFault {
-
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::commit");
-
- ConfigurationCommand command = new ConfigurationCommand(CommandType.COMMIT);
- send(command);
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::commit");
+
+ if (log.isDebugEnabled()) {
+ log.debug("Enter: DefaultConfigurationManager::commit");
+ }
+
+ CommitCommand command = new CommitCommand();
+ send(command);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Exit: DefaultConfigurationManager::commit");
+ }
}
public void exceptionOccurred(Throwable throwable) throws ClusteringFault {
-
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::exceptionOccurred");
-
+
+ if (log.isDebugEnabled()) {
+ log.debug("Enter: DefaultConfigurationManager::exceptionOccurred");
+ }
+
send(throwable);
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::exceptionOccurred");
+
+ if (log.isDebugEnabled()) {
+ log.debug("Exit: DefaultConfigurationManager::exceptionOccurred");
+ }
}
public void loadServiceGroups(String[] serviceGroupNames) throws ClusteringFault {
-
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::loadServiceGroups");
-
- ConfigurationCommand command = new ConfigurationCommand(CommandType.LOAD_SERVICE_GROUPS);
+
+ log.debug("Enter: DefaultConfigurationManager::loadServiceGroups");
+
+ LoadServiceGroupsCommand command = new LoadServiceGroupsCommand();
command.setServiceGroupNames(serviceGroupNames);
send(command);
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::loadServiceGroups");
+
+ log.debug("Exit: DefaultConfigurationManager::loadServiceGroups");
}
public void prepare() throws ClusteringFault {
-
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::prepare");
-
- ConfigurationCommand command = new ConfigurationCommand(CommandType.PREPARE);
- send(command);
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::prepare");
+
+ if (log.isDebugEnabled()) {
+ log.debug("Enter: DefaultConfigurationManager::prepare");
+ }
+
+ PrepareCommand command = new PrepareCommand();
+ send(command);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Exit: DefaultConfigurationManager::prepare");
+ }
}
public void reloadConfiguration() throws ClusteringFault {
-
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::reloadConfiguration");
-
- ConfigurationCommand command = new ConfigurationCommand(CommandType.RELOAD_CONFIGURATION);
- send(command);
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::reloadConfiguration");
+
+ if (log.isDebugEnabled()) {
+ log.debug("Enter: DefaultConfigurationManager::reloadConfiguration");
+ }
+
+ ReloadConfigurationCommand command = new ReloadConfigurationCommand();
+ send(command);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Exit: DefaultConfigurationManager::reloadConfiguration");
+ }
}
public void rollback() throws ClusteringFault {
-
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::rollback");
-
- ConfigurationCommand command = new ConfigurationCommand(CommandType.ROLLBACK);
- send(command);
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::rollback");
+
+ if (log.isDebugEnabled()) {
+ log.debug("Enter: DefaultConfigurationManager::rollback");
+ }
+
+ RollbackCommand command = new RollbackCommand();
+ send(command);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Exit: DefaultConfigurationManager::rollback");
+ }
}
public void unloadServiceGroups(String[] serviceGroupNames) throws ClusteringFault {
-
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::unloadServiceGroups");
-
- ConfigurationCommand command = new ConfigurationCommand(CommandType.UNLOAD_SERVICE_GROUPS);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Enter: DefaultConfigurationManager::unloadServiceGroups");
+ }
+
+ UnloadServiceGroupsCommand command = new UnloadServiceGroupsCommand();
command.setServiceGroupNames(serviceGroupNames);
send(command);
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::unloadServiceGroups");
+
+ if (log.isDebugEnabled()) {
+ log.debug("Exit: DefaultConfigurationManager::unloadServiceGroups");
+ }
}
- private void send(Throwable throwable) throws ClusteringFault {
- sender.send(throwable);
+ protected void send(Throwable throwable) throws ClusteringFault {
+ sender.sendToGroup(throwable);
}
- private void send(ConfigurationCommand command) throws ClusteringFault {
- sender.send(command);
+ protected void send(ConfigurationClusteringCommand command) throws ClusteringFault {
+ sender.sendToGroup(command);
// Need to send the message to self too
- Channel channel = sender.getChannel();
- try {
- channel.send(new Member[]{channel.getLocalMember(true)},
- command,
- Channel.SEND_OPTIONS_USE_ACK);
- } catch (ChannelException e) {
- throw new ClusteringFault(e);
- }
+ sender.sendToSelf(command);
}
- public void setSender(ChannelSender sender) {
+ public void setSender(MessageSender sender) {
this.sender = sender;
}
- public void notifyListeners(int command, ConfigurationEvent event) {
+ public void notifyListeners(ConfigurationClusteringCommand command) throws ClusteringFault {
- if (log.isDebugEnabled())
- log.debug("Enter: TribesConfigurationManager::notifyListeners");
-
- for (Iterator it = listeners.iterator(); it.hasNext();) {
- ConfigurationManagerListener listener = (ConfigurationManagerListener) it.next();
-
- if (CommandType.LOAD_SERVICE_GROUPS == command) {
- listener.serviceGroupsLoaded(event);
- } else if (CommandType.UNLOAD_SERVICE_GROUPS == command) {
- listener.serviceGroupsUnloaded(event);
- } else if (CommandType.APPLY_POLICY == command) {
- listener.policyApplied(event);
- } else if (CommandType.RELOAD_CONFIGURATION == command) {
- listener.configurationReloaded(event);
- } else if (CommandType.PREPARE == command) {
- listener.prepareCalled(event);
- } else if (CommandType.COMMIT == command) {
- listener.commitCalled(event);
- } else if (CommandType.ROLLBACK == command) {
- listener.rollbackCalled(event);
+ for (Iterator iter = listeners.iterator(); iter.hasNext();) {
+ ConfigurationManagerListener listener = (ConfigurationManagerListener) iter.next();
+ switch (command.getCommandType()) {
+ case ConfigurationClusteringCommand.RELOAD_CONFIGURATION:
+ listener.configurationReloaded(command);
+ break;
+ case ConfigurationClusteringCommand.LOAD_SERVICE_GROUPS:
+ listener.serviceGroupsLoaded(command);
+ break;
+ case ConfigurationClusteringCommand.UNLOAD_SERVICE_GROUPS:
+ listener.serviceGroupsUnloaded(command);
+ break;
+ case ConfigurationClusteringCommand.APPLY_SERVICE_POLICY:
+ listener.policyApplied(command);
+ break;
+ case ConfigurationClusteringCommand.PREPARE:
+ listener.prepareCalled();
+ break;
+ case ConfigurationClusteringCommand.COMMIT:
+ listener.commitCalled();
+ break;
+ case ConfigurationClusteringCommand.ROLLBACK:
+ listener.rollbackCalled();
+ break;
+ case ConfigurationClusteringCommand.EXCEPTION:
+ listener.handleException(((ExceptionCommand)command).getException());
+ break;
+ default:
+ throw new ClusteringFault("Invalid ConfigurationClusteringCommand " +
+ command.getClass().getName());
}
}
-
- if (log.isDebugEnabled())
- log.debug("Exit: TribesConfigurationManager::notifyListeners");
}
public void setConfigurationContext(ConfigurationContext configurationContext) {
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManagerListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManagerListener.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManagerListener.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/DefaultConfigurationManagerListener.java Mon May 21 04:54:18 2007
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration;
+
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class DefaultConfigurationManagerListener implements ConfigurationManagerListener{
+ public void serviceGroupsLoaded(ConfigurationClusteringCommand command) {
+ //TODO: Method implementation
+
+ }
+
+ public void serviceGroupsUnloaded(ConfigurationClusteringCommand command) {
+ //TODO: Method implementation
+
+ }
+
+ public void policyApplied(ConfigurationClusteringCommand command) {
+ //TODO: Method implementation
+
+ }
+
+ public void configurationReloaded(ConfigurationClusteringCommand command) {
+ //TODO: Method implementation
+
+ }
+
+ public void prepareCalled() {
+ //TODO: Method implementation
+
+ }
+
+ public void rollbackCalled() {
+ //TODO: Method implementation
+
+ }
+
+ public void commitCalled() {
+ //TODO: Method implementation
+
+ }
+
+ public void handleException(Throwable throwable) {
+ //TODO: Method implementation
+
+ }
+
+ public void setConfigurationContext(ConfigurationContext configurationContext) {
+ //TODO: Method implementation
+
+ }
+}
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ApplyServicePolicyCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ApplyServicePolicyCommand.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ApplyServicePolicyCommand.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ApplyServicePolicyCommand.java Mon May 21 04:54:18 2007
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration.commands;
+
+import org.apache.axis2.cluster.configuration.ConfigurationClusteringCommand;
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class ApplyServicePolicyCommand extends ConfigurationClusteringCommand {
+
+ private String policy;
+ private String serviceName;
+
+ public void process(ConfigurationContext confiCtx) throws Exception {
+ //TODO: impl
+ }
+
+ public void prepare(ConfigurationContext configContext) {
+ //TODO: impl
+ }
+
+ public void commit(ConfigurationContext configContext) throws Exception {
+ //TODO: impl
+ }
+
+ public void rollback(ConfigurationContext configContext) throws Exception {
+ //TODO: impl
+ }
+
+ public String toString() {
+ return "APPLY_SERVICE_POLICY_EVENT";
+ }
+
+ public int getCommandType() {
+ return APPLY_SERVICE_POLICY;
+ }
+
+ public void setPolicy(String policy) {
+ this.policy = policy;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+}
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/CommitCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/CommitCommand.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/CommitCommand.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/CommitCommand.java Mon May 21 04:54:18 2007
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration.commands;
+
+import org.apache.axis2.cluster.configuration.ConfigurationClusteringCommand;
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class CommitCommand extends ConfigurationClusteringCommand {
+ public int getCommandType() {
+ return COMMIT;
+ }
+
+ public void process(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+
+ public void prepare(ConfigurationContext configContext) {
+ // Nothing to implement
+ }
+
+ public void commit(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+
+ public void rollback(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+}
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ExceptionCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ExceptionCommand.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ExceptionCommand.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ExceptionCommand.java Mon May 21 04:54:18 2007
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration.commands;
+
+import org.apache.axis2.cluster.configuration.ConfigurationClusteringCommand;
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class ExceptionCommand extends ConfigurationClusteringCommand {
+ private Throwable exception;
+
+ public int getCommandType() {
+ return ConfigurationClusteringCommand.COMMIT;
+ }
+
+ public Throwable getException() {
+ return exception;
+ }
+
+ public void setException(Throwable exception) {
+ this.exception = exception;
+ }
+
+ public void process(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+
+ public void prepare(ConfigurationContext configContext) {
+ // Nothing to implement
+ }
+
+ public void commit(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+
+ public void rollback(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+}
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/LoadServiceGroupsCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/LoadServiceGroupsCommand.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/LoadServiceGroupsCommand.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/LoadServiceGroupsCommand.java Mon May 21 04:54:18 2007
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration.commands;
+
+import org.apache.axis2.cluster.configuration.ConfigurationClusteringCommand;
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class LoadServiceGroupsCommand extends ConfigurationClusteringCommand {
+ public void setServiceGroupNames(String[] serviceGroupNames) {
+ this.serviceGroupNames = serviceGroupNames;
+ }
+
+ private String[] serviceGroupNames;
+
+ public void process(ConfigurationContext confiCtx) throws Exception {
+ //TODO: impl
+ }
+
+ public void prepare(ConfigurationContext configContext) {
+ //TODO: impl
+ }
+
+ public void commit(ConfigurationContext configContext) throws Exception {
+ //TODO: impl
+ }
+
+ public void rollback(ConfigurationContext configContext) throws Exception {
+ //TODO: impl
+ }
+
+ public String toString() {
+ return "LOAD_SERVICE_GROUPS_EVENT";
+ }
+
+ public int getCommandType() {
+ return LOAD_SERVICE_GROUPS;
+ }
+}
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/PrepareCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/PrepareCommand.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/PrepareCommand.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/PrepareCommand.java Mon May 21 04:54:18 2007
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration.commands;
+
+import org.apache.axis2.cluster.configuration.ConfigurationClusteringCommand;
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class PrepareCommand extends ConfigurationClusteringCommand {
+ public int getCommandType() {
+ return PREPARE;
+ }
+
+ public void process(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+
+ public void prepare(ConfigurationContext configContext) {
+ // Nothing to implement
+ }
+
+ public void commit(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+
+ public void rollback(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+}
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ReloadConfigurationCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ReloadConfigurationCommand.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ReloadConfigurationCommand.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/ReloadConfigurationCommand.java Mon May 21 04:54:18 2007
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration.commands;
+
+import org.apache.axis2.cluster.configuration.ConfigurationClusteringCommand;
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class ReloadConfigurationCommand extends ConfigurationClusteringCommand {
+
+ public void process(ConfigurationContext configCtx) throws Exception {
+ //TODO: impl
+ }
+
+ public void prepare(ConfigurationContext configCtx) {
+ //TODO: impl
+ }
+
+ public void commit(ConfigurationContext configContext) throws Exception {
+ //TODO: impl
+ }
+
+ public void rollback(ConfigurationContext configContext) throws Exception {
+ //TODO: impl
+ }
+
+ public String toString() {
+ return "LOAD_CONFIGURATION_EVENT";
+ }
+
+ public int getCommandType() {
+ return RELOAD_CONFIGURATION;
+ }
+}
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/RollbackCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/RollbackCommand.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/RollbackCommand.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/RollbackCommand.java Mon May 21 04:54:18 2007
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration.commands;
+
+import org.apache.axis2.cluster.configuration.ConfigurationClusteringCommand;
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class RollbackCommand extends ConfigurationClusteringCommand {
+ public int getCommandType() {
+ return ROLLBACK;
+ }
+
+ public void process(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+
+ public void prepare(ConfigurationContext configContext) {
+ // Nothing to implement
+ }
+
+ public void commit(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+
+ public void rollback(ConfigurationContext configContext) throws Exception {
+ // Nothing to implement
+ }
+}
Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/UnloadServiceGroupsCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/UnloadServiceGroupsCommand.java?view=auto&rev=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/UnloadServiceGroupsCommand.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/configuration/commands/UnloadServiceGroupsCommand.java Mon May 21 04:54:18 2007
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.cluster.configuration.commands;
+
+import org.apache.axis2.cluster.configuration.ConfigurationClusteringCommand;
+import org.apache.axis2.context.ConfigurationContext;
+
+/**
+ *
+ */
+public class UnloadServiceGroupsCommand extends ConfigurationClusteringCommand {
+
+ private String[] serviceGroupNames;
+
+ public void process(ConfigurationContext confiCtx) throws Exception {
+ //TODO: impl
+ }
+
+ public void prepare(ConfigurationContext configContext) {
+ //TODO: impl
+ }
+
+ public void commit(ConfigurationContext configContext) throws Exception {
+ //TODO: impl
+ }
+
+ public void rollback(ConfigurationContext configContext) throws Exception {
+ //TODO: impl
+ }
+
+ public String toString() {
+ return "UNLOAD_SERVICE_GROUPS_EVENT";
+ }
+
+ public int getCommandType() {
+ return UNLOAD_SERVICE_GROUPS;
+ }
+
+ public void setServiceGroupNames(String[] serviceGroupNames) {
+ this.serviceGroupNames = serviceGroupNames;
+ }
+}
Copied: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/ContextClusteringCommandFactory.java (from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessageFactory.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/ContextClusteringCommandFactory.java?view=diff&rev=540126&p1=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessageFactory.java&r1=539751&p2=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/ContextClusteringCommandFactory.java&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessageFactory.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/ContextClusteringCommandFactory.java Mon May 21 04:54:18 2007
@@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.axis2.cluster.tribes.context;
+package org.apache.axis2.cluster.context;
-import org.apache.axis2.cluster.context.ContextCommandMessage;
-import org.apache.axis2.cluster.tribes.context.messages.*;
+import org.apache.axis2.cluster.context.commands.*;
import org.apache.axis2.context.*;
import org.apache.axis2.deployment.DeploymentConstants;
@@ -28,14 +27,17 @@
/**
*
*/
-public final class ContextCommandMessageFactory {
+public final class ContextClusteringCommandFactory {
- public static ContextCommandMessage getUpdateMessage(AbstractContext context,
- Map excludedPropertyPatterns) {
+ public static ContextClusteringCommand getUpdateMessage(AbstractContext context,
+ Map excludedPropertyPatterns) {
- ContextCommandMessage cmd = null;
+ ContextClusteringCommand cmd = null;
if (context instanceof ConfigurationContext) {
cmd = new UpdateConfigurationContextCommand();
+ fillProperties((UpdateContextCommand) cmd,
+ context,
+ excludedPropertyPatterns);
} else if (context instanceof ServiceGroupContext) {
ServiceGroupContext sgCtx = (ServiceGroupContext) context;
cmd = new UpdateServiceGroupContextCommand();
@@ -43,7 +45,9 @@
updateSgCmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName());
updateSgCmd.setServiceGroupContextId(sgCtx.getId());
-
+ fillProperties((UpdateContextCommand) cmd,
+ context,
+ excludedPropertyPatterns);
//TODO: impl
} else if (context instanceof ServiceContext) {
ServiceContext serviceCtx = (ServiceContext) context;
@@ -53,29 +57,32 @@
// TODO impl
updateServiceCmd.setServiceGroupName(serviceCtx.getGroupName());
updateServiceCmd.setServiceName(serviceCtx.getAxisService().getName());
+ fillProperties((UpdateContextCommand) cmd,
+ context,
+ excludedPropertyPatterns);
}
+ context.clearPropertyDifferences(); // Once we send the diffs, we should clear the diffs
+ return cmd;
+ }
- if (cmd != null) {
- // Fill the properties
- UpdateContextCommand updateCmd = (UpdateContextCommand) cmd;
- Map diffs = context.getPropertyDifferences();
- for (Iterator iter = diffs.keySet().iterator(); iter.hasNext();) {
- String key = (String) iter.next();
- Object prop = context.getProperty(key);
- if (prop instanceof Serializable) { // First check whether it is serializable
-
- // Next check whether it matches an excluded pattern
- if (!isExcluded(key, context.getClass().getName(), excludedPropertyPatterns)) {
- System.err.println("..................... sending prop=" + key + "-" + prop);
- PropertyDifference diff = (PropertyDifference) diffs.get(key);
- diff.setValue(prop);
- updateCmd.addProperty(diff);
- }
+ private static void fillProperties(UpdateContextCommand updateCmd,
+ AbstractContext context,
+ Map excludedPropertyPatterns) {
+ Map diffs = context.getPropertyDifferences();
+ for (Iterator iter = diffs.keySet().iterator(); iter.hasNext();) {
+ String key = (String) iter.next();
+ Object prop = context.getProperty(key);
+ if (prop instanceof Serializable) { // First check whether it is serializable
+
+ // Next check whether it matches an excluded pattern
+ if (!isExcluded(key, context.getClass().getName(), excludedPropertyPatterns)) {
+ System.err.println("..................... sending prop=" + key + "-" + prop);
+ PropertyDifference diff = (PropertyDifference) diffs.get(key);
+ diff.setValue(prop);
+ updateCmd.addProperty(diff);
}
}
- context.clearPropertyDifferences(); // Once we send the diffs, we should clear the diffs
}
- return cmd;
}
private static boolean isExcluded(String propertyName,
@@ -115,7 +122,7 @@
return false;
}
- public static ContextCommandMessage getCreateMessage(AbstractContext abstractContext) {
+ public static ContextClusteringCommand getCreateMessage(AbstractContext abstractContext) {
if (abstractContext instanceof ServiceGroupContext) {
ServiceGroupContext sgCtx = (ServiceGroupContext) abstractContext;
ServiceGroupContextCommand cmd = new CreateServiceGroupContextCommand();
@@ -138,7 +145,7 @@
return null;
}
- public static ContextCommandMessage getRemoveMessage(AbstractContext abstractContext) {
+ public static ContextClusteringCommand getRemoveMessage(AbstractContext abstractContext) {
if (abstractContext instanceof ServiceGroupContext) {
ServiceGroupContext sgCtx = (ServiceGroupContext) abstractContext;
ServiceGroupContextCommand cmd = new DeleteServiceGroupContextCommand();
Copied: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManager.java (from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManager.java?view=diff&rev=540126&p1=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java&r1=539751&p2=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManager.java&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManager.java Mon May 21 04:54:18 2007
@@ -14,58 +14,51 @@
* limitations under the License.
*/
-package org.apache.axis2.cluster.tribes.context;
+package org.apache.axis2.cluster.context;
import org.apache.axiom.om.OMElement;
import org.apache.axis2.AxisFault;
import org.apache.axis2.cluster.ClusteringFault;
-import org.apache.axis2.cluster.context.ContextCommandMessage;
-import org.apache.axis2.cluster.context.ContextManager;
-import org.apache.axis2.cluster.context.ContextManagerListener;
-import org.apache.axis2.cluster.tribes.ChannelSender;
+import org.apache.axis2.cluster.MessageSender;
import org.apache.axis2.context.AbstractContext;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ServiceContext;
import org.apache.axis2.context.ServiceGroupContext;
import org.apache.axis2.description.Parameter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import java.util.*;
-public class TribesContextManager implements ContextManager {
-
- private static final Log log = LogFactory.getLog(TribesContextManager.class);
+public class DefaultContextManager implements ContextManager {
private ConfigurationContext configContext;
private List listeners = new ArrayList();
private Map parameters = new HashMap();
- private ChannelSender sender;
+ private MessageSender sender;
private ContextReplicationProcessor processor = new ContextReplicationProcessor();
private Map excludedReplicationPatterns = new HashMap();
- public void setSender(ChannelSender sender) {
+ public void setSender(MessageSender sender) {
this.sender = sender;
}
- public TribesContextManager() {
+ public DefaultContextManager() {
}
public void addContext(final AbstractContext context) throws ClusteringFault {
- processor.process(ContextCommandMessageFactory.getCreateMessage(context));
+ processor.process(ContextClusteringCommandFactory.getCreateMessage(context));
}
public void removeContext(AbstractContext context) throws ClusteringFault {
- processor.process(ContextCommandMessageFactory.getRemoveMessage(context));
+ processor.process(ContextClusteringCommandFactory.getRemoveMessage(context));
}
public void updateContext(AbstractContext context) throws ClusteringFault {
- ContextCommandMessage message =
- ContextCommandMessageFactory.getUpdateMessage(context,
- excludedReplicationPatterns);
+ ContextClusteringCommand message =
+ ContextClusteringCommandFactory.getUpdateMessage(context,
+ excludedReplicationPatterns);
processor.process(message);
}
@@ -75,23 +68,27 @@
(context instanceof ServiceGroupContext);
}
- public void notifyListeners(ContextCommandMessage command) throws ClusteringFault {
+ public void notifyListeners(ContextClusteringCommand command) throws ClusteringFault {
for (Iterator iter = listeners.iterator(); iter.hasNext();) {
ContextManagerListener listener = (ContextManagerListener) iter.next();
- switch (command.getMessageType()) {
- case ContextCommandMessage.CREATE_SERVICE_CONTEXT_MSG:
- case ContextCommandMessage.CREATE_SERVICE_GROUP_CONTEXT_MSG:
+ switch (command.getCommandType()) {
+ case ContextClusteringCommand.CREATE_SERVICE_CONTEXT:
+ case ContextClusteringCommand.CREATE_SERVICE_GROUP_CONTEXT:
listener.contextAdded(command);
break;
- case ContextCommandMessage.UPDATE_SERVICE_CONTEXT_MSG:
- case ContextCommandMessage.UPDATE_SERVICE_GROUP_CONTEXT_MSG:
- case ContextCommandMessage.UPDATE_CONFIGURATION_CONTEXT_MSG:
+ case ContextClusteringCommand.UPDATE_SERVICE_CONTEXT:
+ case ContextClusteringCommand.UPDATE_SERVICE_GROUP_CONTEXT:
+ case ContextClusteringCommand.UPDATE_CONFIGURATION_CONTEXT:
listener.contextUpdated(command);
break;
- case ContextCommandMessage.DELETE_SERVICE_CONTEXT_MSG:
- case ContextCommandMessage.DELETE_SERVICE_GROUP_CONTEXT_MSG:
+ case ContextClusteringCommand.DELETE_SERVICE_CONTEXT:
+ case ContextClusteringCommand.DELETE_SERVICE_GROUP_CONTEXT:
listener.contextRemoved(command);
+ break;
+ default:
+ throw new ClusteringFault("Invalid ContextClusteringCommand " +
+ command.getClass().getName());
}
}
}
@@ -116,9 +113,6 @@
}
public void setReplicationExcludePatterns(String contextType, List patterns) {
- System.out.println("### contextType=" + contextType);
- System.out.println("### pattern=" + patterns);
- //TODO: Method implementation
excludedReplicationPatterns.put(contextType, patterns);
}
@@ -152,156 +146,8 @@
}
// ---------------------------------------------------------------------------------------------
-/* private class AddContextCommand implements ContextCommand {
-
- public void execute(AbstractContext context) throws ClusteringFault {
- if (log.isDebugEnabled()) {
- log.debug("Enter: TribesContextManager::addContext");
- }
- ContextCommand comMsg;
-
- String contextId = getContextID(context);
- String parentContextId = getContextID(context.getParent());
-
- // The ServiceContex does not define a contextId
- // therefore the service name is used
- if (context instanceof ServiceContext) {
-
- if (log.isDebugEnabled()) {
- log.debug("Exit: TribesContextManager::addContext");
- }
-
- if (updater.getServiceGroupProps(parentContextId) != null) {
- updater.addServiceContext(parentContextId, contextId);
-
- public ContextCommandMessage(
- int commandType,
- String parentId,
- String contextId,
- String axisDescriptionName,
- int contextType)
-
- comMsg = new ContextCommand(CommandType.CREATE_SERVICE_CONTEXT,
- parentContextId,
- contextId,
- contextId,
- ContextType.SERVICE_CONTEXT);
- send(comMsg);
- } else {
- // put in the queue until the service group context is created
- // with an id
- comMsg = new ContextCommand(CommandType.CREATE_SERVICE_CONTEXT,
- parentContextId,
- contextId,
- contextId,
- ContextType.SERVICE_CONTEXT);
-
- AxisServiceGroup serviceGroupDesc = ((ServiceContext) context)
- .getServiceGroupContext().getDescription();
- List list = (List) orphanedServiceCtxs.get(serviceGroupDesc
- .getServiceGroupName());
- if (list == null) {
- list = new ArrayList();
- orphanedServiceCtxs.put(serviceGroupDesc.getServiceGroupName(), list);
- }
- list.add(comMsg);
- }
- } else if (context instanceof ServiceGroupContext) {
- log.debug("Exit: TribesContextManager::addServiceGroupContext");
- ServiceGroupContext sgCtx = (ServiceGroupContext) context;
- CreateServiceGroupContextCommand cmd =
- new CreateServiceGroupContextCommand();
- cmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName());
- send(cmd);
- log.debug("Exit: TribesContextManager::addContext");
- }
- }
-}
-
-private class RemoveContextCommand implements ContextCommand {
-
- public void execute(AbstractContext context) throws ClusteringFault {
- if (log.isDebugEnabled()) {
- log.debug("Enter: TribesContextManager::removeContext");
- }
-
- ContextCommand comMsg = null;
-
- String contextId = getContextID(context);
- String parentContextId = getContextID(context.getParent());
-
- if (context instanceof ServiceContext) {
- updater.removeServiceContext(parentContextId, contextId);
- comMsg = new ContextCommand(CommandType.CREATE_SERVICE_GROUP_CONTEXT,
- parentContextId,
- contextId,
- contextId,
- ContextType.SERVICE_CONTEXT);
- } else if (context instanceof ServiceGroupContext) {
- updater.removeServiceGroupContext(contextId);
- comMsg = new ContextCommand(CommandType.REMOVE_SERVICE_GROUP_CONTEXT,
- "",
- contextId,
- ((ServiceGroupContext) context).getDescription().getServiceGroupName(),
- ContextType.SERVICE_CONTEXT);
- }
-
- send(comMsg);
-
- if (log.isDebugEnabled()) {
- log.debug("Exit: TribesContextManager::removeContext");
- }
- }
-}
-
-private class UpdateContextCommand implements ContextCommand {
-
- public void execute(AbstractContext context) throws ClusteringFault {
-
- if (log.isDebugEnabled()) {
- log.debug("Enter: TribesContextManager::updateState");
- }
-
- String contextId = getContextID(context);
- String parentContextId = getContextID(context.getParent());
-
- Map props = context.getProperties();
-
- List mapEntryMsgs = null;
-
- int contextType = 0;
- if (context instanceof ServiceContext) {
- contextType = ContextType.SERVICE_CONTEXT;
- mapEntryMsgs = updater
- .updateStateOnServiceContext(parentContextId, contextId, props);
- } else if (context instanceof ServiceGroupContext) {
- contextType = ContextType.SERVICE_GROUP_CONTEXT;
- mapEntryMsgs = updater.updateStateOnServiceGroupContext(contextId, props);
- }
-
- if (mapEntryMsgs != null) {
- for (Iterator it = mapEntryMsgs.iterator(); it.hasNext();) {
- ContextUpdateEntryCommandMessage msg = (ContextUpdateEntryCommandMessage) it.next();
- send(msg);
- }
- }
-
- ContextCommand comMsg = new ContextCommand(CommandType.UPDATE_STATE,
- parentContextId,
- contextId,
- contextId,
- contextType);
-
- send(comMsg);
-
- if (log.isDebugEnabled()) {
- log.debug("Exit: TribesContextManager::updateState");
- }
- }
-}*/
-
private class ContextReplicationProcessor {
- public void process(final ContextCommandMessage cmd) throws ClusteringFault {
+ public void process(final ContextClusteringCommand cmd) throws ClusteringFault {
// If the sender is NULL, it means the TribesClusterManager is still being initialized
// So we need to busy wait.
@@ -316,7 +162,7 @@
}
} while (sender == null);
try {
- sender.send(cmd);
+ sender.sendToGroup(cmd);
} catch (ClusteringFault clusteringFault) {
throw new RuntimeException(clusteringFault);
}
@@ -324,7 +170,7 @@
};
processorThread.start();
} else {
- sender.send(cmd);
+ sender.sendToGroup(cmd);
}
}
}
Copied: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManagerListener.java (from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManagerListener.java?view=diff&rev=540126&p1=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java&r1=539747&p2=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManagerListener.java&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/DefaultContextManagerListener.java Mon May 21 04:54:18 2007
@@ -14,11 +14,9 @@
* limitations under the License.
*/
-package org.apache.axis2.cluster.listeners;
+package org.apache.axis2.cluster.context;
import org.apache.axis2.cluster.ClusteringFault;
-import org.apache.axis2.cluster.context.ContextCommandMessage;
-import org.apache.axis2.cluster.context.ContextManagerListener;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -28,19 +26,19 @@
private ConfigurationContext configurationContext;
private static final Log log = LogFactory.getLog(DefaultContextManagerListener.class);
- public void contextAdded(ContextCommandMessage message) throws ClusteringFault {
+ public void contextAdded(ContextClusteringCommand message) throws ClusteringFault {
log.debug("Enter: DefaultContextManagerListener::contextAdded");
message.execute(configurationContext);
log.debug("Exit: DefaultContextManagerListener::contextAdded");
}
- public void contextRemoved(ContextCommandMessage message) throws ClusteringFault {
+ public void contextRemoved(ContextClusteringCommand message) throws ClusteringFault {
log.debug("Enter: DefaultContextManagerListener::contextRemoved");
message.execute(configurationContext);
log.debug("Exit: DefaultContextManagerListener::contextRemoved");
}
- public void contextUpdated(ContextCommandMessage message) throws ClusteringFault {
+ public void contextUpdated(ContextClusteringCommand message) throws ClusteringFault {
log.debug("Enter: DefaultContextManagerListener::contextRemoved");
message.execute(configurationContext);
log.debug("Exit: DefaultContextManagerListener::contextRemoved");
Copied: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/PropertyUpdater.java (from r539751, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/PropertyUpdater.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/PropertyUpdater.java?view=diff&rev=540126&p1=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/PropertyUpdater.java&r1=539751&p2=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/PropertyUpdater.java&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/PropertyUpdater.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/PropertyUpdater.java Mon May 21 04:54:18 2007
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.axis2.cluster.tribes.context;
+package org.apache.axis2.cluster.context;
import org.apache.axis2.context.AbstractContext;
import org.apache.axis2.context.PropertyDifference;
@@ -25,7 +25,7 @@
/**
*
*/
-public class PropertyUpdater implements Serializable{
+public class PropertyUpdater implements Serializable {
private Map properties;
@@ -42,16 +42,12 @@
}
}
}
-/*
- public void addContextProperty(String key, Object value, int updateStatus) {
- properties.put(key, new PropertyDifference(key, value, updateStatus));
- }*/
public void addContextProperty(PropertyDifference diff) {
properties.put(diff.getKey(), diff);
}
- public void setProperties(Map properties){
+ public void setProperties(Map properties) {
this.properties = properties;
}
Copied: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceContextCommand.java (from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateServiceContextCommand.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceContextCommand.java?view=diff&rev=540126&p1=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateServiceContextCommand.java&r1=539747&p2=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceContextCommand.java&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateServiceContextCommand.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceContextCommand.java Mon May 21 04:54:18 2007
@@ -13,15 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.axis2.cluster.tribes.context.messages;
+package org.apache.axis2.cluster.context.commands;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
-import org.apache.axis2.description.AxisService;
import org.apache.axis2.cluster.ClusteringFault;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ServiceGroupContext;
-import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.description.AxisService;
/**
*
@@ -72,7 +71,7 @@
this.serviceGroupContextId = serviceGroupContextId;
}
- public int getMessageType() {
- return CREATE_SERVICE_CONTEXT_MSG;
+ public int getCommandType() {
+ return CREATE_SERVICE_CONTEXT;
}
}
Copied: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceGroupContextCommand.java (from r539747, webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateServiceGroupContextCommand.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceGroupContextCommand.java?view=diff&rev=540126&p1=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateServiceGroupContextCommand.java&r1=539747&p2=webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceGroupContextCommand.java&r2=540126
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/messages/CreateServiceGroupContextCommand.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/context/commands/CreateServiceGroupContextCommand.java Mon May 21 04:54:18 2007
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.axis2.cluster.tribes.context.messages;
+package org.apache.axis2.cluster.context.commands;
import org.apache.axis2.cluster.ClusteringFault;
import org.apache.axis2.context.ConfigurationContext;
@@ -34,8 +34,8 @@
configContext.registerServiceGroupContextintoSoapSessionTable(ctx);
}
- public int getMessageType() {
- return CREATE_SERVICE_GROUP_CONTEXT_MSG;
+ public int getCommandType() {
+ return CREATE_SERVICE_GROUP_CONTEXT;
}
public void setServiceGroupName(String serviceGroupName) {
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org