0
我正在使用Jboss EAP 6.3,并且希望mornitor服务器健康,现在遇到了一个问题:我创建了两个数据源(“ExampleDS”和“ExampleDS2”) 。是否有人知道如何通过使用jmx Mbean获取带有列表的jdbc数据源名称以及jms名称?如何获取Jboss jdbc数据源节点名称和jms节点名称
现在我可以通过remoteJmx获取serverName和serverState。
def getServerState():
serviceURL = javax.management.remote.JMXServiceURL("service:jmx:remoting-jmx://localhost:9999"))
connector = javax.management.remote.JMXConnectorFactory.connect(serviceURL, None)
connection = connector.getMBeanServerConnection()
service = javax.management.ObjectName("jboss.as:management-root=server")
serverName = connection.getAttribute(service,"name")
serverState = connection.getAttribute(service,"serverState")