svn commit: r1081083 - in /axis/axis2/java/core/trunk/modules: clustering/pom.xml parent/pom.xml
Author: azeez Date: Sun Mar 13 11:51:18 2011 New Revision: 1081083 URL: http://svn.apache.org/viewvc?rev=1081083&view=rev Log: Downgrading to Tribes 6.0.16 because Axis2 is still stuck with JDK 15 Modified: axis/axis2/java/core/trunk/modules/clustering/pom.xml axis/axis2/java/core/trunk/modules/parent/pom.xml Modified: axis/axis2/java/core/trunk/modules/clustering/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/clustering/pom.xml?rev=1081083&r1=1081082&r2=1081083&view=diff == --- axis/axis2/java/core/trunk/modules/clustering/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/clustering/pom.xml Sun Mar 13 11:51:18 2011 @@ -56,11 +56,11 @@ org.apache.tomcat -tomcat-tribes +tribes -org.apache.tomcat.embed -tomcat-embed-logging-juli +org.apache.tomcat +juli Modified: axis/axis2/java/core/trunk/modules/parent/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/parent/pom.xml?rev=1081083&r1=1081082&r2=1081083&view=diff == --- axis/axis2/java/core/trunk/modules/parent/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/parent/pom.xml Sun Mar 13 11:51:18 2011 @@ -112,7 +112,7 @@ wstx-asl org.codehaus.woodstox 3.2.9 -7.0.8 +6.0.16 1.6.2 2.7.0 2.3.0 @@ -472,12 +472,12 @@ org.apache.tomcat -tomcat-tribes +tribes ${tomcat.version} -org.apache.tomcat.embed -tomcat-embed-logging-juli +org.apache.tomcat +juli ${tomcat.version}
svn commit: r1081220 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/clustering/state/Replicator.java
Author: azeez Date: Sun Mar 13 21:19:30 2011 New Revision: 1081220 URL: http://svn.apache.org/viewvc?rev=1081220&view=rev Log: Replicating state only if the StateManager is available Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/clustering/state/Replicator.java Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/clustering/state/Replicator.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/clustering/state/Replicator.java?rev=1081220&r1=1081219&r2=1081220&view=diff == --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/clustering/state/Replicator.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/clustering/state/Replicator.java Sun Mar 13 21:19:30 2011 @@ -52,7 +52,10 @@ public final class Replicator { public static void replicateState(StateClusteringCommand command, AxisConfiguration axisConfig) throws ClusteringFault { -getStateManager(axisConfig).replicateState(command); +StateManager stateManager = getStateManager(axisConfig); +if (stateManager != null) { +stateManager.replicateState(command); +} } /** @@ -71,6 +74,9 @@ public final class Replicator { " ServiceGroupContext, ServiceContext associated with " + msgContext + "..."); ConfigurationContext configurationContext = msgContext.getConfigurationContext(); StateManager stateManager = getStateManager(msgContext); +if (stateManager == null) { +return; +} List contexts = new ArrayList(); // Do we need to replicate state stored in ConfigurationContext? @@ -109,7 +115,7 @@ public final class Replicator { } log.debug("Going to replicate state in " + abstractContext + "..."); StateManager stateManager = getStateManager(abstractContext); -if (!abstractContext.getPropertyDifferences().isEmpty()) { +if (stateManager != null && !abstractContext.getPropertyDifferences().isEmpty()) { synchronized (abstractContext) { // This IDEA/FindBugs warning can be ignored stateManager.updateContext(abstractContext); } @@ -131,7 +137,9 @@ public final class Replicator { } log.debug("Going to replicate selected properties in " + abstractContext + "..."); StateManager stateManager = getStateManager(abstractContext); -stateManager.updateContext(abstractContext, propertyNames); +if (stateManager != null) { +stateManager.updateContext(abstractContext, propertyNames); +} } private static ClusteringAgent getClusterManager(AbstractContext abstractContext) { @@ -143,7 +151,11 @@ public final class Replicator { } private static StateManager getStateManager(AxisConfiguration axisConfiguration) { -return axisConfiguration.getClusteringAgent().getStateManager(); +ClusteringAgent clusteringAgent = axisConfiguration.getClusteringAgent(); +if (clusteringAgent != null) { +return clusteringAgent.getStateManager(); +} +return null; } /**
svn commit: r1081225 - in /axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state: DefaultStateManager.java commands/StateClusteringCommandCollection.java
Author: azeez Date: Sun Mar 13 21:41:45 2011 New Revision: 1081225 URL: http://svn.apache.org/viewvc?rev=1081225&view=rev Log: Do not replicate empty StateClusteringCommandCollections Modified: axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/DefaultStateManager.java axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/commands/StateClusteringCommandCollection.java Modified: axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/DefaultStateManager.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/DefaultStateManager.java?rev=1081225&r1=1081224&r2=1081225&view=diff == --- axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/DefaultStateManager.java (original) +++ axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/DefaultStateManager.java Sun Mar 13 21:41:45 2011 @@ -76,8 +76,10 @@ public class DefaultStateManager impleme public void updateContexts(AbstractContext[] contexts) throws ClusteringFault { StateClusteringCommandCollection cmd = StateClusteringCommandFactory.getCommandCollection(contexts, - excludedReplicationPatterns); -sender.sendToGroup(cmd); + excludedReplicationPatterns); +if (!cmd.isEmpty()) { +sender.sendToGroup(cmd); +} } public void replicateState(StateClusteringCommand command) throws ClusteringFault { Modified: axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/commands/StateClusteringCommandCollection.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/commands/StateClusteringCommandCollection.java?rev=1081225&r1=1081224&r2=1081225&view=diff == --- axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/commands/StateClusteringCommandCollection.java (original) +++ axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/state/commands/StateClusteringCommandCollection.java Sun Mar 13 21:41:45 2011 @@ -24,27 +24,29 @@ import org.apache.axis2.clustering.state import org.apache.axis2.context.ConfigurationContext; import java.util.ArrayList; +import java.util.List; /** - * + * A StateClusteringCommand consisting of a collection of other StateClusteringCommands */ public class StateClusteringCommandCollection extends StateClusteringCommand { -private final ArrayList commands; +private final List commands; -public StateClusteringCommandCollection(ArrayList commands) { +public StateClusteringCommandCollection(List commands) { this.commands = commands; } public void execute(ConfigurationContext configContext) throws ClusteringFault { -for (int i = 0; i < commands.size(); i++) { -StateClusteringCommand cmd = (StateClusteringCommand) commands.get(i); -if (cmd != null) { -cmd.execute(configContext); -} +for (StateClusteringCommand command : commands) { +command.execute(configContext); } } +public boolean isEmpty(){ +return commands != null && commands.isEmpty(); +} + public String toString() { return "StateClusteringCommandCollection"; }