Using the Multi-Server Domain APIs to Manage Group Membership Changes
7-2 Oracle Complex Event Processing Administrators Guide
7.1.1 How to Create an Oracle CEP Multi-Server Domain With Default Groups Using Oracle CEP Native Clustering
This procedure describes how to create a multi-server domain that uses only the two predefined groups: the singleton group and domain group. In a domain that uses
default groups, all servers must be completely homogenous.
If a domain must support servers that are not completely homogeneous, you configure this by creating custom groups. See
Section 7.1.2, How to Create an Oracle CEP Multi-Server Domain With Custom Groups Using Oracle CEP Native Clustering
. For more information about default and custom groups, see
Section 5.2, Groups .
To create an Oracle CEP multi-server domain with default groups using Oracle CEP Native Clustering:
1.
Create a domain that contains a single, initial server. See
Chapter 3, Administrating Oracle CEP Standalone-Server Domains .
2.
Add one or more servers to the domain using the Configuration Wizard.
See Section 7.2, Updating an Oracle CEP Multi-Server Domain Using Oracle CEP
Native Clustering.
3.
Configure all the servers in the multi-server domain by manually editing their config.xml files and adding a cluster element with specific information.
To configure the servers in a multi-server domain using default groups, update the config.xml file for each member server by adding a cluster child element of the
root config element as Example 7–1
shows. Include the following child elements of cluster:
■
server-name: The server-name child element of cluster specifies a unique name for the server.
Oracle CEP Visualizer
uses the value of this element when it displays the server in its console. The default value if the
element is not set is Server-identity where identity is the value of the identity element.
■
server-host-name: Specifies the host addressIP used for point-to-point HTTP multi-server communication. Default value is localhost.
If all the Oracle CEP servers in your multi-server domain are on the same host, this element is optional.
Note: In this section it is assumed that you have already created a
domain that contains a single server and that you want to add additional servers to the domain to make it a multi-server domain. See
Chapter 3, Administrating Oracle CEP Standalone-Server Domains for details on creating a domain.
Note: Even though the Configuration WIzard does not support
adding new servers to a multi-server domain, one can use the Configuration Wizard to generate a new stand-alone server, and then
manually update its configuration to join a multi-server domain.
Administrating Multi-Server Domains With Oracle CEP Native Clustering 7-3
If one or more Oracle CEP servers in your multi-server domain on on different hosts, this element is mandatory if you plan to manage the multi-server
domain using the Oracle CEP Visualizer.
■
multicast-address: The multicast-address element is required unless all servers of the multi-server domain are hosted on the same computer; in
that case you can omit the multicast-address element and
Oracle CEP
automatically assigns a multicast address to the multi-server domain based on the computers IP address.
If, however, the servers are hosted on different computers, then you must provide an appropriate domain-local address. Oracle recommends you use an
address of the form 239.255.X.X, which is what the auto-assigned multicast address is based on.
All the
Oracle CEP
servers using this multicast-address must be on the same subnet.
■
identity: The identity element identifies the servers identity and must be an integer between 1 and INT_MAX.
Oracle CEP
numerically compares the server identities during multi-server operations; the server with the lowest
identity becomes the domain coordinator. Be sure that each server in the multi-server domain has a different identity; if servers have the same identity,
the results of multi-server operations are unpredictable.
■
enabled: By default the clustering of the servers in a multi-server domain is enabled for Oracle Coherence, so to enable
Oracle CEP
native clustering use enabledevs4jenabled.
Example 7–1 myServer1 config.xml File
config domain
namemyDomainname domain
cluster server-namemyServer1server-name
multicast-address239.255.0.1multicast-address identity1identity
enabledevs4jenabled cluster
... config
In Example 7–2
, the server is part of a domain called myDomain. For each server of the multi-server domain, the multicast-address elements
must contain the same value. The identity and server-name elements, however, must be different for each server in the multi-server domain.
Example 7–2 shows the config.xml file of a second server, called myServer2, in
the myDomain multi-server domain; note that this server’s identity is 2.
Example 7–2 myServer2 config.xml File
config
Note: When adding cluster element child elements, observe the
correct element order as Section 5.5, Order of cluster Element Child
Elements describes.