8 Deploying Applications to Multi-Server Domains

This section describes how to deploy applications to a multi-server domain, including:

8.1 Overview of Deploying an Application to an Oracle CEP Multi-Server Domain

When you deploy an application to a multi-server domain, you typically specify a target group, and Oracle CEP then deploys the application to the set of running servers in that group. Oracle CEP dynamically maintains group membership based on running servers. This means that if new servers in the group are started, Oracle CEP automatically propagates the appropriate set of deployments to the new server.

Take, for example, the simple multi-server domain configured in the section Section 6.1, "Creating an Oracle CEP Multi-Server Domain Using Oracle Coherence." Assume that only myServer1 had been started, and then an application is deployed to the domain group, which includes myServer1 and myServer2. At that point, because only myServer1 of the multi-server domain has been started, the application will be deployed only to myServer1. When myServer2 is subsequently started, Oracle CEP automatically replicates and propagates the deployment of the application to myServer2 without the user having the explicitly deploy it.

Deployment propagation occurs based on application version. When you deploy a new version of an application, the new version is propagated to all servers accordingly.

If different configuration is required on different servers for an application then currently it is best to achieve this by using system properties.

This section describes how to perform the following tasks:

For more information, see:

8.2 Deploying to an Oracle CEP Server Using the Oracle CEP Visualizer

The simplest way to deploy an Oracle CEP application to a multi-server domain is to use the Oracle CEP Visualizer.

For more information, see "Deploying an Application" in the Oracle CEP Visualizer User's Guide.

8.3 Deploying to an Oracle CEP Server Singleton Group Using the Deployer Utility

If you do not specify a group when you deploy an application, Oracle CEP deploys the application to the singleton server group that includes only the specific server to which you deploy the application. This is the standard case in single-server domains, but is also applicable to multi-server domains.

Note:

When you upgrade a 2.0 domain to execute in a multi-server domain, any deployed applications are deployed to the singleton server group.

The following example shows how to deploy to a singleton group; note that the command does not specify a -group option:

prompt> java -jar wlevsdeploy.jar -url http://ariel:9002/wlevsdeployer -install myapp_1.0.jar

In the example, the myapp_1.0.jar application will be deployed to the singleton server group that contains a single server: the one running on host ariel and listening to port 9002. If the domain is multi-server and other servers are members of the domain group, the application will not be deployed to these servers.

For more information about groups, see Section 5.2, "Groups".

8.4 Deploying to an Oracle CEP Server Domain Group Using the Deployer Utility

The domain group is a live group that always exists and contains all servers in a domain. In another words, all servers are always a member of the domain group. However, you must still explicitly deploy applications to the domain group. The main reason for this is for simplicity and consistency in usage.

When you explicitly deploy an application to the domain group, Oracle CEP guarantees that all servers of this homogenous environment have this deployment.

To deploy to the domain group, use the -group all option. The following example shows how to deploy to a domain group:

prompt> java -jar wlevsdeploy.jar -url http://ariel:9002/wlevsdeployer -install myapp_1.0.jar -group all 

In the example, the myapp_1.0.jar application will be deployed to all servers of the domain group on host ariel listening to port 9002.

For more information about groups, see Section 5.2, "Groups".

8.5 Deploying to an Oracle CEP Server Custom Group Using the Deployer Utility

To deploy to a custom group, use the -group groupname option of the deploy command.

In the following examples, assume the multi-server domain has been configured as described in Section 6.1.2, "How to Create an Oracle CEP Multi-Server Domain With Custom Groups Using Oracle Coherence."

The following example shows how to deploy an application called strategies_1.0.jar to the strategygroup:

prompt> java -jar wlevsdeploy.jar -url http://ariel:9002/wlevsdeployer -install strategies_1.0.jar -group strategygroup 

Based on the multi-server domain configuration, the preceding command deploys the application to myServer2 and myServer3, the members of the group strategygroup.

The following example shows how to deploy an application called selector_1.0.jar to the selectorgroup:

prompt> java -jar wlevsdeploy.jar -url http://ariel:9002/wlevsdeployer -install selector_1.0.jar -group selectorgroup 

Based on the multi-server domain configuration, the preceding command deploys the application only to myServer1, which is the sole member of group selectorgroup.

Note that both commands are executed to the same server (the one on host ariel listening to port 9002). However, you can specify any of the servers in the domain in the deploy command, even if the server is not part of the group to which you want to deploy the application.

For more information about groups, see Section 5.2, "Groups".

8.6 Troubleshooting Multi-Server Domain Deployment

This section describes common problems that you may encounter when deploying applications to an Oracle CEP multi-server domain, including:

8.6.1 Oracle CEP Server Stops Application After Deployment

Problem: After you deploy an application to an Oracle CEP multi-server domain, Oracle CEP stops the application after about 30 seconds.

Solution: Be sure you do not have more than one VPN software package installed on the same computer hosting your multi-server domain.