Chapter 4. Management

Management of eXo Platform
JMX interface
REST interface
Management view
Kernel management view
Cache management view
Content management view
Portlet Container management view
Portal management view

Management of the eXo Platform resources is critical for production usage.

The eXo Platform product is exposed as a manageable set of resources that can be inspected at runtime to monitor and manage servers.

When it comes to Java, the Java Management Extension (also known as JMX) is the de-facto standard to expose managed resources externally.

This chapter explains the various resources provided by the eXo Platform server, and management actions which can be performed, and how to obtain relevant metrics.

Cache is essential for improving the performance of a server infrastructure.

Each cache is exposed and provides statistics and management operations. The JMX name of each cache MBean uses the template exo:service=cache,name=CacheName where CacheName is the name of the cache.

AttributeDescription
Capacity the maximum capacity of the cache
HitCount the number of times the cache was successfully queried
MissCount the number of times the cache was queried without success
Size gives the number of entries in the cache
TimeToLive attribute gives the maximum lifetime that an entry is considered valid. A value of {{-1 means that the entries will never become stale
OperationDescription
clearCache() evicts all the entries from the cache. It can be used to force a programmatic flush of the cache

The cache service manages the different caches. The JMX name is exo:service=cachemanager.

OperationDescription
clearCaches() force a programmatic flush of all the registered caches

Portlet containers provide a management view that mainly consists of statistic exposure. The JMX name of a portlet container follows this template: exo:application="Application",portlet="Portlet" where Application is the name of web application and Portlet is the portlet name in the web application.

Each portlet container has a corresponding managed resource that exposes statistics as attributes. The Portlet lifecycle has several phases (named action, event, render and resource). These are particular operations that a portlet can execute, and each is monitored.

AttributeDescription
ActionCount, EventCount, RenderCount and ResourceCount the number of executions of a particular portlet phase
MeanActionTime, MeanEventTime, MeanRenderCount and MeanResourceCount the average time spent during the execution of a particular portlet phase
MaxActionTime, MaxventTime, MaxRenderCount and MaxResourceCount the maximum time spent during the execution of a particular portlet phase
MinActionTime, MinEventTime, MinRenderCount and MinResourceCount the minimum time spent during the execution of a particular portlet phase

The portal management exposes the portal resources either for management or for obtaining statistics.

The template management exposes the various templates used by the portal and its components to render markup. Various statistics are available for individual templates, and aggregated statistics, such as the list of the slowest templates. Most of the management operations are performed on a single template; those operations take the template identifier as an argument. The JMX name of the template statistics MBean follows the template: exo:view=portal,service=statistic,type=template.

AttributeDescription
TemplateList the list of the templates loaded
SlowestTemplates the list of the 10 slowest templates
MostExecutedTemplates the list of the 10 most used templates
FastestTemplates list of the 10 fastest templates
OperationDescription
getAverageTime(templateId) returns the average time spent in the specified template
getExecutionCount(templateId) returns the number of times the specified template has been executed
getMinTime(templateId) returns the minimum time spent in the specified template
getMaxTime(templateId) returns the maximum time spent in the specified template
AttributeDescription
SkinList the list of the loaded skins by the skin service
OperationDescription
reloadAll(skinId) forces a reload of the specified skin and the operation reloadSkins() forces a reload of the loaded skins

All services extending AbstractTokenService can become TokenStore services if you define them as components. For example:

In which, the token service will initialize by retrieving init-params named as "service.configuration" and the validity property must include THREE values:

  • 1: Service name.

  • 2: Amount of time.

  • 3: Timing unit.

In the above code, the service name is "memory-token" and the token will be expired after ONE minute.

eXo Platform supports FOUR timing units, including SECOND, MINUTE, HOUR, DAY.

The AbstractTokenService has some methods, such as:

  • "getToken(K id) : T" returns the token with the token id.

  • "deleteToken(K id) : T" deletes the token with the id and returns the deleted token value.

  • "getAllTokens() : K[ ]" returns all tokens stored in data.

  • "createToken(Credentials credentials) : void" creates a token with the defined credential which is an immutable object containing username and password.

  • "validateToken(String tokenKey, boolean remove) : Credentials" validates a token. If the token is valid, it returns the attached credential.

The JMX name of the portal statistics MBean follows the template exo:view=portal,service=statistic,type=portal.

AttributeDescription
PortalList returns the list of the loaded portals
OperationDescription
getThroughput(portalId) returns the number of request per second for a specified portal
getAverageTime(portalId) returns the average time spent in a specified portal
getExecutionCount(portalId) returns the number of times a specified portal has been executed
getMinTime(portalId) returns the minimum time spent in the specified portal
getMaxTime(portalId) returns the maximum time spent in the specified portal

Various applications are exposed to provide relevant statistics. The JMX name of the application statistics MBean follows the template: exo:view=portal,service=statistics,type=application.

AttributeDescription
ApplicationList returns the list of the loaded applications
SlowestApplications returns the list of the 10 slowest applications
MostExecutedApplications returns the list of the 10 most executed applications
FastestApplications returns the list of the 10 fastest applications
OperationDescription
getAverageTime(applicationId) returns the average time spent in the specified application
getExecutionCount(applicationId) returns the number of times the specified application has been executed
getMinTime(applicationId) returns the minimum time spent in the specified application
getMaxTime(applicationId) returns the maximum time spent in the specified application