geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1134924 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core: GeronimoServerBehaviourDelegate.java ModuleArtifactMapper.java SynchronizeProjectOnServerTask.java
Date Sun, 12 Jun 2011 13:23:33 GMT
Author: gawor
Date: Sun Jun 12 13:23:33 2011
New Revision: 1134924

URL: http://svn.apache.org/viewvc?rev=1134924&view=rev
Log:
GERONIMODEVTOOLS-718: Since we are no longer caching bundle id - remove associated methods
& code. Also some other minor improvements

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ModuleArtifactMapper.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java?rev=1134924&r1=1134923&r2=1134924&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
Sun Jun 12 13:23:33 2011
@@ -852,7 +852,7 @@ abstract public class GeronimoServerBeha
         TargetModuleID[] ids;
         
         if (configId == null) {
-            HashMap artifactsMap = ModuleArtifactMapper.getInstance().getServerArtifactsMap(getServer());
+            Map<String, String> artifactsMap = ModuleArtifactMapper.getInstance().getServerArtifactsMap(getServer());
             if (artifactsMap != null) {
                 synchronized (artifactsMap) {
                     status = distribute(module, monitor);
@@ -875,10 +875,6 @@ abstract public class GeronimoServerBeha
             if (!status.isOK()) {
                 doFail(status, Messages.START_FAIL);
             } else {
-                // record the bundle project and bundle ID map to ModuleArtifactMapper since

-                // starting EBA module leads to the included OSGi bundle project being re-installed

-                // into geronimo server cache folder
-                addServerModuleBundleIDMap(module);
                 setModuleState(new IModule [] { module }, IServer.STATE_STARTED);
             }
         } else {
@@ -907,10 +903,6 @@ abstract public class GeronimoServerBeha
                     doFail(status, Messages.REDEPLOY_FAIL);
                 } else {
                     setModuleState(new IModule [] { module }, IServer.STATE_STARTED);
-                    // record the bundle project and bundle ID map to ModuleArtifactMapper
since 
-                    // starting EBA module leads to the included OSGi bundle project being
re-installed 
-                    // into geronimo server cache folder
-                    addServerModuleBundleIDMap(module);
                 }
             } else {
                 //different configIds from what needs to be undeployed to what will be deployed
@@ -1064,7 +1056,7 @@ abstract public class GeronimoServerBeha
     protected void doRemoved(IModule module, IProgressMonitor monitor) throws Exception {
         Trace.tracePoint("Entry", Activator.traceCore, "GeronimoServerBehaviourDelegate.doRemoved",
module.getName());
 
-        HashMap artifactsMap = ModuleArtifactMapper.getInstance().getServerArtifactsMap(getServer());
+        Map<String, String> artifactsMap = ModuleArtifactMapper.getInstance().getServerArtifactsMap(getServer());
         if (artifactsMap != null) {
             synchronized (artifactsMap) {
                 _doRemove(module, monitor);
@@ -1081,21 +1073,13 @@ abstract public class GeronimoServerBeha
         if (!status.isOK()) {
             doFail(status, Messages.UNDEPLOY_FAIL);
         }
-
-        ModuleArtifactMapper.getInstance().removeArtifactBundleEntry(getServer(), module);
     }
     
     protected void doNoChange(IModule module, IProgressMonitor monitor) throws Exception
{
         Trace.tracePoint("Entry", Activator.traceCore, "GeronimoServerBehaviourDelegate.doNoChange",
module.getName());
         
-        if(DeploymentUtils.getLastKnownConfigurationId(module, getServer()) != null) {
-            IStatus status = start(module, monitor);
-            if (status!=null && status.isOK()) {
-                // record the bundle project and bundle ID map to ModuleArtifactMapper since

-                // starting EBA module leads to the included OSGi bundle project being re-installed

-                // into geronimo server cache folder
-                addServerModuleBundleIDMap(module);
-            }
+        if (DeploymentUtils.getLastKnownConfigurationId(module, getServer()) != null) {
+            start(module, monitor);
         } else {
             doAdded(module, null, monitor);
         }
@@ -1114,11 +1098,6 @@ abstract public class GeronimoServerBeha
         status = start(module, monitor);
         if (!status.isOK()) {
             doFail(status, Messages.START_FAIL);
-        } else {
-            // record the bundle project and bundle ID map to ModuleArtifactMapper since

-            // starting EBA module leads to the included OSGi bundle project being re-installed

-            // into geronimo server cache folder
-            addServerModuleBundleIDMap(module);
         }
 
         Trace.tracePoint("Exit ", Activator.traceCore, "GeronimoServerBehaviourDelegate.doRestart");
@@ -1130,16 +1109,6 @@ abstract public class GeronimoServerBeha
         mapper.addArtifactEntry(getServer(), module, ids[0].getModuleID());
         return ids;
     }
-    
-    private void addServerModuleBundleIDMap(IModule module) {
-        ModuleArtifactMapper mapper = ModuleArtifactMapper.getInstance();
-        mapper.addBundleEntry(getServer(), module);
-    }
-    
-    private void removeServerModuleBundleIDMap(IModule module) {
-        ModuleArtifactMapper mapper = ModuleArtifactMapper.getInstance();
-        mapper.removeBundleEntry(getServer(), module);
-    }
 
     protected void doFail(IStatus status, String message) throws CoreException {
         MultiStatus ms = new MultiStatus(Activator.PLUGIN_ID, 0, message, null);
@@ -1475,15 +1444,7 @@ abstract public class GeronimoServerBeha
     public void startModule(IModule[] module, IProgressMonitor monitor) {
         Trace.tracePoint("Entry", Activator.traceCore, "GeronimoServerBehaviourDelegate.startModule",
Arrays.asList(module));
         try {
-            IStatus status = start(module[0], monitor);
-            if (status!=null && status.isOK()) {
-                for (IModule m : module) {
-                    // record the bundle project and bundle ID map to ModuleArtifactMapper
since 
-                    // starting EBA module leads to the included OSGi bundle project being
re-installed 
-                    // into geronimo server cache folder
-                    addServerModuleBundleIDMap(m);
-                }                
-            }
+            start(module[0], monitor);
         } catch (Exception e) {
             Trace.trace(Trace.ERROR, "Error starting module " + module[0].getName(), e, Activator.logCore);
             throw new RuntimeException("Error starting module " + module[0].getName(), e);
@@ -1495,15 +1456,7 @@ abstract public class GeronimoServerBeha
     public void stopModule(IModule[] module, IProgressMonitor monitor) {
         Trace.tracePoint("Entry", Activator.traceCore, "GeronimoServerBehaviourDelegate.stopModule",
Arrays.asList(module));
         try {
-            IStatus status = stop(module[0], monitor);
-            // remove bundle project and bundle ID map from ModuleArtifactMapper if it is
EBA module, 
-            // since restarting EBA module will lead to the included OSGi bundle project
being re-installed 
-            // into geronimo server cache folder
-            if (status != null && status.isOK()) {
-                for (IModule m : module) {
-                    removeServerModuleBundleIDMap(m);
-                }                
-            }
+            stop(module[0], monitor);
         } catch (Exception e) {
             Trace.trace(Trace.ERROR, "Error stopping module " + module[0].getName(), e, Activator.logCore);
             throw new RuntimeException("Error stopping module " + module[0].getName(), e);
@@ -1515,25 +1468,8 @@ abstract public class GeronimoServerBeha
     public void restartModule(IModule[] module, IProgressMonitor monitor) {
         Trace.tracePoint("Entry", Activator.traceCore, "GeronimoServerBehaviourDelegate.restartModule",
Arrays.asList(module));
         try {
-            IStatus status = stop(module[0], monitor);            
-            // remove bundle project and bundle ID map from ModuleArtifactMapper if it is
EBA module, 
-            // since restarting EBA module will lead to the included OSGi bundle project
being re-installed 
-            // into geronimo server cache folder
-            if (status != null && status.isOK()) {
-                for (IModule m : module) {
-                    removeServerModuleBundleIDMap(m);
-                }                
-            }
-            
-            status = start(module[0], monitor);
-            if (status!=null && status.isOK()) {
-                for (IModule m : module) {
-                    // record the bundle project and bundle ID map to ModuleArtifactMapper
since 
-                    // starting EBA module leads to the included OSGi bundle project being
re-installed 
-                    // into geronimo server cache folder
-                    addServerModuleBundleIDMap(m);
-                }                
-            }
+            stop(module[0], monitor);            
+            start(module[0], monitor);
         } catch (Exception e) {
             Trace.trace(Trace.ERROR, "Error restarting module " + module[0].getName(), e,
Activator.logCore);
             throw new RuntimeException("Error restarting module " + module[0].getName(),
e);

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ModuleArtifactMapper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ModuleArtifactMapper.java?rev=1134924&r1=1134923&r2=1134924&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ModuleArtifactMapper.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ModuleArtifactMapper.java
Sun Jun 12 13:23:33 2011
@@ -28,16 +28,9 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutput;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.geronimo.deployment.plugin.jmx.ExtendedDeploymentManager;
-import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.st.v30.core.commands.DeploymentCommandFactory;
-import org.apache.geronimo.st.v30.core.osgi.AriesHelper;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.wst.server.core.IModule;
@@ -52,16 +45,13 @@ public class ModuleArtifactMapper {
     private static ModuleArtifactMapper instance = new ModuleArtifactMapper();
 
     private static final String FILE_NAME = "servermodule.info";    
-    private static final String FILE_NAME2 = "serverbundle.info";
 
-    ServerEntries serverArtifactEntries = null;    
-    ServerEntries2 serverBundleEntries = null;
+    private ServerEntries serverArtifactEntries = null;    
 
     private ModuleArtifactMapper() {
-        if (serverArtifactEntries == null)
+        if (serverArtifactEntries == null) {
             serverArtifactEntries = new ServerEntries();
-        if (serverBundleEntries == null) 
-            serverBundleEntries = new ServerEntries2();
+        }
         load();
     }
 
@@ -70,143 +60,36 @@ public class ModuleArtifactMapper {
     }
 
     synchronized public void addArtifactEntry(IServer server, IModule module, String configId)
{
-
-        if (!SocketUtil.isLocalhost(server.getHost()))
-            return;
-
-        File runtimeLoc = server.getRuntime().getLocation().toFile();
-        Map artifactEntries = (Map) serverArtifactEntries.get(runtimeLoc);
-        if (artifactEntries == null) {
-            artifactEntries = new HashMap();
-            serverArtifactEntries.put(runtimeLoc, artifactEntries);
-        }
-
-        artifactEntries.put(module.getProject().getName(), configId);       
-    }
-    
-    synchronized public void addBundleEntry(IServer server, IModule eba) {
-        
-        if (!GeronimoUtils.isEBAModule(eba))
-            return;        
-        if (!SocketUtil.isLocalhost(server.getHost()))
-            return;
-
-        File runtimeLoc = server.getRuntime().getLocation().toFile();
-        
-        Map bundleEntries = (Map) serverBundleEntries.get(runtimeLoc);
-        if (bundleEntries == null) {
-            bundleEntries = new HashMap();
-            serverBundleEntries.put(runtimeLoc, bundleEntries);
-        }
-        
-        // first clean up the previous bundle entries for this eba if such entries exist
-        removeBundleEntry(bundleEntries, eba);
-        
-        try {
-            String configId = this.resolveArtifact(server, eba);
-            IModule[] bundleModules = AriesHelper.getChildModules(eba);            
-            ExtendedDeploymentManager dm = (ExtendedDeploymentManager) DeploymentCommandFactory.getDeploymentManager(server);
-            AbstractName abstractName = dm.getApplicationGBeanName(Artifact.create(configId));
-            long[] bundleIds = dm.getEBAContentBundleIds(abstractName);
-
-            for (long bundleId : bundleIds) {
-                String symbolicName = dm.getEBAContentBundleSymbolicName(abstractName, bundleId);
-                if (symbolicName != null) {
-                    for (IModule bundleModule : bundleModules) {
-                        if (symbolicName.equals(AriesHelper.getSymbolicName(bundleModule)))
{
-                            EBABundle ebaBundle = new EBABundle(eba, bundleModule);
-                            bundleEntries.put(ebaBundle, Long.toString(bundleId));
-                            break;
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }     
-        
-    }
-      
-    synchronized public void removeBundleEntry(IServer server, IModule eba) {
-
-        if (!GeronimoUtils.isEBAModule(eba))
-            return;
-        if (!SocketUtil.isLocalhost(server.getHost()))
-            return;
-
-        File runtimeLoc = server.getRuntime().getLocation().toFile();
-        Map bundleEntries = (Map) serverBundleEntries.get(runtimeLoc);    
-        removeBundleEntry(bundleEntries, eba);
-    }
-    
-    private void removeBundleEntry(Map map, IModule eba) {
-        
-        if (map == null)
-            return;
-        
-        Iterator<EBABundle> iterator = map.keySet().iterator();
-        ArrayList<EBABundle> removes = new ArrayList<EBABundle>();
-        for ( ; iterator.hasNext();) {
-            EBABundle ebaBundle = iterator.next();
-            if (ebaBundle.ebaName != null && ebaBundle.ebaName.equals(eba.getProject().getName()))
{
-                removes.add(ebaBundle);
-            }
-        }            
-        if (removes.size()!=0) {
-            for (EBABundle remove : removes) {
-                map.remove(remove);
-            }
-        }
-    }
-    
-    synchronized public void removeArtifactBundleEntry(IServer server, IModule module) {
-
-        if (!SocketUtil.isLocalhost(server.getHost()))
-            return;
-
-        File runtimeLoc = server.getRuntime().getLocation().toFile();
-        Map artifactEntries = (Map) serverArtifactEntries.get(runtimeLoc);
+        Map<String, String> artifactEntries = getServerArtifactsMap(server);
         if (artifactEntries != null) {
-            artifactEntries.remove(module.getProject().getName());
-        }
-        
-        if (GeronimoUtils.isEBAModule(module)) {
-            removeBundleEntry(server, module);
-        }
+            artifactEntries.put(module.getProject().getName(), configId); 
+        }       
     }
-
+       
     synchronized public String resolveArtifact(IServer server, IModule module) {        
-        if (module != null ) {
+        if (module != null) {
             return resolveArtifact(server, module.getProject());
         }
         return null;
     }
     
     synchronized public String resolveArtifact(IServer server, IProject project) {
-        Map artifactEntries = (Map) serverArtifactEntries.get(server.getRuntime().getLocation().toFile());
+        Map<String, String> artifactEntries = serverArtifactEntries.get(server.getRuntime().getLocation().toFile());
         if (artifactEntries != null && project != null) {
-            return (String) artifactEntries.get(project.getName());
+            return artifactEntries.get(project.getName());
         }
         return null;
     }
-    
-    synchronized public String resolveBundle(IServer server, IModule eba, IModule bundle)
{
-        Map bundleEntries = (Map) serverBundleEntries.get(server.getRuntime().getLocation().toFile());
-        if (bundleEntries != null && eba != null && bundle!=null) {
-            return (String) bundleEntries.get(new EBABundle(eba, bundle));            
-        }
-        return null;
-    }
-    
-    synchronized public HashMap getServerArtifactsMap(IServer server) {
+         
+    synchronized public Map<String, String> getServerArtifactsMap(IServer server) {
         if (!SocketUtil.isLocalhost(server.getHost())) {
             return null;
         }            
         
         File runtimeLoc = server.getRuntime().getLocation().toFile();  
-        HashMap artifactEntries = (HashMap) serverArtifactEntries.get(runtimeLoc);
+        Map<String, String> artifactEntries = serverArtifactEntries.get(runtimeLoc);
         if (artifactEntries == null) {
-            artifactEntries = new HashMap();
+            artifactEntries = new HashMap<String, String>();
             serverArtifactEntries.put(runtimeLoc, artifactEntries);
         }
         
@@ -236,7 +119,6 @@ public class ModuleArtifactMapper {
     
     synchronized public void save() {
         save(serverArtifactEntries, FILE_NAME);
-        save(serverBundleEntries, FILE_NAME2);
     }
 
     private void load(IServerEntries entries, String fileName) {
@@ -264,41 +146,13 @@ public class ModuleArtifactMapper {
     
     synchronized private void load() {
         load(serverArtifactEntries, FILE_NAME);
-        load(serverBundleEntries, FILE_NAME2);
     }
     
-    protected class EBABundle {
-        String ebaName;
-        String bundleName;
-
-        public EBABundle(IModule eba, IModule bundle) {
-                this.ebaName = eba.getProject().getName();
-                this.bundleName = bundle.getProject().getName();
-        }
-        
-        public EBABundle(String ebaName, String bundleName) {
-            this.ebaName = ebaName;
-            this.bundleName = bundleName;
-        }
-
-        public boolean equals(Object bundle) {
-            if (bundle instanceof EBABundle) {
-                return bundleName.equals(((EBABundle) bundle).bundleName)
-                        && ebaName.equals(((EBABundle) bundle).ebaName);
-            }
-            return false;
-        }
-        
-        public int hashCode() {
-            return ebaName.hashCode() + bundleName.hashCode();
-        }
-    }
-
-    protected interface IServerEntries{
+    protected interface IServerEntries {
         public  void loadXML (String xml);
-        public String toXML ();
-        
+        public String toXML ();        
     }
+    
     // This Inner class is the result of removing XStream.  ModuleArtifactMapper
     // was the only class using it so it seemed silly to have two extra jar
     // files (xpp3.jar and xstream.jar) just for one class.
@@ -306,7 +160,7 @@ public class ModuleArtifactMapper {
     // keys are the files
     // entries are the Maps of artifact entries
     // this is all saved/loaded to .plugins/org.apache.geronimo.st.v30.core/servermodule.info
-    protected class ServerEntries extends HashMap implements IServerEntries{
+    protected class ServerEntries extends HashMap<File, Map<String, String>>
implements IServerEntries{
         static final long serialVersionUID = 0;
 
         public void loadXML (String xml) {
@@ -316,14 +170,14 @@ public class ModuleArtifactMapper {
             String projectName, configId;
             int fileEndPos, nomapStartPos, mapStartPos, mapEndPos, stringStartPos, stringEndPos;
             int fileStartPos = xml.indexOf("<file>", 0);
-            Map artifactEntries;
+            Map<String, String> artifactEntries;
             while (fileStartPos > -1) {
                 fileEndPos = xml.indexOf("</file>", fileStartPos);
                 File runtimeLoc = new File(xml.substring(fileStartPos + 6, fileEndPos));
 
                 nomapStartPos = xml.indexOf("<map/>", fileEndPos);
                 mapStartPos = xml.indexOf("<map>", fileEndPos);
-                artifactEntries = new HashMap();
+                artifactEntries = new HashMap<String, String>();
                 // have projects on the server
                 if ((nomapStartPos == -1) || (nomapStartPos > mapStartPos)) {
                     mapEndPos = xml.indexOf("</map>", mapStartPos);
@@ -375,86 +229,5 @@ public class ModuleArtifactMapper {
             return xmlString;
         }
     }
-    
-    // This Inner class is the result of removing XStream.  ModuleArtifactMapper
-    // was the only class using it so it seemed silly to have two extra jar
-    // files (xpp3.jar and xstream.jar) just for one class.
-    // this class is a HashMap
-    // keys are the files
-    // entries are the Maps of bundle entries
-    // this is all saved/loaded to .plugins/org.apache.geronimo.st.v30.core/serverbundle.info
-    protected class ServerEntries2 extends HashMap implements IServerEntries{
-        static final long serialVersionUID = 0;
-
-        public void loadXML (String xml) {
-            if (xml == null || xml.length() == 0)
-                return;
-
-            String ebaProjectName, bundleProjectName, bundleId;
-            int fileEndPos, nomapStartPos, mapStartPos, mapEndPos, stringStartPos, stringEndPos;
-            int fileStartPos = xml.indexOf("<file>", 0);
-            Map bundleEntries;
-            while (fileStartPos > -1) {
-                fileEndPos = xml.indexOf("</file>", fileStartPos);
-                File runtimeLoc = new File(xml.substring(fileStartPos + 6, fileEndPos));
-
-                nomapStartPos = xml.indexOf("<map/>", fileEndPos);
-                mapStartPos = xml.indexOf("<map>", fileEndPos);
-                bundleEntries = new HashMap();
-                // have EBAs on the server
-                if ((nomapStartPos == -1) || (nomapStartPos > mapStartPos)) {
-                    mapEndPos = xml.indexOf("</map>", mapStartPos);
-                    stringStartPos = xml.indexOf("<string>", mapStartPos);
-                    while ((stringStartPos > -1) && (stringStartPos < mapEndPos))
{
-                        stringEndPos = xml.indexOf("</string>", stringStartPos);
-                        ebaProjectName = xml.substring(stringStartPos + 8, stringEndPos);
-                        stringStartPos = xml.indexOf("<string>", stringEndPos);
-                        stringEndPos = xml.indexOf("</string>", stringStartPos);
-                        bundleProjectName = xml.substring(stringStartPos + 8, stringEndPos);
-                        stringStartPos = xml.indexOf("<string>", stringEndPos);
-                        stringEndPos = xml.indexOf("</string>", stringStartPos);
-                        bundleId = xml.substring(stringStartPos + 8, stringEndPos);
-                        bundleEntries.put(new EBABundle(ebaProjectName, bundleProjectName),
bundleId);
-                        stringStartPos = xml.indexOf("<string>", stringEndPos);
-                    }
-                }
-                // if no projects on the server, it is ok to put an empty HashMap
-                this.put (runtimeLoc, bundleEntries);
-
-                fileStartPos = xml.indexOf("<file>", fileEndPos);
-            }
-        }
-
-        public String toXML () {
-            String xmlString = "";
-            if (!isEmpty()) {
-                xmlString = "<map>\n  <entry>\n";
-
-                Object[] serverKeySet = keySet().toArray();
-                for (int i = 0; i < serverKeySet.length; i++) {
-                    xmlString += "    <file>" + serverKeySet[i] + "</file>\n";
-                    Map bundleMap = (Map)get(serverKeySet[i]);
-                    if (bundleMap == null || bundleMap.size() == 0) {
-                        xmlString += "    <map/>\n";
-                    }
-                    else {
-                        xmlString += "    <map>\n";
-                        Object[] bundleKeySet = bundleMap.keySet().toArray();
-                        for (int j = 0; j < bundleKeySet.length; j++)
-                        {
-                             xmlString += "      <entry>\n";
-                             xmlString += "        <string>" + ((EBABundle)bundleKeySet[j]).ebaName
+ "</string>\n";
-                             xmlString += "        <string>" + ((EBABundle)bundleKeySet[j]).bundleName
+ "</string>\n";
-                             xmlString += "        <string>" + (String)bundleMap.get(bundleKeySet[j])
+ "</string>\n";
-                             xmlString += "      </entry>\n";
-                        }
-                        xmlString += "    </map>\n";
-                    }
-                }
-                xmlString += "  </entry>\n</map>";
-            }
-            return xmlString;
-        }
-    }
-    
+        
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java?rev=1134924&r1=1134923&r2=1134924&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/SynchronizeProjectOnServerTask.java
Sun Jun 12 13:23:33 2011
@@ -21,7 +21,6 @@
 package org.apache.geronimo.st.v30.core;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -65,7 +64,7 @@ public class SynchronizeProjectOnServerT
 
         if (canUpdateState() && publishLock.tryLock()) {
             try {
-                HashMap<String, String> projectsOnServer = ModuleArtifactMapper.getInstance().getServerArtifactsMap(server);
+                Map<String, String> projectsOnServer = ModuleArtifactMapper.getInstance().getServerArtifactsMap(server);
 
                 if (projectsOnServer != null && !projectsOnServer.isEmpty()) {
                     synchronized (projectsOnServer) {
@@ -144,12 +143,6 @@ public class SynchronizeProjectOnServerT
         try {
             wc.modifyModules(null, remove, monitor);
             server = wc.save(true, monitor);
-
-            if (remove != null) {
-                for (IModule module : remove) {
-                    ModuleArtifactMapper.getInstance().removeArtifactBundleEntry(this.server,
module);
-                }
-            }
         } catch (CoreException e) {
             Trace.trace(Trace.WARNING, "Could not remove module in SynchronizeProjectOnServerTask",
e, Activator.logCore);
         }



Mime
View raw message