You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jarek Gawor <jg...@gmail.com> on 2007/12/11 16:13:43 UTC

Re: svn commit: r603211 - in /geronimo/server: branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/

Vamsi,

Please run the console testsuites. I believe this change is causing
failures in trunk and branches/2.0.

Jarek

On Dec 11, 2007 6:29 AM,  <va...@apache.org> wrote:
> Author: vamsic007
> Date: Tue Dec 11 03:29:36 2007
> New Revision: 603211
>
> URL: http://svn.apache.org/viewvc?rev=603211&view=rev
> Log:
> GERONIMO-1711 WebServer Connectors portlet should provide a "restart" option for connectors
>  o Added a restart action for connectors
>
> Modified:
>     geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
>     geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
>     geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
>     geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
>
> Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
> URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?rev=603211&r1=603210&r2=603211&view=diff
> ==============================================================================
> --- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java (original)
> +++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java Tue Dec 11 03:29:36 2007
> @@ -52,7 +52,7 @@
>  import org.apache.geronimo.management.geronimo.WebManager.ConnectorType;
>
>  /**
> - * A portlet that lets you list, add, remove, start, stop, and edit web
> + * A portlet that lets you list, add, remove, start, stop, restart and edit web
>   * connectors (currently, either Tomcat or Jetty).
>   *
>   * @version $Rev$ $Date$
> @@ -223,6 +223,22 @@
>                  }
>              }
>              else {
> +                log.error("Incorrect connector reference"); //Replace this with correct error processing
> +            }
> +            actionResponse.setRenderParameter(PARM_CONNECTOR_URI, connectorURI);
> +            actionResponse.setRenderParameter(PARM_MODE, "list");
> +        } else if(mode.equals("restart")) {
> +            String connectorURI = actionRequest.getParameter(PARM_CONNECTOR_URI);
> +            // work with the current connector to restart it.
> +            NetworkConnector connector = PortletManager.getNetworkConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
> +            if(connector != null) {
> +                try {
> +                    ((GeronimoManagedBean)connector).stop();
> +                    ((GeronimoManagedBean)connector).start();
> +                } catch (Exception e) {
> +                    log.error("Unable to restart connector", e); //todo: get into rendered page somehow?
> +                }
> +            } else {
>                  log.error("Incorrect connector reference"); //Replace this with correct error processing
>              }
>              actionResponse.setRenderParameter(PARM_CONNECTOR_URI, connectorURI);
>
> Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
> URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp?rev=603211&r1=603210&r2=603211&view=diff
> ==============================================================================
> --- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp (original)
> +++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp Tue Dec 11 03:29:36 2007
> @@ -14,6 +14,9 @@
>     See the License for the specific language governing permissions and
>     limitations under the License.
>  --%>
> +
> +<%-- $Rev$ $Date$ --%>
> +
>  <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>  <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
>  <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
> @@ -63,6 +66,14 @@
>                 </portlet:actionURL>"
>                   <c:if test="${info.port eq serverPort}"> onClick="return confirm('Console application will not be available if ${info.uniqueName} is stopped.  Stop ${info.uniqueName}?');"</c:if>>
>                   stop</a>
> +               <a href="<portlet:actionURL portletMode="view">
> +                 <portlet:param name="mode" value="restart" />
> +                 <portlet:param name="connectorURI" value="${info.connectorURI}" />
> +                 <portlet:param name="managerURI" value="${container.managerURI}" />
> +                 <portlet:param name="containerURI" value="${container.containerURI}" />
> +               </portlet:actionURL>"
> +                 <c:if test="${info.port eq serverPort}"> onClick="return confirm('It is recommeded that you restart ${info.uniqueName} while accessing the Console application on a different port if possible. Console application may not be available temporarily on port ${serverPort}, typically 3 to 5 minutes, if ${info.uniqueName} is restarted. Restart ${info.uniqueName}?');"</c:if>>
> +                 restart</a>
>                 </c:when>
>                 <c:otherwise>
>                 <a href="<portlet:actionURL portletMode="view">
>
> Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?rev=603211&r1=603210&r2=603211&view=diff
> ==============================================================================
> --- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java (original)
> +++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java Tue Dec 11 03:29:36 2007
> @@ -54,7 +54,7 @@
>  import org.apache.geronimo.management.geronimo.WebManager.ConnectorType;
>
>  /**
> - * A portlet that lets you list, add, remove, start, stop, and edit web
> + * A portlet that lets you list, add, remove, start, stop, restart and edit web
>   * connectors (currently, either Tomcat or Jetty).
>   *
>   * @version $Rev$ $Date$
> @@ -225,6 +225,22 @@
>                  }
>              }
>              else {
> +                log.error("Incorrect connector reference"); //Replace this with correct error processing
> +            }
> +            actionResponse.setRenderParameter(PARM_CONNECTOR_URI, connectorURI);
> +            actionResponse.setRenderParameter(PARM_MODE, "list");
> +        } else if(mode.equals("restart")) {
> +            String connectorURI = actionRequest.getParameter(PARM_CONNECTOR_URI);
> +            // work with the current connector to restart it.
> +            NetworkConnector connector = PortletManager.getNetworkConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
> +            if(connector != null) {
> +                try {
> +                    ((GeronimoManagedBean)connector).stop();
> +                    ((GeronimoManagedBean)connector).start();
> +                } catch (Exception e) {
> +                    log.error("Unable to restart connector", e); //todo: get into rendered page somehow?
> +                }
> +            } else {
>                  log.error("Incorrect connector reference"); //Replace this with correct error processing
>              }
>              actionResponse.setRenderParameter(PARM_CONNECTOR_URI, connectorURI);
>
> Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp?rev=603211&r1=603210&r2=603211&view=diff
> ==============================================================================
> --- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp (original)
> +++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp Tue Dec 11 03:29:36 2007
> @@ -14,6 +14,9 @@
>     See the License for the specific language governing permissions and
>     limitations under the License.
>  --%>
> +
> +<%-- $Rev$ $Date$ --%>
> +
>  <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>  <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
>  <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
> @@ -63,6 +66,14 @@
>                 </portlet:actionURL>"
>                   <c:if test="${info.port eq serverPort}"> onClick="return confirm('Console application will not be available if ${info.uniqueName} is stopped.  Stop ${info.uniqueName}?');"</c:if>>
>                   stop</a>
> +               <a href="<portlet:actionURL portletMode="view">
> +                 <portlet:param name="mode" value="restart" />
> +                 <portlet:param name="connectorURI" value="${info.connectorURI}" />
> +                 <portlet:param name="managerURI" value="${container.managerURI}" />
> +                 <portlet:param name="containerURI" value="${container.containerURI}" />
> +               </portlet:actionURL>"
> +                 <c:if test="${info.port eq serverPort}"> onClick="return confirm('It is recommeded that you restart ${info.uniqueName} while accessing the Console application on a different port if possible. Console application may not be available temporarily on port ${serverPort}, typically 3 to 5 minutes, if ${info.uniqueName} is restarted. Restart ${info.uniqueName}?');"</c:if>>
> +                 restart</a>
>                 </c:when>
>                 <c:otherwise>
>                 <a href="<portlet:actionURL portletMode="view">
>
>
>