Oracle CEP Configuration MBeans

12-8 Oracle Complex Event Processing Administrators Guide For more information, see: ■ Section 12.1.1, Understanding JMX Configuration ■ Section 12.2.5, Example of Configuring JMX

12.2.1 jmx Configuration Object

Table 12–3 lists the jmx element child elements in the config.xml file that you must configure.

12.2.2 rmi Configuration Object

The Oracle CEP RMI service provides: ■ Ability to register a POJO interface in a server for remote method invocation from a client. ■ Ability to register for any context propagation from the client to the server on a remote method invocation, intercept, and act on this propagated context in the server. Table 12–4 lists the rmi element child elements in the config.xml file that you use to export server-side objects to remote clients.

12.2.3 jndi-context Configuration Object

The JNDI Factory Manager is responsible for supporting JNDI in an OSGi environment. It allows JNDI providers to be supplied as OSGi bundles, and for code running inside OSGi bundles to have full access to the JNDI environment. The Factory Manager consists of two components: ■ An OSGi bundle, which provides the OSGi-specific factory management code, to look up JNDI objects using the appropriate OSGi classloader. ■ JNDI glue code, internal to Oracle CEP, that initializes the JNDI environment to support the factory manager bundle. Table 12–3 Configuration Parameters for the jmx Element Parameter Type Description rmi-service-name String The name of the RMI service with which the jmx server will register to receive calls. jndi-service-name String The name of the JNDI service to which the jmx server will bind its object. Table 12–4 Configuration Parameters for the rmi Element Parameter Type Description heartbeat-period int The number of failed heartbeat attempts before triggering disconnect notifications to all registered listeners. http-service-name String The name of the HTTP service used to register remote objects such as Jetty, see Section 11.1, Overview of Jetty Support in Oracle Complex Event Processing . heartbeat-interval int The amount of time, in milliseconds, between heartbeats. Once the number of unsuccessful heartbeat attempts has reached the value specified by the HeartbeatPeriod parameter, all registered DisconnectListener instances are notified. name String The name of this configuration object. Configuring JMX for Oracle CEP 12-9 Table 12–5 lists the jndi-context element child elements in the config.xml file that you must configure.

12.2.4 exported-jndi-context Configuration Object

Requires a configured Section 12.2.3, jndi-context Configuration Object. Use this configuration object to export a remote JNDI service to a client using RMI. A JNDI context is registered with the RMI service to provide remote access to clients that pass a provider URL parameter in their InitialContext object. Table 12–6 lists the exported-jndi-context element child elements in the config.xml file that you must configure.

12.2.5 Example of Configuring JMX

Example 12–1 shows a config.xml snippet with JMX configuration; only relevant parts of the file are shown. Example 12–1 JMX Configuration config netio nameJettyNetioname port12345port netio work-manager nameWMname fairshare5fairshare min-threads-constraint1min-threads-constraint max-threads-constraint4max-threads-constraint work-manager jetty nameTestJettyname work-manager-nameWMwork-manager-name network-io-nameJettyNetionetwork-io-name jetty rmi nameRMIname http-service-nameTestJettyhttp-service-name rmi jndi-context nameJNDIname jndi-context exported-jndi-context Table 12–5 Configuration Parameters for the jndi-context Element Parameter Type Description default-provider boolean If true, the default Oracle CEP JNDI provider is used. Default value is true. name String The name of this configuration object. Table 12–6 Configuration Parameters for the exported-jndi-context Element Parameter Type Description rmi-service-name String The name of the RMI service that should be used to serve this JNDI context over the network. It must match an existing rmi configuration object. See Section 12.2.2, rmi Configuration Object. name String The name of this configuration object. The value of this element must be different from the value of the name child element of jndi-context in the same config.xml file. 12-10 Oracle Complex Event Processing Administrators Guide nameexportedJNDIname rmi-service-nameRMIrmi-service-name exported-jndi-context jmx jndi-service-nameJNDIjndi-service-name rmi-service-nameRMIrmi-service-name jmx config

12.3 Managing With JMX

This section describes detailed examples of managing Oracle CEP components using JMX, including: ■ Section 12.3.1, How to Programmatically Connect to the Oracle CEP JMX Server From a Non-Oracle CEP Client ■ Section 12.3.2, How to Programmatically Connect to the Oracle CEP JMX Server From an Oracle CEP Client ■ Section 12.3.3, How to Programmatically Configure an Oracle CEP Component Using JMX APIs ■ Section 12.3.4, How to Programmatically Monitor the Throughput and Latency of an Oracle CEP Component Using JMX APIs ■ Section 12.3.5, How to Connect to a Local or Remote Oracle CEP JMX Server Using JConsole With Security Enabled ■ Section 12.3.6, How to Connect to a Local or Remote Oracle CEP JMX Server Using JConsole With Security Disabled For more information, see: ■ Section 12.1.1, Understanding JMX Configuration ■ Section 12.1.2, Understanding JMX Management

12.3.1 How to Programmatically Connect to the Oracle CEP JMX Server From a Non-Oracle CEP Client

This section describes how to write Java code using the JMX API http:java.sun.comjavasetechnologiescoremntr-mgmtjavamana gement to connect to the Oracle CEP JMX server from a non-Oracle CEP client. This is the first step to all programmatic JMX management. For information on connecting to the Oracle CEP JMX server from another Oracle CEP server, see Section 12.3.2, How to Programmatically Connect to the Oracle CEP JMX Server From an Oracle CEP Client . To programmatically connect to the Oracle CEP JMX server from a non-Oracle CEP client: 1. Be sure that the JMX service is configured for your domain. For details see Section 12.2, Configuring JMX . Note: When using JConsole, you must start it with the Oracle CEP wlevsjconsole.cmd or wlevsjconsole.sh script. You cannot start jconsole directly.