geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1073197 - in /geronimo/server/branches/3.0-M2: framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/
Date Tue, 22 Feb 2011 01:23:35 GMT
Author: rwonly
Date: Tue Feb 22 01:23:34 2011
New Revision: 1073197

URL: http://svn.apache.org/viewvc?rev=1073197&view=rev
Log:
GERONIMO-5765 remove the info in portlet and check Bundle-SymbolicName insteadof Web-ContextPath
when do deploy

Modified:
    geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java

Modified: geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=1073197&r1=1073196&r2=1073197&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Tue Feb 22 01:23:34 2011
@@ -112,16 +112,25 @@ public class Deployer implements GBeanLi
         File tmpDir = null;
         if (moduleFile != null && !moduleFile.isDirectory()) {
             
-            // GERONIMO-5765 add a warning message if user is deploying a wab
+            // GERONIMO-5765 add a warning message if user is deploying a bundle(wab)
             // In future, we will support bundle deployment through deployer and remove this,
see GERONIMO-5764
+            JarFile moduleJar = null;
             try {
-                JarFile moduleJar = new JarFile(moduleFile);
+                moduleJar = new JarFile(moduleFile);
                 Manifest mf = moduleJar.getManifest();
-                if (mf!=null && mf.getMainAttributes().getValue("Web-ContextPath")!=
null){
-                    log.warn("You are deploying a WAB to Geronimo. The recommended way to
install a bundle is using a standard OSGi installation.");
+                if (mf!=null && mf.getMainAttributes().getValue("Bundle-SymbolicName")!=
null){
+                    log.warn("Deploying module as a regular Java EE application. Its existing
OSGi manifest will be ignored.");
                 } 
-            } catch (IOException e1) {
-                e1.printStackTrace();
+            } catch (IOException ioe) {
+                ioe.printStackTrace();
+            } finally {
+                if (moduleJar!=null){
+                    try {
+                        moduleJar.close();
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
             }
             
             

Modified: geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java?rev=1073197&r1=1073196&r2=1073197&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
(original)
+++ geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
Tue Feb 22 01:23:34 2011
@@ -122,14 +122,6 @@ public class DeploymentPortlet extends B
             throw new PortletException(e);
         }
         
-        // GERONIMO-5765 add a warning message if user is deploying a wab
-        // In future, we will support bundle deployment through deployer and remove this,
see GERONIMO-5764
-        String moduleFileName = moduleFile.getName();
-        if (moduleFileName.substring(moduleFileName.lastIndexOf('.')).toLowerCase().equals(".wab")){
-            String wabmsg = "You are deploying a WAB to Geronimo. The recommended way to
install a bundle is using a standard OSGi installation.";
-            addInfoMessage(actionRequest, "[INFO] "+wabmsg);
-        }
-        
         DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
         FileInputStream fis = null;
         try {



Mime
View raw message