%--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/CommonMsg.tld" prefix="CommonMsg"%>
<%@ page import="java.util.List" %>
<%@ page import="org.apache.geronimo.monitoring.console.Constants" %>
<%@ page import="org.apache.geronimo.monitoring.console.MRCConnector" %>
<%@ page import="org.apache.geronimo.monitoring.console.data.Node" %>
<%
Node node = (Node) request.getAttribute("node");
String snapshot = (String) request.getAttribute("snapshot");
String retention = (String) request.getAttribute("retention");
if(snapshot == null) snapshot = "";
if(retention == null) retention = "";
if(node.getProtocol() == null || node.getProtocol().equals("JMX"))
{
node.setProtocol("JMX");
if(node.getPort() == 0) node.setPort(1099);
}
else
{
if(node.getPort() == 0) node.setPort(4201);
}
MRCConnector mrc = null;
boolean isOnline = true;
if (node != null) {
try {
if(retention.equals("") || snapshot.equals("")) {
mrc = new MRCConnector(node);
// get the snapshot on the first call or any subsequent valid connections
snapshot = snapshot == "" ? "" + mrc.getSnapshotDuration() / 1000 / 60 : snapshot;
// get the retention on the first call or any subsequent valid connection
retention = retention == "" ? "" + mrc.getSnapshotRetention() : retention;
}
} catch(Exception ee) {
// the password in the db does not work
isOnline = false;
} finally{
if(null != mrc)
mrc.dispose();
}
%>
: <%=node.getName()%> (<%=node.getHost()%>)
|
|
|
<%
if(node.isEnabled()) {
%>
- ">
<%
} else {
%>
- ">
<%
}
%>
- ">
- ">
|
|
<%
} else {
%>
<%
}
%>