Yes No Oracle Fusion Middleware Online Documentation Library

6-12 Oracle Complex Event Processing Administrators Guide For example: prompt cd d:\oracle_cep\user_projects\domains\mydomain\server1 prompt cp .msasig.dat ..\server2 prompt cp .msasig.dat ..\server3 8. Perform the following steps on each server in the cluster: ■ Open a command window and set your environment as described in Setting Your Development Environment in the Oracle Complex Event Processing Getting Started. ■ Change to the DOMAIN_DIRservername directory, where DOMAIN_DIR refers to the domain directory and servername refers to the name of your server, such as d:\oracle_cep_home\user_ projects\domains\mydomain\myserver1. prompt cd d:\oracle_cep_home\user_projects\domains\mydomain\myserver1 ■ Create a keystore coherence-identity.jks containing the boot user using the JDK keytool utility and the following command line broken here for readability; in practice the full command should be on one line: prompt keytool -genkey -v -keystore configcoherence-identity.jks -storepass PASSWORD -alias BOOT-USER -keypass BOOT-USER-PASSWORD -dname CN=BOOT-USER Where: – PASSWORD is the password used to secure the keystore. – BOOT-USER is the user name you used to log into the Oracle CEP server host. – BOOT-USER-PASSWORD is the password you used when you logged into the Oracle CEP server host. ■ Create a permissions.xml file. ■ Edit the permissions.xml file to add the following permission for the boot user: permissions grant principal classjavax.security.auth.x500.X500Principalclass nameCN=BOOT-USERname principal permission targettarget actionallaction permission grant permissions Where BOOT-USER is the user name you used to log into the Oracle CEP server host. ■ Save and close the permissions.xml file. ■ Create a login.config file. ■ Edit the login.config file to add the following: Administrating Multi-Server Domains With Oracle Coherence 6-13 Coherence { com.tangosol.security.KeystoreLogin required keyStorePath=.{}config{}coherence-identity.jks; }; ■ Save and close the login.config file. ■ Update the server startup script for your platform, startwlevs.cmd Windows or startwlevs.sh UNIX, by adding the following property to the java command that actually starts the server: -Djava.security.auth.login.config=.login.config For example in practice, the full command should be on one line: JAVA_HOME\bin\java DGC DEBUG -Djava.security.auth.login.config=.login.config -Dwlevs.home=USER_INSTALL_DIR -Dbea.hoe=BEA_HOME -jar USER_INSTALL_DIR\bin\wlevs.jar 1 2 3 4 5 6 9. If you plan to use Oracle CEP Visualizer with the servers in this domain, see Section 10.5.3, How to Configure SSL in a Multi-Server Domain for Oracle CEP Visualizer . 10. Start all servers in your multi-server domain. See Section 6.5, Starting and Stopping an Oracle CEP Server in a Multi-Server Domain .

6.4 Using the Multi-Server Domain APIs to Manage Group Membership Changes

In an active-active system, applications are deployed homogeneously across several servers and are actively executing. There are cases, however, when these homogeneously-deployed applications need to elect a primary one as the coordinator or leader. In this case, events that result from the coordinator application are kept and passed on to the next component in the EPN; the results of secondary servers are dropped. However, if the coordinator fails, then one of the secondary servers must be elected as the new coordinator. To enable this in an application, the adapter or event bean, generally in the role of an event sink, must implement the com.bea.wlevs.ede.api.cluster.GroupMembershipListener interface which allows the event sinks to listen for multi-server domain group membership changes. At runtime, Oracle CEP automatically invokes the onMembershipChange callback method whenever membership changes occur. The signature of the callback method is as follows: onMembershipChangeServer localIdentity, Configuration groupConfiguration; In the implementation of the onMembershipChange callback method, the event sink uses the Server object localIdentity to verify if it is the leader. This can be done be comparing localIdentity with the result of Configuration.getCoordinator run on the second parameter, groupConfiguration. This parameter also allows a server to know what the current members of the group are by executing Configuration.getMembers.