How to Configure Scalability With the Default Channel EventPartitioner

23-8 Oracle Complex Event Processing Developers Guide wlevs:listener ref=processor1 wlevs:listener ref=processor2 wlevs:listener ref=processor3 wlevs:source ref=inbound wlevs:channel ... – Edit the Oracle CEP server config.xml file to add a work-manager element. If this work manager is shared by more than one component such as other adapters and Jetty, then set the min-threads-constraint and max-threads-constraint elements each to a value greater than the number of listeners. If this work manager is not shared by more than one component that is, it is dedicated to the upstream adapter in this configuration, then set the min-threads-constraint and max-threads-constraint ele- ments equal to the number of listeners. ... work-manager nameadapterWorkManagername min-threads-constraint3min-threads-constraint max-threads-constraint3max-threads-constraint work-manager ... For more information, see Section F.44, work-manager . – Edit the component configuration file to configure the upstream adapter with this work-manager. ... adapter nameinboundname work-manager-nameadapterWorkManagerwork-manager-name ... adapter ... 12. Assemble and deploy your application. For more information, see Chapter 24, Assembling and Deploying Oracle CEP Applications . At runtime, the channel uses your EventPartitioner to determine how to dispatch each incoming event to its listeners. 23.2 Configuring Scalability With the ActiveActiveGroupBean This section describes how to configure your Oracle CEP application to use the ActiveActiveGroupBean to partition an incoming JMS event stream by selector, including: ■ Section 23.2.1, How to Configure Scalability in a JMS Application Without Oracle CEP High Availability ■ Section 23.2.2, How to Configure Scalability in a JMS Application With Oracle CEP High Availability Configuring Scalability 23-9 ■ Section 23.2.3, How to Configure the ActiveActiveGroupBean Group Pattern Match For more information, see Section 22.2.2, ActiveActiveGroupBean .

23.2.1 How to Configure Scalability in a JMS Application Without Oracle CEP High Availability

You can use the ActiveActiveGroupBean to partition an incoming JMS event stream by selector in a multi-server domain for an application that does not use Oracle CEP high availability. For information on how to use the ActiveActiveGroupBean in an Oracle CEP high availability application, see Section 23.2.2, How to Configure Scalability in a JMS Application With Oracle CEP High Availability . For more information, see Section 22.2.2.1, Scalability in an Oracle CEP Application Using the ActiveActiveGroupBean Without High Availability . To configure scalability in a JMS application without Oracle CEP high availability: 1. Create a multi-server domain. For more information, see Introduction to Multi-Server Domains in the Oracle Complex Event Processing Administrators Guide. In this example, the deployment group is named MyDeploymentGroup. 2. Configure the Oracle CEP server configuration file on each Oracle CEP server to add the appropriate ActiveActiveGroupBean notification group to the groups child element of the cluster element. The Oracle CEP server configuration file, config.xml, is located in the DOMAIN_ DIR servernameconfig directory, where DOMAIN_DIR refers to the main domain directory and servername refers to a particular server instance. For example, Table 23–3 shows cluster elements for Oracle CEP servers ocep-server-1, ocep-server-2, ocep-server-3, and ocep-server-4. The deployment group is MyDeploymentGroup and notification groups are defined using default ActiveActiveGroupBean notification group naming. Optionally, you can specify your own group naming convention as Section 23.2.3, How to Configure the ActiveActiveGroupBean Group Pattern Match describes. Table 23–2 Oracle CEP Server Configuration File groups Element Configuration Partition cluster Element ocep-server-1 cluster server-nameocep-server-1server-name ... enabledcoherenceenabled ... groupsMyDeploymentGroup, ActiveActiveGroupBean_group1groups cluster ocep-server-2 cluster server-nameocep-server-2server-name ... enabledcoherenceenabled ... groupsMyDeploymentGroup, ActiveActiveGroupBean_group2groups cluster 23-10 Oracle Complex Event Processing Developers Guide 3. Create an Oracle CEP application. 4. Configure the EPN assembly file to add an ActiveActiveGroupBean element as Example 23–8 shows. Example 23–4 ActiveActiveGroupBean bean Element bean id=clusterAdapter class=com.oracle.cep.cluster.hagroups.ActiveActiveGroupBean bean 5. Define a parameterized message-selector in the jms-adapter element for the JMS inbound adapters. Edit the component configuration file to add group-binding child elements to the jms-adapter element for the JMS inbound adapters. Add one group-binding element for each possible JMS message-selector value as Example 23–10 shows. Example 23–5 jms-adapter Selector Definition for ocep-server-1 jms-adapter nameJMSInboundAdaptername event-typeStockTickevent-type jndi-provider-urlt3:ppurich-pc:7001jndi-provider-url destination-jndi-name.Topic1destination-jndi-name userweblogicuser passwordweblogic1password work-managerJettyWorkManagerwork-manager concurrent-consumers1concurrent-consumers session-transactedtruesession-transacted message-selector{CONDITION}message-selector bindings group-binding group-id=ActiveActiveGroupBean_group1 param id=CONDITIONacctid 400param group-binding group-binding group-id=ActiveActiveGroupBean_group2 param id=CONDITIONacctid BETWEEN 301 AND 400param group-binding group-binding group-id=ActiveActiveGroupBean_group3 param id=CONDITIONacctid BETWEEN 201 AND 300param group-binding group-binding group-id=ActiveActiveGroupBean_group4 param id=CONDITIONacctid = 200param group-binding bindings ocep-server-3 cluster server-nameocep-server-3server-name ... enabledcoherenceenabled ... groupsMyDeploymentGroup, ActiveActiveGroupBean_group3groups cluster ocep-server-4 cluster server-nameocep-server-4server-name ... enabledcoherenceenabled ... groupsMyDeploymentGroup, ActiveActiveGroupBean_group4groups cluster Table 23–2 Cont. Oracle CEP Server Configuration File groups Element Configuration Partition cluster Element