org.objectweb.jonas.management.monitoring
Class ServerProxy

java.lang.Object
  extended by org.objectweb.jonas.management.monitoring.JMXProxy
      extended by org.objectweb.jonas.management.monitoring.ServerProxy
All Implemented Interfaces:
ServerProxyMBean

public class ServerProxy
extends JMXProxy
implements ServerProxyMBean

A ServerProxy proxy MBean represents a server in the domain on the master side. Implements state transition diagram.

Author:
Adriana Danes, S. Ali Tokmen

Field Summary
 
Fields inherited from class org.objectweb.jonas.management.monitoring.JMXProxy
connection, connector, env, FAILED, INITIAL, jmx, logger, name, objectName, RUNNING, serverOn, STARTING, state, STOPPED, STOPPING, UNKNOWN, UNREACHABLE
 
Constructor Summary
ServerProxy(DomainMonitor dm, java.lang.String serverName)
          Constructor used when a server is discovered
ServerProxy(DomainMonitor dm, java.lang.String serverName, java.util.Collection urls, ClusterDaemonProxy cdp)
          Constructor used for a new domain.xml entry or for a server added to the domain by a management application.
 
Method Summary
 void checkit(boolean readall)
          Check the MBean server connection and possibly change state in UNREACHABLE or FAILED.
 void deployModule(java.lang.String fileName)
          Deploy a filename on the represented (remote) server
 int getAllThreadsCount()
           
 long getBytesReceivedByConnectorTomcat()
           
 long getBytesSentByConnectorTomcat()
           
 java.lang.String getClusterDaemonName()
           
 int getConnectionFailuresJCAConnection()
           
 int getConnectionFailuresJDBCResource()
           
 int getConnectionLeaksJCAConnection()
           
 int getConnectionLeaksJDBCResource()
           
 int getCurrentBusyJCAConnection()
           
 int getCurrentBusyJDBCResource()
           
 int getCurrentNumberOfEJB()
           
 int getCurrentNumberOfEntityBean()
           
 int getCurrentNumberOfMDB()
           
 int getCurrentNumberOfSBF()
           
 int getCurrentNumberOfSBL()
           
 int getCurrentOpenedJCAConnection()
           
 int getCurrentOpenedJDBCResource()
           
 int getCurrentThreadBusyByConnectorTomcat()
           
 int getCurrentThreadCountByConnectorTomcat()
           
 java.lang.Long getCurrentTotalMemory()
           
 java.lang.Long getCurrentUsedMemory()
           
 int getCurrentWorkerPoolSize()
           
 int getErrorCountByConnectorTomcat()
           
 java.lang.String getHostName()
           
 java.lang.String getJ2eeObjectName()
           
 java.lang.String getJavaVendor()
           
 java.lang.String getJavaVersion()
           
 boolean getJcaConnection()
           
 boolean getJdbcDatasource()
           
 boolean getJmsJoram()
           
 int getJmsQueuesNbMsgsDeliverSinceCreation()
           
 int getJmsQueuesNbMsgsReceiveSinceCreation()
           
 int getJmsQueuesNbMsgsSendToDMQSinceCreation()
           
 int getJmsTopicsNbMsgsDeliverSinceCreation()
           
 int getJmsTopicsNbMsgsReceiveSinceCreation()
           
 int getJmsTopicsNbMsgsSendToDMQSinceCreation()
           
 java.lang.String getJOnASVersion()
           
 java.lang.String getLoadCPU()
           
 int getMaxcheck()
           
 int getMaxThreadsByConnectorTomcat()
           
 int getMaxWorkerPoolSize()
           
 javax.management.MBeanServer getMbeanServer()
           
 int getMinWorkerPoolSize()
           
 void getMonitoringInfo()
          Update non static information for this node.
 long getProcessingTimeByConnectorTomcat()
           
 java.lang.String getProtocols()
           
 int getRejectedOpenJCAConnection()
           
 int getRejectedOpenJDBCResource()
           
 int getRequestCountByConnectorTomcat()
           
 int getServedOpenJCAConnection()
           
 int getServedOpenJDBCResource()
           
 java.lang.String getServerName()
           
 boolean getTomcat()
           
 int getTotalBegunTransactions()
           
 int getTotalCommittedTransactions()
           
 int getTotalCurrentTransactions()
           
 int getTotalExpiredTransactions()
           
 int getTotalRolledbackTransactions()
           
 boolean getTransaction()
           
 int getWaiterCountJCAConnection()
           
 int getWaiterCountJDBCResource()
           
 long getWaitingTimeJCAConnection()
           
 long getWaitingTimeJDBCResource()
           
 boolean getWorkers()
           
 boolean isInfoSet()
           
 void notifyStarting(java.util.Collection urls)
          Notification from discovery: RUNNING
 void notifyStopping()
          Notification from discovery: STOPPING
 void setInfoSet(boolean infoSet)
          Set the indicator value to true after execting the getInfo() method, and to false when detecting that server become unreacheable or stopping.
 void setMaxcheck(int maxcheck)
           
 void startit()
          Start the Server discovery notification concerning the represented server
 void stopit()
          Stop the server via the ClusterDaemon
 void undeployModule(java.lang.String fileName)
          Undeploy a module on the remote server
 void uploadDeployModule(java.lang.String fileName, boolean replaceExisting)
          Upload a file on remote server and deploy it.
 void uploadFile(java.lang.String fileName, boolean replaceExisting)
          Upload a file on remote server for deployment
 
