axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r506349 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment: Deployer.java DeploymentEngine.java ModuleDeployer.java RepositoryListener.java ServiceDeployer.java repository/util/DeploymentFileData.java
Date Mon, 12 Feb 2007 07:35:27 GMT
Author: deepal
Date: Sun Feb 11 23:35:27 2007
New Revision: 506349

URL: http://svn.apache.org/viewvc?view=rev&rev=506349
Log:
- add a new method to Deployer interface called "unDeploy"
- Changed the way we add a Deployer a bit
<deployer extension=".aar" ....>

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleDeployer.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceDeployer.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java?view=diff&rev=506349&r1=506348&r2=506349
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/Deployer.java
Sun Feb 11 23:35:27 2007
@@ -34,4 +34,5 @@
     void deploy(DeploymentFileData deploymentFileData);
     void setDirectory(String directory);
     void setExtension(String extension);
+    void unDeploy(String fileName);
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=506349&r1=506348&r2=506349
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
Sun Feb 11 23:35:27 2007
@@ -612,19 +612,19 @@
             if (wsToUnDeploy.size() > 0) {
                 for (int i = 0; i < wsToUnDeploy.size(); i++) {
                     WSInfo wsInfo = (WSInfo) wsToUnDeploy.get(i);
-                    if (TYPE_SERVICE.equals(wsInfo.getType())) {
+                    String fileType = wsInfo.getType();
+                    if (TYPE_SERVICE.equals(fileType)) {
                         if (isHotUpdate()) {
-                            try {
-                                fileName = getAxisServiceName(wsInfo.getFileName());
-                                axisConfig.removeServiceGroup(fileName);
-                                log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
-                                        wsInfo.getFileName()));
-                            } catch (AxisFault axisFault) {
-                                //May be a faulty service
-                                axisConfig.removeFaultyService(wsInfo.getFileName());
-                            }
+                          serviceDeployer.unDeploy(wsInfo.getFileName());
                         } else {
                             axisConfig.removeFaultyService(wsInfo.getFileName());
+                        }
+                    } else {
+                        if (isHotUpdate()) {
+                            Deployer deployer = (Deployer) extensioToDeployerMappingMap.get(fileType);
+                            if(deployer!=null){
+                                deployer.unDeploy(wsInfo.getFileName());
+                            }
                         }
                     }
                 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleDeployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleDeployer.java?view=diff&rev=506349&r1=506348&r2=506349
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleDeployer.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ModuleDeployer.java
Sun Feb 11 23:35:27 2007
@@ -115,4 +115,6 @@
     public void setDirectory(String directory) {}
 
     public void setExtension(String extension) {}
+
+    public void unDeploy(String fileName) {}
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java?view=diff&rev=506349&r1=506348&r2=506349
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
Sun Feb 11 23:35:27 2007
@@ -197,12 +197,12 @@
           Iterator keys = directoryToExtensionMappingMap.keySet().iterator();
            while (keys.hasNext()) {
                String s = (String) keys.next();
-               findFileForGiveDirectory(s,(String)directoryToExtensionMappingMap.get(s));
+               findFileForGivenDirectory(s,(String)directoryToExtensionMappingMap.get(s));
            }
        }
     }
 
-    private void findFileForGiveDirectory(String dir , String extension){
+    private void findFileForGivenDirectory(String dir , String extension){
         try {
             File fileTobeSearch = new File(deploymentEngine.getRepositoryDir(),dir);
             if(fileTobeSearch.exists()){

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceDeployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceDeployer.java?view=diff&rev=506349&r1=506348&r2=506349
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceDeployer.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceDeployer.java
Sun Feb 11 23:35:27 2007
@@ -139,4 +139,16 @@
 
     public void setExtension(String extension) {
     }
+
+    public void unDeploy(String fileName) {
+        try {
+            fileName = DeploymentEngine.getAxisServiceName(fileName);
+            axisConfig.removeServiceGroup(fileName);
+            log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
+                    fileName));
+        } catch (AxisFault axisFault) {
+            //May be a faulty service
+            axisConfig.removeFaultyService(fileName);
+        }
+    }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java?view=diff&rev=506349&r1=506348&r2=506349
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java
Sun Feb 11 23:35:27 2007
@@ -104,7 +104,7 @@
 
     public static  String getFileExtension(String fileName){
         int index = fileName.lastIndexOf('.');
-        return fileName.substring(index+1);
+        return fileName.substring(index);
     }
     public void setClassLoader(ClassLoader classLoader) {
         this.classLoader = classLoader;



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


Mime
View raw message