Mantis - Resin
Viewing Issue Advanced Details
2354 minor always 01-22-08 08:31 02-13-08 10:11
ferg  
ferg  
normal  
closed 3.1.4  
fixed  
none    
none 3.1.5  
0002354: JMX: serverconnector not showing own server
We have 10 Resin servers (3.0.24) in the cluster, but when I try to list them using JMX I got only 9 of them listed.
It doesn't list the local server (the one from which the servlet is actually invoked).

Here is the code:

for (int i = 0; i < clusterList.length; i++) {
ClusterMXBean cluster = (ClusterMXBean) Jmx.findGlobal(clusterList[i].getObjectName());
ServerConnectorMXBean[] srunNames = cluster.getServers();
for (int j = 0; j < srunNames.length; j++) {
ServerConnectorMXBean server = (ServerConnectorMXBean) Jmx
.findGlobal(srunNames[j].getObjectName());
String host = server.getAddress();
int port = server.getPort();
String state = server.getState();
}
}

And here is the configuration when I list all resin MX objects:

resin:type=SessionManager,Host=default,WebApp=/
resin:type=ServerConnector,name=i
resin:type=ServerConnector,name=h
resin:type=ServerConnector,name=b
resin:type=Resin
resin:type=ServerConnector,name=j
resin:type=ProxyCache
resin:type=Host,name=default
resin:type=ServerConnector,name=c
resin:type=ServerConnector,name=e
resin:type=Port,name=192.68.1.50-6802
resin:type=ServerConnector,name=g
resin:type=ServerConnector,name=a
resin:type=ThreadPool
resin:type=WebApp,Host=default,name=/
resin:type=WebApp,Host=default,name=/mya
resin:type=ConnectionPool,Host=default,WebApp=/mya,name=jdbc/mya
resin:type=ServerConnector,name=f
resin:type=Cluster,name=cluster1
resin:type=ServerConnector,name=d
resin:type=SessionManager,Host=default,WebApp=/mya
resin:type=Server

Notes
(0002764)
ferg   
02-13-08 10:11   
server/2777