jmx

Accessing built-in MBeans in Tomcat programmatically

给你一囗甜甜゛ 提交于 2019-12-23 20:30:19
问题 Basically I'm trying to modify the code from this tutorial here: http://docs.oracle.com/javase/tutorial/jmx/remote/custom.html so that I can access the MBeans from tomcat that are described here: http://wiki.apache.org/tomcat/FAQ/Monitoring there is no problem accessing the JMX Bean java.lang:type=Memory from code since it's interface is defined in java.lang. Here's the code example of that: ObjectName mbeanName = new ObjectName("java.lang:type=Memory"); MemoryMXBean mxbeanProxy2 = JMX

ActiveMQ: Get list of connections through JMX?

十年热恋 提交于 2019-12-23 18:43:11
问题 how do I get the list of the connections to the OpenWire connector of ActiveMQ? JConsole is able to list the connections, but I don't see which "view" I can use to get the list: Example ObjectName of a connection: org.apache.activemq:BrokerName=localhost,Type=Connection,ConnectorName=openwire,Connection=toto I tried "ConnectorViewMBean" but the operations on it don't allow me to list the connections: ObjectName name = new ObjectName("org.apache.activemq:BrokerName=localhost,Type=Connection

Stop MDB from receiving messages?

谁说我不能喝 提交于 2019-12-23 17:20:56
问题 I need to programmatically stop a Message-driven bean from receiving messages from a JMS queue. My environment is WebSphere Application Server v7. I think it could be done by some MBean operation on an Activation Specification MBean, but I can't locate the activationSpec using WebSphere's adminclient API. I've browsed the JMX tree using JConsole and also tried printing out every available MBean and searching for the name of the activationspec. It's nowhere to be found. Is this the right

JMX : rmiPort and registryPort the same?

我是研究僧i 提交于 2019-12-23 17:13:54
问题 I'm trying to learn JMX as deep as possible. I've read many blog posts about how to explicitly set the port numbers used by the JMX server. As you may be aware there are actually two ports required: One for the Registry and one for RMI protocol traffic. Recently I discovered this blog post which suggests that the two ports can be set to the same so that you only have to punch one hole in the firewall. I must admit I thought it would never work. I was certain that it would create a "socket

What does “Perform GC” button do in jconsole?

↘锁芯ラ 提交于 2019-12-23 12:42:22
问题 There is a button "Perform GC" in jconsole, anyone knows what exactly happens if I click that button, it's invoking System.gc() ? 回答1: You can find out by yourself. The code of JConsole is part of OpenJDK. You can also check it out on grepcode.com. The button calls a gc() method of an object implementing MemoryMXBean which is most probably implemented by com.sun.management.MemoryImpl class. This class contains an implementation of gc() method which looks like this: public void gc() { Runtime

Can Java's JConsole be used to automatically configure memory?

会有一股神秘感。 提交于 2019-12-23 08:47:52
问题 I am studying about Java JMX and JConsole. I am curious about the memory management abilities of JConsole. For example, there is a "Perform GC" button in the Memory tab : Suppose I have simple Java app that eats up memory, something like this : public class MemoryEater { public static void main(String[] args) { Vector v = new Vector(); while (true) { byte b[] = new byte[1048576]; v.add(b); Runtime rt = Runtime.getRuntime(); System.out.println( "free memory: " + rt.freeMemory() ); } } } Would

Cassandra “nodetool status” fails with “Credentials required” after enabling remote JMX

江枫思渺然 提交于 2019-12-23 08:37:28
问题 I followed these instructions "Enabling JMX authentication": http://docs.datastax.com/en/cassandra/2.2/cassandra/configuration/secureJmxAuthentication.html However I'm having this problem: nodetool status -u cassandra -pw cassandra error: Authentication failed! Credentials required -- StackTrace -- java.lang.SecurityException: Authentication failed! Credentials required at com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticationFailure(JMXPluggableAuthenticator.java:211) at com

Monitoring Java application with Python [closed]

最后都变了- 提交于 2019-12-23 08:37:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I'm a python programmer, and want to monitor a Java application , by communicating with JMX . I've been searching the web and I haven't found a proved solution. I've looked at jmx4python and JPype but I haven't maid up my mind about them. Py4J doesn't look useful. Does anyone have a suggestion of a Framework or

How to get details of MessageReceivers of JMS Queue(HornetQ deployed in JBoss AS6)?

為{幸葍}努か 提交于 2019-12-23 03:45:31
问题 I need to get details of Message Receivers which are connected to JMS Queue, I am using HornetQ which is deployed in JBoss AS6. Is there such operation/API already defined in JMX/JMS? Any other approach to get details of MessageReceivers? I need to know number of MessageReceivers & their IP Address. Any suggestion is appreciated. Thanks. 回答1: There are method on the management with hornetQ 2.2.2+. Things like connectionID are exposed as meta-datas. 来源: https://stackoverflow.com/questions

JMX Authentication - Role Based MBean Operations

扶醉桌前 提交于 2019-12-23 02:29:27
问题 I have implemented JMXAuthenticator for JMX authentication over RMI, however I am not sure how to create roles to allow for readonly/readwrite access levels. For example, in JMXAuthenticator.authenticate I have my custom authentication logic and want this to determine the access role. I have tried the following but it makes no difference when performing operations in JConsole: @Override public Subject authenticate(Object credentials) { Subject subject = new Subject(); JMXPrincipal p; //...my