geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r484665 - in /geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main: java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java webapp/WEB-INF/view/dbwizard/edit.jsp
Date Fri, 08 Dec 2006 17:17:45 GMT
Author: dain
Date: Fri Dec  8 09:17:41 2006
New Revision: 484665

URL: http://svn.apache.org/viewvc?view=rev&rev=484665
Log:
Applied GERONIMO-2377 deploying a new datasource with the same name does not indicate any
problem in the console

Modified:
    geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
    geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp

Modified: geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java?view=diff&rev=484665&r1=484664&r2=484665
==============================================================================
--- geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
(original)
+++ geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Fri Dec  8 09:17:41 2006
@@ -31,8 +31,8 @@
 import java.net.URI;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.net.URLEncoder;
 import java.net.URLDecoder;
+import java.net.URLEncoder;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.Driver;
@@ -49,10 +49,13 @@
 import java.util.SortedSet;
 import javax.enterprise.deploy.model.DDBean;
 import javax.enterprise.deploy.model.DDBeanRoot;
+import javax.enterprise.deploy.shared.StateType;
 import javax.enterprise.deploy.spi.DeploymentConfiguration;
 import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.Target;
 import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.enterprise.deploy.spi.status.ProgressEvent;
+import javax.enterprise.deploy.spi.status.ProgressListener;
 import javax.enterprise.deploy.spi.status.ProgressObject;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
@@ -989,6 +992,10 @@
                             
                             log.info("Deployment completed successfully!");
                         }
+                    } else if(po.getDeploymentStatus().isFailed()) {
+                        data.deployError = "Unable to deploy: " + data.name;
+                        response.setRenderParameter(MODE_KEY, EDIT_MODE);
+                        log.info("Deployment Failed!");
                     }
                 }
             } catch (Exception e) {
@@ -1199,6 +1206,7 @@
         private String rarPath;
         private String importSource;
         private Map abstractNameMap; // generated as needed, don't need to read/write it
+        private String deployError;
 
         public void load(PortletRequest request) {
             name = request.getParameter("name");
@@ -1255,6 +1263,8 @@
                     propertyNames.put(key, getPropertyName(key));
                 }
             }
+            deployError = request.getParameter("deployError");
+            if(deployError != null && deployError.equals("")) deployError = null;
         }
 
         public void loadPropertyNames() {
@@ -1325,6 +1335,7 @@
                     response.setRenderParameter((String)entry.getKey(), (String)entry.getValue());
                 }
             }
+            if(deployError != null) response.setRenderParameter("deployError", deployError);
         }
 
         public String getName() {
@@ -1423,6 +1434,10 @@
             abstractNameMap.put("type", name.getArtifact().getType());
             abstractNameMap.put("version", name.getArtifact().getVersion().toString());
             return abstractNameMap;
+        }
+        
+        public String getDeployError() {
+            return deployError;
         }
     }
 

Modified: geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp?view=diff&rev=484665&r1=484664&r2=484665
==============================================================================
--- geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp
(original)
+++ geronimo/server/branches/1.2/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp
Fri Dec  8 09:17:41 2006
@@ -105,6 +105,12 @@
     <input type="hidden" name="rarPath" value="${pool.rarPath}" />
 
     <table border="0">
+    <c:if test="${!(empty pool.deployError)}">
+      <tr>
+      	<th><div align="right"><font color="red">Error Deploying:</font></div></th>
+      	<td><font color="red">${pool.deployError} - see the log for details</font></td>
+      </tr>
+    </c:if>
     <!-- ENTRY FIELD: NAME -->
       <tr>
         <th style="min-width: 140px"><div align="right">Pool Name:</div></th>
@@ -173,7 +179,7 @@
       <tr>
         <th><div align="right">Driver JAR:</div></th>
         <td>
-          <select multiple name="jars" size="10">
+          <select multiple="true" name="jars" size="10">
               <c:forEach var="availableJar" items="${availableJars}">
                   <option value="${availableJar}" <c:forEach var="jar" items="${pool.jars}"><c:if
test="${availableJar == jar}">selected</c:if></c:forEach>>
                       ${availableJar}
@@ -250,7 +256,7 @@
       <tr>
         <th><div align="right">Driver JAR:</div></th>
         <td>
-          <select multiple name="jars" size="10">
+          <select multiple="true" name="jars" size="10">
               <c:forEach var="availableJar" items="${availableJars}">
                   <option value="${availableJar}" <c:forEach var="jar" items="${pool.jars}"><c:if
test="${availableJar == jar}">selected</c:if></c:forEach>>
                       ${availableJar}



Mime
View raw message