jmx

Enable/disable debugger support for the currently running JVM from Java code

Is there an interface (maybe part of JMX) that I can use to dynamically enable or disable the JVM debugger support from Java code inside that JVM? (See also http://stackoverflow.com/questions/376201/debug-a-java-application-without-starting-the-jvm-with-debug-arguments —CRM) ...

JMX and Tomcat: create and use MBeans in a servlet

Hi all, does anybody have some ideas on how to achieve that? Or even a good documentation on how to do that? Basicly everything is done in a test standalone version (by a java client or jconsole I am able to call mbeans methods and everything works fine), but I need to put it in my Tomcat servlet.... Thanks for every suggestions! Ro...

How to query in JMX the J2EEServer MBean ?

How can I get the J2EEServer MBean using JMX query ? I've tried something like : mbsc.queryMBeans(new ObjectName("*:j2eeType=J2EEServer"), null) but no success ? Have i done something wrong? Thank you! ...

How to change MBeanAttributeInfo description field in Java 6?

In my Standard MBean, I'd like to set the Description field that shows up in JConsole under the MBeanAttributeInfo heading. Right now it has a default value of "Attribute exposed for management". I can't seem to figure out how I set that when I define the attribute method in the MBean. I'm using a Java 6 JVM. Thanks. ...

Accessing a remote GarbageCollectorMXBean

I can access other MXBean types, such as the RuntimeMXBean, but not the GarabageCollectorMXBean: JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:rmi:///jndi/rmi://coretest:1542/jmxrmi")); MBeanServerConnection mbs = connector.getMBeanServerConnection(); GarbageCollectorMXBean gc = ManagementFactory.ne...

Efficient way of getting thread CPU time using JMX

I'm currently getting the total thread CPU time using JMX in the following manner: private long calculateTotalThreadCpuTime(ThreadMXBean thread) { long totalTime = 0l; for (ThreadInfo threadInfo : thread.dumpAllThreads(false, false)) totalTime += thread.getThreadCpuTime(threadInfo.getThreadId()); return totalTime;...

JDMK HtmlAdaptorServer not escaping values in output HTML

I'm using the Java JDMK HtmlAdaptorServer to provide a debugging interface to some MBeans. However, any bean methods that return data that includes characters that need to be escaped do not display correctly since the HtmlAdaptorServer is apparently not performing any escaping. I took a look the source via the OpenDMK, and it would app...

Difference between thread user time and thread cpu time in Java

The ThreadMXBean has two methods for retrieving thread time usage: getThreadUserTime getThreadCpuTime What is the difference between the two? Update 2: If I'm able to link to the javadocs, please don't quote them - I've read them already. Update: here's some code which I tried to use to learn what these times mean, with little su...

How to enable JMX on Weblogic 10.x

I have an application that is JMX enabled. It has its own JMX Agent and some MBeans. When i launch the application in WebLogic, i am able to connect to the JMX agent via the RMI url and perform the operations on MBeans via "JConsole". But when i get into the Weblogic console, i can not see any JMX consoles! How can i enable the JMX con...

Unable to Connect to Tomcat Using VisualVM

I am having problems monitoring a remote Tomcat process. I'm trying to use the Java 6 versions of JConsole/JVisualVM. I have jstatd running on the remote server with the appropriate security policy. The process is started and the TCP connections are available. When I try to connect through JConsole, I get 'Connection Failed:jmxrmi'...

Are there (experimental) JSR-262 JMX-WS enabled Java tools or applications?

I am very interested in the Web Services Connector for Java Management Extensions (JMX) Agents and the reference implementation ws-jmx-connector. JSR 262 will provide a new opportunity for cross-platform/cross-language enterprise integration projects, given the option to communicate with JMX Agents using non-Java clients. (I have been ab...

Restarting Log4J logging via JMX

It seems a Log4j rolling appender stopped logging because it hit the MaxBackupIndex limit. I've moved the old log files out of the way but Log4j doesn't seem to start logging again. Is there a way to restart Log4J logging via JMX? I'd like to leverage this insteaed of restarting a Tomcat instance. Thanks. ...

Problem with JMX query of Coherence node MBeans visible in JConsole

I'm using JMX to build a custom tool for monitoring remote Coherence clusters at work. I'm able to connect just fine and query MBeans directly, and I've acquired nearly all the information I need. However, I've run into a snag when trying to query MBeans for specific caches within a cluster, which is where I can find stats about total nu...

Getting Active Session counts with JMX (Java Management Extensions) API

I'm trying to use JMX API to get active session counts for a web application. Is it possible to use JMX API to get this kind of information? If yes, how reliable would it be? Any example code on how to get this done? I've been reading JMX tutorial and documentation, but they are giving me the overview of what the technology is. I j...

missing something obvious in JMX console insertion

I'm following the directions for launching my hello world JMX bean and jboss complains with the following: nested throwable: (java.lang.NoSuchMethodException: com.testPackage.jmx.TestJmxMBean.<init>()) I know I'm missing something REALLY obvious, but can't spot what it is. Why would it be looking for an init method? the class extends...

Can not access the Instance Data of a Singleton class from MBean

I am working against the deadline and i am sweating now. From past few days i have been working on a problem and now its the time to shout out. I have an application (let's call it "APP") and i have a "PerformanceStatistics" MBean written for APP. I also have a Singleton Data class (let's call it "SDATA") which provides some data for th...

Remote JMX invocation failed with ClassNotFoundException: ... (no security manager: RMI class loader disabled

I try to invoke the method of MBean from web application from Tomcat. Target MBean is running under JBoss 4.2.3. Both Tomcat and JBoss applications use the same version of jar with the same class, but on invoking I see the following exception: Caused by: java.lang.ClassNotFoundException: ...thisClass... (no security manager: RMI class l...

How to activate JMX on remote Glassfish server for access with jconsole?

I would like to monitor remote glassfish server. I have enabled JMX Connection in domain.xml: <jmx-connector accept-all="true" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="false"> But this didn't help. I still can't connect to server with JConsole. Then ...

JMX console and Quartz... doozy

I'm in a bit of a pickle. I have Quartz starting multiple simultaneous threads of a class and I really need to inspect the class through the JMX console. The trouble is that since Quartz calls the new Foo(), when I expose Foo as a bean, it presents itself as an uninitiated class (allowing me to call init, myself, through the console) bu...

Has anyone succeded in writing a JMX wrapper around Open Symphony's Quartz?

I'm trying to expose Quartz (that I'm running in Jboss) to the jboss JMX console. I'm not having any luck with said process and am wondering why it's so hard to find any reference materials on doing this. Seems like a pretty useful thing. I'd love some tips on how to get it set up, if anyone has done it. ...