3-6 Oracle Complex Event Processing Administrators Guide
3.3 Starting and Stopping an Oracle CEP Server in a Standalone-Server Domain
You can start and stop an Oracle CEP standalone-server using any of the Oracle CEP Visualizer, Oracle CEP IDE for Eclipse, or command line scripts.
This section describes:
■
Section 3.3.1, How to Start an Oracle CEP Standalone-Server Using the startwlevs Script
■
Section 3.3.2, How to Stop an Oracle CEP Standalone-Server Using the stopwlevs Script
3.3.1 How to Start an Oracle CEP Standalone-Server Using the startwlevs Script
Each Oracle CEP server directory contains a command script that starts a server instance; by default, the script is called startwlevs.cmd Windows or
startwlevs.sh UNIX.
To start an Oracle CEP standalone-server using the startwlevs script: 1.
Ensure that the JAVA_HOME variable in the server start script points to the correct Oracle JRockit JDK. If it does not, edit the script.
The server start script is located in the server directory under the main domain directory. For example, the default server directory of the HelloWorld domain is
located in ORACLE_CEP_HOMEocep_11.1samplesdomainshelloworld_ domaindefaultserver, where ORACLE_CEP_HOME refers to the main Oracle
CEP installation directory, such as oracle_cep.
a.
If using the Oracle JRockit JDK installed with Oracle CEP, the JAVA_HOME variable should be set as follows:
For UNIX: JAVA_HOME=ORACLE_CEP_HOMEjrockit_160_20
For Windows: set JAVA_HOME=ORACLE_CEP_HOME\jrockit_160_20
where ORACLE_CEP_HOME refers to the installation directory of Oracle CEP 10.3, such as oracle_cep UNIX or c:\oracle_cep Windows.
b.
If using the Oracle JRockit JDK installed with Oracle JRockit Real Time, the JAVA_HOME variable should be set as follows:
For UNIX: JAVA_HOME=ORACLE_RT_HOMEJROCKIT_RT_HOME
For Windows: set JAVA_HOME=ORACLE_RT_HOME\JROCKIT_RT_HOME
where ORACLE_RT_HOME refers to the installation directory of Oracle JRockit Real Time, such as jrockit UNIX or c:\jrockit Windows, and
JROCKIT_RT_HOME refers to JRockit Real Time directory.
2.
Open a command window and change to the server directory of the domain directory. For example, to start the HelloWorld sample server:
Administrating Oracle CEP Standalone-Server Domains 3-7
prompt cd C:\oracle_cep\ocep_11.1\samples\domains\helloworld_ domain\defaultserver
3.
Execute the startwlevs.cmd Windows or startwlevs.sh UNIX script: prompt startwlevs.cmd
If you are using the Oracle JRockit JDK included in Oracle JRockit Real Time, enable the deterministic garbage collector by passing the -dgc parameter to the
command:
prompt startwlevs.cmd -dgc
3.3.2 How to Stop an Oracle CEP Standalone-Server Using the stopwlevs Script
Each Oracle CEP server directory contains a command script that stops a server instance; by default, the script is called stopwlevs.cmd Windows or
stopwlevs.sh UNIX.
To stop an Oracle CEP standalone-server using the stopwlevs script: 1.
Open a command window and change to the server directory. For example, to stop the running HelloWorld sample server:
prompt cd C:\oracle_cep\ocep_11.1\samples\domains\helloworld_ domain\defaultserver
2.
Execute the stopwlevs.cmd Windows or stopwlevs.sh UNIX script. Use the -url argument to pass the URL that establishes a JMX connection to the
server you want to stop. This URL takes the form service:jmx:msarmi:host:portjndijmxconnector, where host
refers to the computer hosting the server and port refers to the servers JNDI port, configured in config.xml file. For example:
prompt stopwlevs.sh -url service:jmx:msarmi:ariel:9002jndijmxconnector In the example, the host is ariel and the JMX port is 9002. The 9002 port is the
netio port defined in the Oracle CEP server config.xml configuration file. MSA security uses it for JMX connectivity.
See Section A.6, Connection Arguments
for additional details about the -url argument.
Note: On HP-UX, to avoid an OutOfMemoryError, you may need to
increase the MaxPermSize to 256 in startwlevs.sh. For example: -XX:MaxPermSize=256m.
Note:
The following procedure does not stop an Oracle CEP stand-alone server running in SSL mode. To stop an Oracle CEP
stand-alone server running in SSL mode, run the wlevs.Admin utility, as described in
Section A.4, Running wlevs.Admin Utility in SSL Mode.
3-8 Oracle Complex Event Processing Administrators Guide
Note: on Windows, do not stop the Oracle CEP server by clicking the
Close button in the command prompt in which you started it. Always
stop the Oracle CEP server using the stopwlevs.cmd script or Ctrl-C.