Summary: Controlling space attributes and operations using the JMX console.
OverviewThe Java Management Extensions (JMX specification) describe an architecture, design patterns, API's, and services for application and network management in the Java programming language. JMX functions beyond a simple API since it can specify the architecture as to how that API is used. It provides the means to construct Java code, create smart Java agents, implement distributed management middleware and managers, and integrate these solutions smoothly into existing management systems. You can integrate such solutions with either HTML or industry standards such as SNMP and WBEM. JMX is dynamic, allowing the monitoring and management of resources in real time while they are created, installed, and implemented. The JMX also works along with JVM, the Java Virtual Machine.
Manageable ResourceA JMX manageable resource can be an application, an implementation of a service, a device, a user, etc. It is developed in Java, or at least offers a Java wrapper, and must also be implemented by a Java object called a managed bean (MBeans), according to JMX specifications. Opening JMX
Remote JConsole connectionIn order to enable monitoring and management from remote systems using JMX jconsole set the following system properties or use the setenv shell variable REMOTE_JMX REMOTE_JMX=-Dcom.sun.management.jmxremote.port=5001 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Viewing Thread CPU Usage with JDK 1.6
JConsole includes a new tab that displays CPU usage for each JVM thread. This tab is displayed using the -pluginpath JConsole parameter (already implemented in GigaSpaces). To view this tab in your JConsole:
Below are some example screenshots: topthread.jarJTop.jarMBeans ViewThe jconsole utility (part of Sun J2SE 5.0 JDK and above) includes a MBeans view, which allows you to perform space administration operations, and to view and control space attributes. These operations are defined in the JavaSpaceMBeanDescriptors.xml file, which exists in the JSpaces.jar file. If you do not want a certain operation or attribute to be exposed in the JMX MBeans tab, simply comment or remove the operation from the XML file. Space Container MBeanThe container MBean exposes the space container's attributes and operations. The space container manages the space life cycle. Attributes TabThe container Attributes tab displays a list of container attributes. Attribute values appearing in blue can be controlled, while values in black can not be changed. Red values are unavailable. Operations TabThe container Operations tab allows you to perform different space container operations:
Info TabThe container Info tab displays the MBean name and its Java class. Space MBeanThe Space MBean exposes space attributes and operations. You can get the basic space operational settings using this MBean. Attributes TabThe space Attributes tab displays a list of space attributes/elements by XPath, in the selected space. Attribute values appearing in blue can be controlled, while values in black can not be changed. Red values are unavailable.
Operations TabThe space Operations tab allows you to perform different space operations:
Info TabThe space Info tab displays the MBean name and its Java class. Space MBean ExtensionThe Space MBean Extension exposes advanced space attributes – this includes memory management, persistency and communication settings. Attributes TabThe space extensions Attributes tab displays a list of advanced space attributes/elements by XPath, in the selected space. Attribute values appearing in blue can be controlled, while values in black can not be changed. Red values are unavailable.
Info TabThe space extensions Info tab displays the MBean name and its Java class. Restricting and Modifying MBeansThere is an option to restrict the access to space and space container operations or attributes; for example, you can decide to hide some of the attributes and configuration, and disable execution of operations.
To do this, modify the following space and space container MBean Descriptors, which are located inside the <GigaSpaces Root>\lib\JSpaces.jar file:
Settings to ModifyFollowing are some space/space container MBeans Attributes settings you can modify:
Following are some space/space container MBeans Operations settings you can modify:
Getting Space Statistics using the JMX API***Link required |
![]() |
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence |