Document Properties
Kbid
27Y733
Last Modified
08-Jun-2023
Added to KB
20-Jul-2016
Public Access
Everyone
Status
Online
Doc Type
Guidelines
Product
  • ICM 7.10
  • ICM 11
Guide - JMX and MBean Support

Introduction

The present guide outlines configuration and administration options with respect to the JMX and MBean support as implemented with Intershop Commerce Management. This document is addressed to system administrators or DevOps who configure, maintain and monitor Intershop Commerce Management instances.

Info

Prior to Intershop version 7.7 the information provided in this document were part of the Administration and Configuration Guide that can be found in the Knowledge Base.

JMX refers to the Java Management Extension, a framework for application and network management in the Java programming language. Using JMX technology, a given resource is instrumented by one or more Java objects known as Managed Beans, or MBeans. These MBeans are registered in an MBean server. Through the MBean server, resources exposed via MBeans can be accessed by management applications (JMX clients) in order to:

  • Read and change application parameters during runtime
  • Provide statistical data (performance, resource usage, logs, errors, etc.)
  • Receive notifications in case of errors
  • Monitor critical system components.

Intershop Commerce Management provides a set of pre-defined MBeans that make it possible to obtain and process system monitoring information from JMX clients such as the MX4j HTTP Adaptor for Tomcat application servers. In addition, Intershop Commerce Management includes a simple mechanism to register additional MBeans provided by custom cartridges.

The current release of Intershop Commerce Management provides support for standard MBeans, which define their management operations and attributes by a static Java interface. Other MBean types are not supported.

MBean Registration

A standard MBean consists of a Java interface (with the suffix MBean) and an implementation class. Each cartridge registers the MBeans which it provides. Registered MBeans are then loaded during application server startup and integrated with the MBean server of the underlying application server.

To register MBeans, you have to provide an mbeans.properties file within the classpath directory javasource/resources/<cartridge-name>/naming of your cartridge. The mbeans.properties file defines the respective "MBean-Classname" to "JMX-ObjectName" mappings. The general schema for MBean entries is

mbean_class_name=mbean_object_name

The MBean class name needs to be fully qualified. The JMX object name is used to register the MBean at the MBean server. It has to be compliant with the notation of a java.management.ObjectName (e.g. domain: key1 = value1 , key2 = value2). The sample below shows the respective configuration entry for the LoggerAdministrationMBean, provided by the core cartridge.

com.intershop.beehive.core.capi.mbean.LoggingAdmin=com.intershop.enfinity:
 name=com.intershop.beehive.core.capi.mbean.LoggerAdministrationMBean,
 type=AdministrationMBean

It is possible to replace MBeans of other cartridges by mapping their name to a different implementation class. The order in which the cartridges are loaded decides which MBean will be finally registered. The cartridge loaded last wins.

Java Visual VM and JConsole

The Java tools J Visual VM and JConsole are used primarily by Intershop Commerce Management administrators to monitor the system environment (resources consumption, processes, threads, etc.) for a running installation, as well as displaying attributes and operations related to Intershop Commerce Management MBeans. While both are included with Intershop Commerce Management JVisual VM is more powerful and does not tax your resources when run from within your installation.

To enable Java monitoring in an Intershop Commerce Management environment, you need to edit the tomcat.bat file. Open this file with an editor, scroll down and uncomment the JMX Support properties. Note the port number as you will need it when specifying the JMX connection for both JConsole and JVisual VM. This will enable JMX support for all Java applications located on a single Tomcat server within your Intershop Commerce Management installation.

JVisual VM

Open JVisual VM, select the Add JMX Connection button from the top, and enter the <hostname> and <port> of your Tomcat server. You can only view a single application server, however all VM's on the server are viewable and can be opened in separate tabs. Right-click the application to open the Overview.

Here you have the tabs Overview, Monitor, Threads, Sampler and MBeans. A description of each tab is listed below.

TabDescription
OverviewHere you can see the virtual machine where your application is running and the Java home folder where the application is located. Here you can also view system properties.
MonitorHere you can see memory and performance, CPU usage, classes loaded and threads.
ThreadsThis tab opens with a view of 'All Threads' on a timeline, and allows you to create a thread dump to save and analyze later. The drop-down menu allows you to see 'All', 'Live', 'Finished' and 'Selected' application threads.
SamplerSampler provides you with a profile of your application performance. You can generate graphs for specific threads, as well as see the objects that are consuming system resources.
MBeans

Note

Accessing MBeans in JVisual VM requires the VisualVM-MBeans plugin.

This tab allows you to view all MBeans registered with the platform MBean server. As Administrator, you will be primarily concerned with monitoring and performing operations for the following:

  • Under com.intershop.enfinity, you can view the attributes of and monitor application MBeans, view the attributes of cartridge MBeans and via ClearableCaches view and perform operations on the ORM, Object and PageCache MBeans.
  • Under oracle.ucp.admin and oracle.ucp.admin.UniversalConnectionPoolMBean you can view attributes and perform operations on the Intershop Commerce Management Oracle database pool connections.

When you select an MBean and view the attributes, where the value is bold, you can double-click the value and it is shown as a graph or chart. For example, some cache MBeans allow you to view the number of cache hits for a particular resource.

JConsole

JConsole automatically monitors the VM on the Tomcat server in which the application is opened. You can connect to a different host at any time by selecting Connection | New Connection and entering the necessary information. The table below lists the tabs and the monitoring options.

Tab

Monitoring Focus

Overview

Here you can see Heap Memory Usage, Threads, Classes loaded and CPU Usage graphs for the Tomcat server where your application is running. You can select a Time Range (12 hours, 1 day, 7 days, etc.) from the drop-down (or by right-clicking any of the objects) in the application window.

Memory

The memory tab allows you to see charts (change the displayed information in the drop-down at the top) displaying memory use versus time and specific memory pools. You can also view specifics in the 'Details' window.

Threads

Here you can see the current, highest number, live daemon threads as well as the total number of application threads. Select the thread you want to view from the 'Threads' window in the bottom-right of the application window. Garbage Collection is available in the upper right of the application window.

Garbage collection (GC) the process of releasing memory used by objects no longer being referenced and can have dramatic effects on performance. See the Oracle JConsole documentation for more details.

Classes

View the number of 'Loaded Classes' in chart form for the selected 'Time Range'.

VM Summary

This tab displays the Uptime (total amount of time since the JVM was started), process CPU (total amount of CPU time), and the time spent in JIT compilation.

MBeans

Shows all registered MBeans. When you select an MBean in the tree, its attributes, operations, notifications and other information is displayed on the right. Display a chart of an attribute's value versus time by double-clicking on the attribute value.

Intershop Commerce Management Sample MBeans

Intershop Commerce Management already exposes a variety of resources through a set of pre-defined MBeans, making it possible to monitor important parts the system using JMX management applications. With the current release, MBeans are included with the cartridges core and monitor. Mbeans provided by these cartridges are contained in the package com.intershop.beehive.<cartridge_name>.capi.mbean. A summary is provided in the following table.

Cartridge

MBean Interface

Description

bc_serviceJMXNotificationMBean

Fires registered JMX notifications, so that an external JConsole could subscribe to capture them.

core

DatabaseDriverInformation MBean

Drivers (oracle.jdbc.driver.OracleDriver, com.ibm.db2j.jdbc.EmbeddedDriver) Pool size, connection count

core

LoggingAdminMBean

Enabled log scopes. Operations to remove or add log scopes.

core

OracleDataSourceInformation MBean

General data source informationOracle connection cache information

core

ORMCacheInformationMBean

General information about the OR Mapping's persistent object cache

core

ORMCacheInformationObject MBean

Information on individual persistent objects (e.g., number of instances in cache, default reference type, etc.)

core

JobsMBean

Used to handle jobs.

core

PipelinesMBean

Used to reload pipelines via JMX.

coreStagingConnectionPool

Gives some information about the staging connection pool, which is used by the data replication framework.

monitor

ProcessInformationMBean

Process information (general process information, Web front service information, important environment variables), resource usage (CPU usage, total process size, in-memory size; used system threads) JVM resource usage (total heap size, used heap size), threads (thread group, name, thread name, priority, daemon, alive), system properties

monitor

SessionRequestInformation MBean

Session persistence enabled, number of active sessions, average number of sessions per day, total number of requests, etc.

For detailed information on the resources that are instrumented by the MBeans, you need to inspect the MBeans using a JMX management application such as MX4j HTTP Adaptor or MBeansInspector.

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.