exported-jndi-context Configuration Object Configuring JMX

Configuring JMX for Oracle CEP 12-13

12.3.3 How to Programmatically Configure an Oracle CEP Component Using JMX APIs

This section describes how to write Java code using the JMX API http:java.sun.comjavasetechnologiescoremntr-mgmtjavamana gement to access Oracle CEP MBeans. To programmatically configure an Oracle CEP component using JMX APIs: 1. Acquire a connection to the Oracle CEP JMX server. For details see Section 12.3.1, How to Programmatically Connect to the Oracle CEP JMX Server From a Non-Oracle CEP Client . 2. Write the http:java.sun.comjavasetechnologiescoremntr-mgmtjavama nagement Java code to configure the component using the appropriate MBean. Consider the following JMX programming hints. Example 12–4 shows how to use the connection to start getting information about the domain and its deployed applications by querying MBeans. First the code shows how to get all MBeans whose type is Domain; there should only be one. Then, using the DomainMBean, the sample shows how to retrieve a list of all the deployed applications in the domain using ApplicationMBean: Example 12–4 Querying MBeans Set domainObjectNames = connection.queryMBeans ObjectName.getInstance ManagementConstants.DOMAIN_NAME + : + ManagementConstants.TYPE_PROPERTY + = + DomainMBean.MBEAN_TYPE + , , null ; ObjectName domainName = ObjectInstance domainObjectNames.iterator.next.getObjectName; System.out.printlnDomain Name: + domainName.getKeyPropertyManagementConstants.NAME_ PROPERTY; ObjectName [] applicationNames = ObjectName[] connection.getAttributedomainName, ApplicationMBeans; ObjectName selectedApplicationObjectName = null ; for ObjectName applicationName : applicationNames { String name = applicationName.getKeyPropertyManagementConstants.NAME_PROPERTY; String status = String connection.getAttributeapplicationName, State; System.out.printlnApplication: + name + Status: + status; selectedApplicationObjectName = applicationName ; } 12.3.4 How to Programmatically Monitor the Throughput and Latency of an Oracle CEP Component Using JMX APIs This section describes how to write Java code using the JMX API http:java.sun.comjavasetechnologiescoremntr-mgmtjavamana gement to access Oracle CEP MBeans and dynamically monitor the throughput and latency of an Oracle CEP component. To dynamically configure an Oracle CEP component using JMX APIs: 1. Acquire a connection to the Oracle CEP JMX server.