I can see that some methods on the jconsole are disabled.
Given below is the screenshot for com.sun.management.ThreadMXBean
The javadocs for these MBean methods do not specify anything about the accessibility part.
I think it is a security feature, but I am not able to get a concrete answer for this.
The obvious second part to this question is how to create custom MBean implementations which can be selectively disabled on the jconsole.
Given below is the system config :
JConsole version "1.7.0-b147"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
EDIT :
The disabled methods are invokable from a stand alone process.
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName name = new ObjectName("java.lang", "type", "Threading");
String operationName = "getThreadAllocatedBytes";
//1 is main thread
Object[] params = {1};
String[] signature = new String[]{"long"};
Object result = server.invoke(name, operationName, params, signature);
//Result is 682760 on my machine
System.out.println(result);