<%@ page language="java" contentType="text/html;charset=utf-8" %>
<%@ page import="org.apache.struts.Globals"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %>

<html:html locale="true">
<%@ include file="../common/begin.jsp" %>

<body class="content">
<sj:titleContent usingWhere="true" tomThumb="true"/>
<sj:tabs usingWhere="true" heightTab="20">
  <sj:tab forward="ActionDisplayNodeInfo" selected="true"><bean:write name="nodeInfoForm" property="serverName"/></sj:tab>
  <sj:panel>
    <bean:define id ="state" name="nodeInfoForm" property="state"/>
    <logic:equal name="state" value="RUNNING">
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>Global</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          State
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="state"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Threads Count
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="allThreadsCount"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Memory Load
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentUsedMemory"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Memory
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentTotalMemory"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          JOnAS Version
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="JOnASVersion"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          JVM Version
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="javaVersion"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          JVM Vendor
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="javaVendor"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Protocols
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="protocols"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Jmx Connection URL
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="connectionUrl"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>
<!--
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>Infos JDK5</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
-->

    <logic:equal name="nodeInfoForm" property="transaction" value="true">
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>Transactions</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          Begun Transactions
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="totalBegunTransactions"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Committed Transactions
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="totalCommittedTransactions"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Current Transactions
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="totalCurrentTransactions"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Expired Transactions
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="totalExpiredTransactions"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Rolled Back Transactions
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="totalRolledbackTransactions"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>
    </logic:equal>

    <logic:equal name="nodeInfoForm" property="workers" value="true">
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>JOnAS Worker Pool</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          Current Pool Size
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentWorkerPoolSize"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Max Pool Size
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="maxWorkerPoolSize"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Min Pool Size
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="minWorkerPoolSize"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>
    </logic:equal>

    <logic:equal name="nodeInfoForm" property="tomcat" value="true">
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>Tomcat</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          Total Max Threads
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="maxThreadsByConnectorTomcat"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Threads Number
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentThreadCountByConnectorTomcat"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Threads Busy
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentThreadBusyByConnectorTomcat"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Bytes Received
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="bytesReceivedByConnectorTomcat"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Bytes Sent
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="bytesSentByConnectorTomcat"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Error Count
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="errorCountByConnectorTomcat"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Processing Time
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="processingTimeByConnectorTomcat"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Request Count
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="requestCountByConnectorTomcat"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>
    </logic:equal>

    <logic:equal name="nodeInfoForm" property="jcaConnection" value="true">
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>JCA</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          Total Opened Connections
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentOpenedJCAConnection"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Busy Connections
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentBusyJCAConnection"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Connection Failures
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="connectionFailuresJCAConnection"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Connection Leaks
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="connectionLeaksJCAConnection"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Rejected 'open' calls
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="rejectedOpenJCAConnection"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total served XA connections
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="servedOpenJCAConnection"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Waiters
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="waiterCountJCAConnection"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Waiting Time
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="waitingTimeJCAConnection"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>
    </logic:equal>


    <logic:equal name="nodeInfoForm" property="jdbcDatasource" value="true">
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>JDBC</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          Total Opened Connections
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentOpenedJDBCDatasource"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Busy Connections
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentBusyJDBCDatasource"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Connection Failures
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="connectionFailuresJDBCDatasource"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Connection Leaks
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="connectionLeaksJDBCDatasource"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Rejected 'open' calls
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="rejectedOpenJDBCDatasource"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total served XA connections
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="servedOpenJDBCDatasource"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Waiters
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="waiterCountJDBCDatasource"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Waiting Time
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="waitingTimeJDBCDatasource"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>

    </logic:equal>
    <logic:equal name="nodeInfoForm" property="jcaConnection" value="true">
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>JMS</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          Total Messages Received in Queues
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="jmsQueuesNbMsgsReceiveSinceCreation"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Messages Delivered from Queues
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="jmsQueuesNbMsgsDeliverSinceCreation"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Messages Received in Topics
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="jmsTopicsNbMsgsReceiveSinceCreation"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Messages Delivered from Topics
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="jmsTopicsNbMsgsDeliverSinceCreation"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Total Messages Sent to DMQ
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="jmsNbMsgsSendToDMQSinceCreation"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>
    </logic:equal>

    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>EJBs</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          Number Of EJB
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentNumberOfEJB"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Number Of EntityBean
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentNumberOfEntity"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Number Of Stateful SessionBean
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentNumberOfSBF"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Number Of Stateless SessionBean
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentNumberOfSBL"/>
        </sj:jgValue>
      </sj:gridrow>
      <sj:gridrow>
        <sj:jgName>
          Number Of MessageDrivenBean
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="currentNumberOfMDB"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>
    </logic:equal>


    <logic:notEqual name="state" value="RUNNING">
    <sj:jonasgrid>
      <sj:jgRowTitle>
        <sj:jgColTitle>Global</sj:jgColTitle>
      </sj:jgRowTitle>
    </sj:jonasgrid>
    <sj:jonasgrid>
      <sj:gridrow>
        <sj:jgName>
          State
        </sj:jgName>
        <sj:jgValue>
          <bean:write name="nodeInfoForm" property="state"/>
        </sj:jgValue>
      </sj:gridrow>
    </sj:jonasgrid>
    </logic:notEqual>
  </sj:panel>
</sj:tabs>


<%@ include file="../common/end.jsp" %>
</body>
</html:html>