geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashishj...@apache.org
Subject svn commit: r938021 - in /geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src: main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java
Date Mon, 26 Apr 2010 12:35:40 GMT
Author: ashishjain
Date: Mon Apr 26 12:35:39 2010
New Revision: 938021

URL: http://svn.apache.org/viewvc?rev=938021&view=rev
Log:
GERONIMO-4892 Updated patch to remove name collisions.

Modified:
    geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java
    geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java

Modified: geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java?rev=938021&r1=938020&r2=938021&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java
(original)
+++ geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java
Mon Apr 26 12:35:39 2010
@@ -281,13 +281,14 @@ public class MasterConfigurationStore im
         return gbean;
     }
 
-    protected AbstractName buildControllerName(Artifact configId,
-            NodeInfo nodeInfo) {
-    	Map nameMap= new Hashtable();
-    	nameMap.put("nodeName", nodeInfo.getName());
-    	nameMap.put("appName", configId.getArtifactId());
-    	return new AbstractName(configId, nameMap);
-       // return new AbstractName(configId, Collections.singletonMap("nodeName", nodeInfo.getName()));
+    protected AbstractName buildControllerName(Artifact configId, NodeInfo nodeInfo) {
+        Map nameMap = new Hashtable();
+        nameMap.put("nodeName", nodeInfo.getName());
+        nameMap.put("artifactId", configId.getArtifactId());
+        nameMap.put("groupId", configId.getGroupId());
+        nameMap.put("version", "" + configId.getVersion().getMajorVersion() + configId.getVersion().getMinorVersion());
+        nameMap.put("type", configId.getType());
+        return new AbstractName(configId, nameMap);
     }
 
     public static final String GBEAN_J2EE_TYPE = "ConfigurationStore";

Modified: geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java?rev=938021&r1=938020&r2=938021&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java
(original)
+++ geronimo/server/branches/2.2/plugins/clustering/geronimo-deploy-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java
Mon Apr 26 12:35:39 2010
@@ -75,11 +75,13 @@ public class MasterConfigurationStoreTes
         storeClient = (ClusterConfigurationStoreClient) mock(ClusterConfigurationStoreClient.class);
         kernel.getAbstractNameFor(clusterInfo);
         configId = new Artifact("groupId", "artifactId", "2.0", "car");
-        Map nameMap= new Hashtable();
-    	nameMap.put("name", "ClusterInfo");
-    	nameMap.put("appName", configId.getArtifactId());
-        clusterInfoName= new AbstractName(configId,nameMap);
-       // clusterInfoName = new AbstractName(configId, Collections.singletonMap("name", "ClusterInfo"));
+        Map nameMap = new Hashtable();
+        nameMap.put("name", "ClusterInfo");
+        nameMap.put("artifactId", configId.getArtifactId());
+        nameMap.put("groupId", configId.getGroupId());
+        nameMap.put("version", "" + configId.getVersion().getMajorVersion() + configId.getVersion().getMinorVersion());
+        nameMap.put("type", configId.getType());
+        clusterInfoName = new AbstractName(configId, nameMap);
         modify().returnValue(clusterInfoName);
         
         delegate = (ConfigurationStore) mock(ConfigurationStore.class);



Mime
View raw message