Oracle® Retail Integration Bus Operations Guide
Release 13.0
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

4 RIB and JMX

Overview

This section describes the RIB JMX infrastructure. JMX is a specification that provides capability for runtime management of java components. Each of the RIB's software components (PublisherEjb, SubscriberEjb, TafrEjb, HospitalRetryEjb, and so on) provides its own management facility by implementing management beans.

The RIB's MBean components use uniform registration, deployment, and communication mechanisms provided by the RIB JMX infrastructure.

RIB uses log4j to log business and system events in the RIB runtime system. The definitions of the loggers are statically defined and come from a configuration file (log4j.xml). As logging is an expensive process we need to provide capability to manage log levels dynamically. The RIB Administration UI Log Manager MBean registers itself through the standard RIB JMX registration process at application startup. It provides an API to access current RIB loggers and change the log levels.

The AlertPublisherFactory is a factory that allows the user to select what alerting mechanism they want. A new JMX alertsing mechanism will be added to the system. The JmxAlertPublisher class extends NotificationBroadcasterSupport and provides JMX notification capability. The Jmx alerting capability is only available when running inside a container. A message type attribute will be added to the Alert class to provide the message filtering capability.

Any third party JMX console compatible with the Java EE container can be used to manage RIB components. RDMT uses the JMX command line interface provided by this design.

RIB JMX Client

The RIB provides a command line interface to the RIB JMX system. The client is shipped as java classes in the jmx-cmd-line-ui.jar. The entry point is JmxClientMain and allows the user to either execute a single JMX command or run JMX commands in an interactive shell. There is a menu selection that invokes the interactive shell feature. See Chapter 8, "Diagnostic and Monitoring Tools" for examples of how to interface to this utility.

User Interface

JMXClient> help
Executing command : JmxCommand(help).
exit
Example: exit

info objectName
Example: info oc4j:j2eeType=JVM,name=single,J2EEServer=standalone
setattribs ObjectName attributeName1 attributeValue1 [attributeName2 attributeValue2]...
setattribs will only work with attribute types that have
a constructor with java.lang.String argument.
Example: setattribs oc4j:j2eeType=JTAResource,name="oc4j-tm",J2EEServer=standalone 
transactionTimeout 31

getattribs ObjectName [attribute1] [attribute2]..
Example: getattribs oc4j:j2eeType=JVM,name=single,J2EEServer=standalone
javaVersion freeMemory

help [command]

invoke ObjectName methodName pramType1 paramValue1 [pramType2 paramValue2]...

Example: invoke oc4j:j2eeType=JNDINamespace,name=JNDINamespace,J2EEServer=standalone
getAllBindingsAsXMLString
Example: invoke oc4j:j2eeType=JVM,name=single,J2EEServer=standalone getproperty
java.lang.String java.library.path
list objectName
Example: list *:*

close
Example: close

connect jmxServiceUrl jmxUser jmxPassword jmxConnectionProtocolProviderPackage
Example: connect service:jmx:rmi://localhost:23791/oc4j oc4jadmin oc4jadmin 
oracle.oc4j.admin.jmx.remotePrevious command successful: JmxCommand(help).JMXClient>

For clients like RDMT that might issue "single" JMX commands from shell scripts, the JmxClientMain class provides a user interface that is similar to the JMX commands above, with additional connection options for each command.