Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7524071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:59:05+00:00 2026-05-30T02:59:05+00:00

I have the following code that just lists all MBean names found in platform

  • 0

I have the following code that just lists all MBean names found in platform MBean server:

  public static void main(final String[] args) throws Exception {

    initJMX();

  }

  @SuppressWarnings("unchecked")
  private static void initJMX() throws IOException, MalformedURLException, AttributeNotFoundException,
      InstanceNotFoundException, MalformedObjectNameException, MBeanException, ReflectionException,
      NullPointerException {
    JMXConnector jmxc = null;
    final Map<String, String> map = new HashMap<String, String>();
    jmxc = JMXConnectorFactory.newJMXConnector(createConnectionURL("localhost", 7788), map);
    jmxc.connect();
    final MBeanServerConnection connection = jmxc.getMBeanServerConnection();
    final String[] domains = connection.getDomains();
    for (final String domain : domains) {
      final Set<ObjectName> mBeans = connection.queryNames(new ObjectName(domain + ":*"), null);
      for (final ObjectName name : mBeans) {
        System.out.println(name);
      }
    }
    jmxc.close();
  }

When I try to run this code with JRockit 1.5.0_4.0.1 with the following parameters:

-Xmanagement:ssl=false,authenticate=false,autodiscovery=false,port=7788

And it prints the following list:

[INFO ][mgmnt  ] Remote JMX connector started at address localhost:7788 
[INFO ][mgmnt  ] Local JMX connector started
com.oracle.jrockit:type=FlightRecorder
java.util.logging:type=Logging
JMImplementation:type=MBeanServerDelegate
java.lang:type=Compilation
java.lang:type=GarbageCollector,name=Garbage collection optimized for throughput Young Collector
java.lang:type=MemoryManager,name=Class Manager
java.lang:type=MemoryPool,name=ClassBlock Memory
java.lang:type=GarbageCollector,name=Garbage collection optimized for throughput Old Collector
java.lang:type=Runtime
java.lang:type=MemoryPool,name=Nursery
java.lang:type=ClassLoading
java.lang:type=Threading
java.lang:type=MemoryPool,name=Class Memory
java.lang:type=OperatingSystem
java.lang:type=Memory
java.lang:type=MemoryPool,name=Old Space

But if I put a breakpoint before a call to initJMX method and at that point connect to that JVM with JRMC, then JRMC displays much more MBeans and also after I continue program execution it also prints a different list which contains more JRockit related MBeans:

[INFO ][mgmnt  ] Remote JMX connector started at address T500W7AAD:7788 
[INFO ][mgmnt  ] Local JMX connector started
com.oracle.jrockit:type=FlightRecorder
oracle.jrockit.management:type=PerfCounters
oracle.jrockit.management:type=Compilation
oracle.jrockit.management:type=Log
oracle.jrockit.management:type=Profiler
oracle.jrockit.management:type=MemLeak
oracle.jrockit.management:type=JRockitConsole
oracle.jrockit.management:type=GarbageCollector
oracle.jrockit.management:type=Runtime
oracle.jrockit.management:type=Threading
oracle.jrockit.management:type=DiagnosticCommand
oracle.jrockit.management:type=Memory
java.util.logging:type=Logging
JMImplementation:type=MBeanServerDelegate
java.lang:type=Compilation
java.lang:type=GarbageCollector,name=Garbage collection optimized for throughput Young Collector
java.lang:type=MemoryManager,name=Class Manager
java.lang:type=MemoryPool,name=ClassBlock Memory
java.lang:type=GarbageCollector,name=Garbage collection optimized for throughput Old Collector
java.lang:type=Runtime
java.lang:type=MemoryPool,name=Nursery
java.lang:type=ClassLoading
java.lang:type=Threading
java.lang:type=MemoryPool,name=Class Memory
java.lang:type=OperatingSystem
java.lang:type=Memory
java.lang:type=MemoryPool,name=Old Space

Is there a way to say JRockit to initialize those beans automatically on JVM startup without a need of explicit JRMC connection? The problem is that I’m trying to write some code that reuses some of those MBeans, but they are not available until I connect with JRMC.

UPDATE: This seems to be JRockit jdk1.5.0_4.0.1 problem. As same code works as expected on JRockit jdk6.0_4.1.0.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:59:06+00:00Added an answer on May 30, 2026 at 2:59 am

    This appears to be a problem with the Windows version of JRockit that I use:

    java version "1.5.0_24"
    Java(TM) Platform, Standard Edition for Business (build 1.5.0_24-b02)
    Oracle JRockit(R) (build R28.0.1-21-133393-1.5.0_24-20100512-2131-windows-x86_64, compiled mode)
    

    Same code works as expected on latest JRockit for JDK 1.6.0 on Windows:

    java version "1.6.0_29"
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
    Oracle JRockit(R) (build R28.2.2-7-148152-1.6.0_29-20111221-2104-windows-x86_64, compiled mode)
    

    and on the same JRockit version, but for Linux:

    java version "1.5.0_24"
    Java(TM) Platform, Standard Edition for Business (build 1.5.0_24-b02)
    Oracle JRockit(R) (build R28.1.0-123-138454-1.5.0_24-20101014-1350-linux-x86_64, compiled mode)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code that does not work due to a being a value
I have following code snippet that i use to compile class at the run
I have the following code that shows either a bug or a misunderstanding on
I have the following code that won't compile and although there is a way
I have the following code that sets a cookie: string locale = ((DropDownList)this.LoginUser.FindControl(locale)).SelectedValue; HttpCookie
I have the following code that creates two objects (ProfileManager and EmployerManager) where the
I have the following code that I need to add an additonal object to
I have the following code that creates a serverside object of the xmlhttp class.
I have the following code that loads a user's Active Directory DirectoryEntry object from
I have the following code that controls the presentation of an interdependent group. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.