How to Programmatically Connect to the Oracle CEP JMX Server From an Oracle CEP Client

Configuring JMX for Oracle CEP 12-15 12.3.5 How to Connect to a Local or Remote Oracle CEP JMX Server Using JConsole With Security Enabled You can use the wlevsjconsole script to connect to an Oracle CEP JMX server running on your local host or on a remote host to browse and manage Oracle CEP MBeans with the JDK jconsole. This procedure describes how to use JConsole when the Oracle CEP server has security enabled. This is the default configuration and is recommended for production servers. Alternatively, you can connect to the JMX server with security disabled see 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.2.1, Accessing the Oracle CEP JMX Server . To connect to a local or remote Oracle CEP JMX server using JConsole with security enabled: 1. Ensure that the local or remote Oracle CEP server is running. 2. Open a command window and set your environment as described in Setting Your Development Environment in the Oracle Complex Event Processing Getting Started. 3. Launch jconsole using the wlevsjconsole.cmd or wlevsjconsole.sh script located in the ORACLE_CEP_HOMEocep_11.1bin directory, where ORACLE_CEP_HOME refers to the directory in which you installed Oracle CEP such as oracle_home. a. To connect to a local Oracle CEP server, enter: prompt wlevsjconsole.cmd b. To connect to a remote Oracle CEP server, enter: prompt wlevsjconsole.cmd HOST-NAME:PORT Where HOST-NAME is the name of the remote host and PORT is the NetIO port as configured in the remote host’s ORACLE_CEP_HOMEuser_ projectsdomainsDOMAIN-NAMEdefaultserverconfigconfig.x ml file. The jconsole browser attempts to log into the JMX server and initially fails as Figure 12–3 shows. Note: When using JConsole, you must start it with the Oracle CEP wlevsjconsole.cmd or wlevsjconsole.sh script. You cannot start jconsole directly. 12-16 Oracle Complex Event Processing Administrators Guide Figure 12–3 Jconsole Initial Login Attempt

4. Click Cancel.

The Jconsole New Connection dialog appears as shown in Figure 12–4 . Figure 12–4 JConsole New Connection Dialog 5. Configure the New Connection dialog as Table 12–7 describes. Table 12–7 JConsole New Connection Attributes Attribute Description Remote Process Enter the following URL: service:jmx:msarmi:HOST-NAME:PORTjndijmxconnector Where HOST-NAME is the name of the local or remote host and PORT is the NetIO port as configured in the remote host’s ORACLE_CEP_HOMEuser_ projectsdomainsDOMAIN-NAMEdefaultserverconfigconfig.xml file default: 9002. Username Enter an Oracle CEP administration password. Default: wlevs. Configuring JMX for Oracle CEP 12-17

6. Click Connect.

The jconsole browser opens and provides access to Oracle CEP MBeans as Figure 12–6 shows. Figure 12–5 JConsole Browser 12.3.6 How to Connect to a Local or Remote Oracle CEP JMX Server Using JConsole With Security Disabled You can use the wlevsjconsole script to connect to an Oracle CEP JMX server running on your local host or on a remote host to browse and manage Oracle CEP MBeans with the JDK jconsole. This procedure describes how to use JConsole when the Oracle CEP server has security disabled. This is a common development configuration and is not recommended for production servers. Alternatively, you can connect to the JMX server with security enabled see Section 12.3.5, How to Connect to a Local or Remote Oracle CEP JMX Server Using JConsole With Security Enabled . For more information, see Section 12.1.2.1, Accessing the Oracle CEP JMX Server . Password Enter the password for the Oracle CEP administration password you chose. Default: wlevs. Table 12–7 Cont. JConsole New Connection Attributes Attribute Description