FITECH Laboratories spacer
graphic Company graphic Products graphic Support graphic Customers graphic Partners
The Power of Choice
spacer » Buy graphic » Try graphic » Map graphic » Contact graphic
spacer
spacer
xTier™
Overview
xTier Services
Business Case
Documentation
F.A.Q.
Buy xTier™
Try xTier™
Professional Services
graphic
spacer xTier
spacer
jmx
Product: xTier™/LWC 2.3
Whitepaper: n/a
spacer
 support@fitechlabs.com
 Download
 Buy
 Depends: log
 Related: n/a
xTier™ Navigator:
cache cluster config email i18n
ioc info jmx jndi security
log marshal objpool os fs
tx uidgen workflow jobs
db startup jms grid

Description
Java Management Extensions (JMX) technology provides the tools for building distributed, modular and dynamic system for managing and monitoring applications. By design, this standard is suitable for adapting legacy systems, implementing new management and monitoring solutions, and plugging into those of the future. See the JMX technology documentation for more details.

All services in xTier™ are automatically JMX-instrumented for the Java runtime. Each service exposes one or more MBeans. Each service has at least one MBean that has the same managed interface as the service interface itself. Every such MBean has a name with the xtier domain and two name-value pairs, for example: xtier:service=true,name=com.fitechlabs.xtier.services.jmx.JmxService. The parts of the MBean name that change from service to service are highlighted (jmx.JmxService). Note that if an MBean's managed interface is not identical to the service interface (i.e. it is a utility MBean provided additionally by the service) it will have service=false name-value pair in its name.

When xTier™ is started the user can use any JMX console to access the MBeans. If xTier™ was started with the default JMX server implementation (Sun's JDMK), the default HTML console can be accessed at http://localhost:8082/ or by running the xtier-open-jdmk.{sh|cmd} script in ${XTIER_ROOT}/bin folder.

The xTier™ 'jmx' service has very simply functionality by giving access to underlaying MBean server in a unified way regardless whether a native MBean server was provided by the micro kernel or the default MBean server was created. The 'jmx' service provides a simple accessor to the MBean server instance.

 Top

Configuration
The jmx service, unlike most of the xTier™ services, does not require configuration through XML and thus it does not have an associated XML configuration file.

 Top

Examples
The jmx service is simple to use and follows the standard way for accessing services in xTier™. The following code snippet illustrates the basic usage pattern for the 'jmx' service:

1// Get the instance of xTier kernel.
2XtierKernel xtier = XtierKernel.getInstance();
3 
4// Get the instance of 'jmx' service.
5JmxService jmx = xtier.jmx();
6 
7// Get the instance of javax.management.MBeanServer, 
8// created on startup. See JMX technology specification 
9// for more details about MBeanServer functionality.
10javax.management.MBeanServer server = jmx.getMBeanServer();
11 
12// Create ObjectName instance, that is used for 
13// identifying MBean.
14javax.management.ObjectName id = new javax.management.
15    ObjectName("examples:name=jmx-example");
16 
17// Register MBean. JmxExample class should be defined as 
18// MBean.
19server.registerMBean(new JmxExample(), id);
20 
21// Invokes method foo() for JmxExample instance. See 
22// JMX API for more info.
23server.invoke(id, "foo", null, null);
24 
25// Unregister MBean.
26server.unregisterMBean(id); 

 Download xTier™ for full examples and documentation.

 Top

spacer