Client references

A device repository client represents the device repository that is present in a running Java application. During the initialization process a client instance (e.g. an MCS instance) registers its own instance of a private JMX MBean in an MBean server. The drManager utility uses that MBean to remotely manage the client, i.e. a reference to a client is actually a reference to a private JMX MBean.

A device repository client represents the device repository that is present in a running Java application. During the initialization process a client instance (e.g. an MCS instance) registers its own instance of a private JMX MBean in an MBean server. The drManager utility uses that MBean to remotely manage the client, i.e. a reference to a client is actually a reference to a private JMX MBean.

An MBean within a single MBean server is referenced using a URL that consists of two parts: a standard JMX service URL followed by an optional fragment identifier. The JMX service URL references the MBean server and is dependent on the connector used but it will typically use the standard RMI connector. The optional fragment identifier specifies a set of ObjectName key properties that are used to select from all the update MBeans registered with the MBean server.

An MBean reference has the following syntax:

service:jmx:rmi:///jndi/rmi://<host>:<port>/jmxrmi

If the MBean server contains multiple MBeans, they can be referenced by using an ObjectName property pattern, i.e. one that contains a wildcard ('*') instead of a key-value pair. If a wildcard is not specified, then the ObjectName references a single MBean. If the fragment identifier is not specified, then it behaves as if it was '*', i.e. it selects all update MBeans.

The following table lists the supported key properties:

Key property Description
product The name of the product. 'mcs' for MCS.
role An optional property that can be used to differentiate between multiple instances of a product that are used for different roles within the same application.
service An optional property that identifies the service to which the MBean belongs. In terms of management a service is a runtime partitioning of an application that crosses design time considerations.
webapp An optional property that identifies the web application to which the MBean belongs. This may be required if a product is installed as multiple separate web applications within the same application server and they are all configured to use the same MBeanFactory.

It is a fatal error if:

Note:

MCS and an application server must be configured to enable remote management of the device repository clients by the drManager utility. Refer to the topic entitled Configuring MCS and an application server for the configuration instructions.

Cluster

Each node within a cluster can have a number of accessible MBean server instances, each of which could have MBeans registered from a number of device repository client instances. Those client instances could refer to the same device repository storage or to separate ones, and therefore within a single MBean server it may be necessary to reference one or more MBeans. It is the responsibility of the user of the drManager utility to make sure that the tool is provided with the references to all the affected clients within the cluster. Failure to do so cannot be detected by the tool and will result in inconsistencies across the cluster.

Note:

drManager has no mechanism for detecting when new nodes are added to a cluster and therefore if the device manager is being used on a live system for something else than importing a new device information, no new nodes must be started while the tool is running.

Example

Let's assume that there are two web applications running on the same server, each of which is an instance of MCS and whose context paths are /shop and /crm. In order to reference the update MBean(s) for the /crm web application, the client reference would look like the following:

service:jmx:rmi:///jndi/rmi://<host>:<port>/jmxrmi#webapp=crm,*

If there are multiple nodes each of which register an update MBean in its MBean Server, then the repository manager CLI needs to use multiple client references, for example:

drManager switch-version -d /devices/devicerepository
          "service:jmx:rmi:///jndi/rmi://10.20.30.40:9004/jmxrmi#webapp=mcs,*"
          "service:jmx:rmi:///jndi/rmi://10.20.30.41:9004/jmxrmi#webapp=mcs,*"
          "service:jmx:rmi:///jndi/rmi://10.20.30.42:9004/jmxrmi#webapp=mcs,*"

Related topics