Methods inherited from class org.objectweb.jonas.management.monitoring.JMXProxy
checkConnection, connect, disconnect, getAttribute, getAttributes, getConnection, getConnectionUrl, getDomain, getName, getObjectName, getServerState, getState, getUrls, isRegistered, queryNames, setObjectName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jonas.management.monitoring.ServerProxyMBean
getConnectionUrl, getObjectName, getState
 

Constructor Detail

ServerProxy

public ServerProxy(DomainMonitor dm,
                   java.lang.String serverName)
Constructor used when a server is discovered

Parameters:
serverName - the name of the managed server
dm - the domain monitor which treated the discovery notification

ServerProxy

public ServerProxy(DomainMonitor dm,
                   java.lang.String serverName,
                   java.util.Collection urls,
                   ClusterDaemonProxy cdp)
Constructor used for a new domain.xml entry or for a server added to the domain by a management application. Also used when creating the ServerProxy for the local server.

Parameters:
dm - current domain monitor
serverName - the name of the managed server
urls - Collection of urls to connect to the server
cdp - possible clusterdaemon
Method Detail

notifyStarting

public void notifyStarting(java.util.Collection urls)
Notification from discovery: RUNNING

Parameters:
urls - for connection

notifyStopping

public void notifyStopping()
Notification from discovery: STOPPING


checkit

public void checkit(boolean readall)
Check the MBean server connection and possibly change state in UNREACHABLE or FAILED.

Parameters:
readall - read all monitoring info if server RUNNING

getJ2eeObjectName

public java.lang.String getJ2eeObjectName()
Returns:
The J2EEServer ObjectName corresponding to the represented server

getServerName

public java.lang.String getServerName()
Returns:
The name corresponding to the represented server

getClusterDaemonName

public java.lang.String getClusterDaemonName()
Specified by:
getClusterDaemonName in interface ServerProxyMBean
Returns:
The name of the associated cluster daemon, if any, null otherwise

startit

public void startit()
Start the Server discovery notification concerning the represented server

Specified by:
startit in interface ServerProxyMBean

stopit

public void stopit()
Stop the server via the ClusterDaemon

Specified by:
stopit in interface ServerProxyMBean

deployModule

public void deployModule(java.lang.String fileName)
Deploy a filename on the represented (remote) server

Specified by:
deployModule in interface ServerProxyMBean
Parameters:
fileName - the name of the file containig the module/application to deploy

undeployModule

public void undeployModule(java.lang.String fileName)
Undeploy a module on the remote server

Specified by:
undeployModule in interface ServerProxyMBean
Parameters:
fileName - Name of the file containing module (or app) to undeploy

uploadFile

public void uploadFile(java.lang.String fileName,
                       boolean replaceExisting)
Upload a file on remote server for deployment

Specified by:
uploadFile in interface ServerProxyMBean
Parameters:
fileName - file to upload. One among .war,.jar,.ear,.rar
replaceExisting - if true, replace the existing file if any
Throws:
java.io.IOException

uploadDeployModule

public void uploadDeployModule(java.lang.String fileName,
                               boolean replaceExisting)
Upload a file on remote server and deploy it.

Specified by:
uploadDeployModule in interface ServerProxyMBean
Parameters:
fileName - file to upload. One among .war,.jar,.ear,.rar
replaceExisting - if true, replace the existing file if any

getMaxcheck

public int getMaxcheck()
Specified by:
getMaxcheck in interface ServerProxyMBean
Returns:
maxcheck value

setMaxcheck

public void setMaxcheck(int maxcheck)
Specified by:
setMaxcheck in interface ServerProxyMBean
Parameters:
maxcheck - maxcheck value

isInfoSet

public boolean isInfoSet()
Returns:
true if the general info are set, false otherwise

setInfoSet

public void setInfoSet(boolean infoSet)
Set the indicator value to true after execting the getInfo() method, and to false when detecting that server become unreacheable or stopping.

Parameters:
infoSet - indicator value to set

getMonitoringInfo

public void getMonitoringInfo()
Update non static information for this node.


getAllThreadsCount

