Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why
The Proposals Wiki has been deprecated in favor of creating Feature Requests in JIRA. If you wish to propose a new idea for a feature, visit the Community Ideas Dashboard and read the Feature Requests Wiki page for more information about submitting your proposal.
« Back to Monitoring

MBeans Object Names Proposal

Typically an ObjectName of any MBean has 2 parts,

  1. domain name and
  2. keyvalue pairs

Domain Name : The domain is used as a namespace to distinguish/group objects that are registered to MBean Server. To avoid collisions between MBeans supplied by different vendors, a useful convention is to begin the domain name with the reverse DNS name of the organization that specifies the MBeans, followed by a period and a string whose interpretation is determined by that organization. For example, MBeans specified by Sun Microsystems Inc., DNS name sun.com, would have domains such as com.sun.MyDomain. This is essentially the same convention as for Java-language package names.

Key value pairs : Are attributes that are used to classify and query MBeans based on Object names.

S/No Attribute Name Required Recommended values Comments
1. DomainName Required com.liferay.portal All MBean registered by the liferay portal both external and internal should be registered under this domain, A domain helps identify a JMX client that this is a Liferay Portal MBean.
Attributes
1. companyId Optional companyId=${value) Helps JMX clients to query all MBeans for a given companyId
2. instanceName Required instanceId=${value} Identifies a unique web container instance on to which this MBean is running, Helps JMX clients to query all MBeans from a particular web container instance.
1. Recommended value for instanceId is instanceName=${hostname}_${port} -- For eg : instanceId=host.india.sun.com_8080
2. InstanceId should be configurable in the portal-ext.properties
3. Default value if not configured is just ${hostname}

Note : There is no option to figure out the port on which liferay is running before the first request arrives -- Port is got from the first request and stored by PortalUtil.java -- However monitoring system initalizes itself upon server startup.
3. classification Required classification=${value} Currently there are 3 classification defined, All MBean registered by the portal should fall under one of these classification
1. classification=portal -- Specifies that this MBean is a Portal MBean that monitors a portal resource
2. classification=external -- Specifies that this MBean is a MBean from a 3rd party component that is used by portal, Eg : Java MBeans -- Inc case we decide to register Java MBean.
3. classification=plugin -- Specifies that this MBean monitors a plugin that is deployed on to the portal Eg : portlet
4. type Required type=${classname} A unique name that identifies a MBean, This helps JMX client to query for a particular type of MBean . For eg : If there is a loadbalanced instance of portal, This helps JMX client to query some thing like -- Show me the all the PortalCommunityMBeans.
5 Other Optional ${name}=${value} A MBean is free to add any other additional name value pairs.

Sample ObjectNames based on the above proposal

  1. PortalInstanceMBean:
    1. com.liferay.portal : companyId=10112, instanceName=host.india.sun.com_8080, classification=portal, type=com.liferay.monitoring.mbeans.PortalInstance
  2. External MBean :A Java MemoryManagerMXBean:
    1. com.liferay.portal : instanceName=host.india.sun.com_8080, classfication=external, name=CodeCacheManager, type=MemoryManagerMXBean
0 Attachments
12733 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments
Threaded Replies Author Date
¿Anything new in the Liferay Portal new version... Alba García January 11, 2012 10:51 AM

¿Anything new in the Liferay Portal new version 6.1?
Posted on 1/11/12 10:51 AM.