public int getAllThreadsCount()
Specified by:
getAllThreadsCount in interface ServerProxyMBean

getBytesReceivedByConnectorTomcat

public long getBytesReceivedByConnectorTomcat()
Specified by:
getBytesReceivedByConnectorTomcat in interface ServerProxyMBean

getBytesSentByConnectorTomcat

public long getBytesSentByConnectorTomcat()
Specified by:
getBytesSentByConnectorTomcat in interface ServerProxyMBean

getConnectionFailuresJCAConnection

public int getConnectionFailuresJCAConnection()
Specified by:
getConnectionFailuresJCAConnection in interface ServerProxyMBean

getConnectionLeaksJCAConnection

public int getConnectionLeaksJCAConnection()
Specified by:
getConnectionLeaksJCAConnection in interface ServerProxyMBean

getCurrentBusyJCAConnection

public int getCurrentBusyJCAConnection()
Specified by:
getCurrentBusyJCAConnection in interface ServerProxyMBean

getCurrentNumberOfEntityBean

public int getCurrentNumberOfEntityBean()
Specified by:
getCurrentNumberOfEntityBean in interface ServerProxyMBean

getCurrentNumberOfEJB

public int getCurrentNumberOfEJB()
Specified by:
getCurrentNumberOfEJB in interface ServerProxyMBean

getCurrentNumberOfMDB

public int getCurrentNumberOfMDB()
Specified by:
getCurrentNumberOfMDB in interface ServerProxyMBean

getCurrentNumberOfSBF

public int getCurrentNumberOfSBF()
Specified by:
getCurrentNumberOfSBF in interface ServerProxyMBean

getCurrentNumberOfSBL

public int getCurrentNumberOfSBL()
Specified by:
getCurrentNumberOfSBL in interface ServerProxyMBean

getCurrentOpenedJCAConnection

public int getCurrentOpenedJCAConnection()
Specified by:
getCurrentOpenedJCAConnection in interface ServerProxyMBean

getCurrentThreadBusyByConnectorTomcat

public int getCurrentThreadBusyByConnectorTomcat()
Specified by:
getCurrentThreadBusyByConnectorTomcat in interface ServerProxyMBean

getCurrentThreadCountByConnectorTomcat

public int getCurrentThreadCountByConnectorTomcat()
Specified by:
getCurrentThreadCountByConnectorTomcat in interface ServerProxyMBean

getCurrentTotalMemory

public java.lang.Long getCurrentTotalMemory()
Specified by:
getCurrentTotalMemory in interface ServerProxyMBean

getCurrentUsedMemory

public java.lang.Long getCurrentUsedMemory()
Specified by:
getCurrentUsedMemory in interface ServerProxyMBean

getCurrentWorkerPoolSize

public int getCurrentWorkerPoolSize()
Specified by:
getCurrentWorkerPoolSize in interface ServerProxyMBean

getErrorCountByConnectorTomcat

public int getErrorCountByConnectorTomcat()
Specified by:
getErrorCountByConnectorTomcat in interface ServerProxyMBean

getHostName

public java.lang.String getHostName()
Specified by:
getHostName in interface ServerProxyMBean

getJavaVendor

public java.lang.String getJavaVendor()
Specified by:
getJavaVendor in interface ServerProxyMBean

getJavaVersion

public java.lang.String getJavaVersion()
Specified by:
getJavaVersion in interface ServerProxyMBean

getJmsQueuesNbMsgsDeliverSinceCreation

public int getJmsQueuesNbMsgsDeliverSinceCreation()
Specified by:
getJmsQueuesNbMsgsDeliverSinceCreation in interface ServerProxyMBean

getJmsQueuesNbMsgsReceiveSinceCreation

public int getJmsQueuesNbMsgsReceiveSinceCreation()
Specified by:
getJmsQueuesNbMsgsReceiveSinceCreation in interface ServerProxyMBean

getJmsQueuesNbMsgsSendToDMQSinceCreation

public int getJmsQueuesNbMsgsSendToDMQSinceCreation()
Specified by:
getJmsQueuesNbMsgsSendToDMQSinceCreation in interface ServerProxyMBean

getJmsTopicsNbMsgsDeliverSinceCreation

public int getJmsTopicsNbMsgsDeliverSinceCreation()
Specified by:
getJmsTopicsNbMsgsDeliverSinceCreation in interface ServerProxyMBean

getJmsTopicsNbMsgsReceiveSinceCreation

public int getJmsTopicsNbMsgsReceiveSinceCreation()
Specified by:
getJmsTopicsNbMsgsReceiveSinceCreation in interface ServerProxyMBean

getJmsTopicsNbMsgsSendToDMQSinceCreation

public int getJmsTopicsNbMsgsSendToDMQSinceCreation()
Specified by:
getJmsTopicsNbMsgsSendToDMQSinceCreation in interface ServerProxyMBean

getJOnASVersion

public java.lang.String getJOnASVersion()
Specified by:
getJOnASVersion in interface ServerProxyMBean

getLoadCPU

public java.lang.String getLoadCPU()
Specified by:
getLoadCPU in interface ServerProxyMBean

getMaxThreadsByConnectorTomcat

public int getMaxThreadsByConnectorTomcat()
Specified by:
getMaxThreadsByConnectorTomcat in interface ServerProxyMBean

getMaxWorkerPoolSize

public int getMaxWorkerPoolSize()
Specified by:
getMaxWorkerPoolSize in interface ServerProxyMBean

getMbeanServer

public javax.management.MBeanServer getMbeanServer()
Specified by:
getMbeanServer in interface ServerProxyMBean

getMinWorkerPoolSize

public int getMinWorkerPoolSize()
Specified by:
getMinWorkerPoolSize in interface ServerProxyMBean

getProcessingTimeByConnectorTomcat

public long getProcessingTimeByConnectorTomcat()
Specified by:
getProcessingTimeByConnectorTomcat in interface ServerProxyMBean

getProtocols

public java.lang.String getProtocols()
Specified by:
getProtocols in interface ServerProxyMBean

getRequestCountByConnectorTomcat

public int getRequestCountByConnectorTomcat()
Specified by:
getRequestCountByConnectorTomcat in interface ServerProxyMBean

getTotalBegunTransactions

public int getTotalBegunTransactions()
Specified by:
getTotalBegunTransactions in interface ServerProxyMBean

getTotalCommittedTransactions

public int getTotalCommittedTransactions()
Specified by:
getTotalCommittedTransactions in interface ServerProxyMBean

getTotalCurrentTransactions

public int getTotalCurrentTransactions()
Specified by:
getTotalCurrentTransactions in interface ServerProxyMBean

getTotalExpiredTransactions

public int getTotalExpiredTransactions()
Specified by:
getTotalExpiredTransactions in interface ServerProxyMBean

getTotalRolledbackTransactions

public int getTotalRolledbackTransactions()
Specified by:
getTotalRolledbackTransactions in interface ServerProxyMBean

getWaiterCountJCAConnection

public int getWaiterCountJCAConnection()
Specified by:
getWaiterCountJCAConnection in interface ServerProxyMBean

getWaitingTimeJCAConnection

public long getWaitingTimeJCAConnection()
Specified by:
getWaitingTimeJCAConnection in interface ServerProxyMBean

getTomcat

public boolean getTomcat()
Specified by:
getTomcat in interface ServerProxyMBean

getTransaction

public boolean getTransaction()
Specified by:
getTransaction in interface ServerProxyMBean

getWorkers

public boolean getWorkers()
Specified by:
getWorkers in interface ServerProxyMBean

getConnectionFailuresJDBCResource

public int getConnectionFailuresJDBCResource()
Specified by:
getConnectionFailuresJDBCResource in interface ServerProxyMBean

getConnectionLeaksJDBCResource

public int getConnectionLeaksJDBCResource()
Specified by:
getConnectionLeaksJDBCResource in interface ServerProxyMBean

getCurrentBusyJDBCResource

public int getCurrentBusyJDBCResource()
Specified by:
getCurrentBusyJDBCResource in interface ServerProxyMBean

getCurrentOpenedJDBCResource

public int getCurrentOpenedJDBCResource()
Specified by:
getCurrentOpenedJDBCResource in interface ServerProxyMBean

getRejectedOpenJDBCResource

public int getRejectedOpenJDBCResource()
Specified by:
getRejectedOpenJDBCResource in interface ServerProxyMBean

getServedOpenJDBCResource

public int getServedOpenJDBCResource()
Specified by:
getServedOpenJDBCResource in interface ServerProxyMBean

getWaiterCountJDBCResource

public int getWaiterCountJDBCResource()
Specified by:
getWaiterCountJDBCResource in interface ServerProxyMBean

getWaitingTimeJDBCResource

public long getWaitingTimeJDBCResource()
Specified by:
getWaitingTimeJDBCResource in interface ServerProxyMBean

getServedOpenJCAConnection

public int getServedOpenJCAConnection()
Specified by:
getServedOpenJCAConnection in interface ServerProxyMBean

getRejectedOpenJCAConnection

public int getRejectedOpenJCAConnection()
Specified by:
getRejectedOpenJCAConnection in interface ServerProxyMBean

getJcaConnection

public boolean getJcaConnection()
Specified by:
getJcaConnection in interface ServerProxyMBean

getJdbcDatasource

public boolean getJdbcDatasource()
Specified by:
getJdbcDatasource in interface ServerProxyMBean

getJmsJoram

public boolean getJmsJoram()
Specified by:
getJmsJoram in interface ServerProxyMBean