Oracle® CEP Administrator's Guide 11g Release 1 (11.1.1) Part Number E14300-01 |
|
|
View PDF |
This section contains information on the following subjects:
Section 2.1, "Overview of Oracle CEP Standalone-Server Domain Administration"
Section 2.2, "Creating an Oracle CEP Standalone-Server Domain"
Section 2.3, "Updating an Oracle CEP Standalone-Server Domain"
Section 2.4, "Starting and Stopping an Oracle CEP Server in a Standalone-Server Domain"
Section 2.5, "Deploying an Application to an Oracle CEP Standalone-Server Domain"
An Oracle CEP standalone-server domain is a domain that contains a single Oracle CEP server. This is the type of domain created by default by the Configuration Wizard and is the starting point for a multi-server domain.
For more information, see:
After you install Oracle CEP, use the Configuration Wizard to create a new domain to deploy your applications. The Configuration Wizard creates, by default, the domains in the ORACLE_CEP_HOME
/user_projects/domains
directory, where ORACLE_CEP_HOME
refers to the Oracle CEP installation directory such as d:/oracle_cep
. You can, however, create a domain in any directory you want.
The Configuration Wizard creates a single default server in the domain; all the server-related file are located in a subdirectory of the domain directory named the same as the server (such a c:\oracle_cep\user_projects\domains\my_domain\defaultserver
). Additionally, the Configuration Wizard allows you to:
Configure the server's administration user and password.
Configure the default server to use a database or database driver that is different from the default. In this case, you need to customize the JDBC settings to point to the appropriate database.
Configure the server's listen port.
Configure the password for the identity keystore and private keystore.
You can use the Configuration Wizard in the following modes:
Graphical mode—Graphical-mode configuration is an interactive, GUI-based method for creating and configuring a domain. It can be run on both Windows and UNIX systems. See Section 2.2.1, "Creating an Oracle CEP Standalone-Server Domain Using the Configuration Wizard in Graphical Mode."
The following procedure shows how to invoke and use the Configuration Wizard in graphical mode by executing the relevant command script for both Windows or Unix.
Note:
On Windows, you can also invoke the Configuration Wizard using the Start menu:Start > All Programs > Oracle Complex Event Processing 10gR3 > Tools > Configuration Wizard
To create an Oracle CEP standalone-server domain using the Configuration Wizard in graphical mode:
Open a command window and set your environment as described in "Setting Your Development Environment" in the Oracle CEP Getting Started.
Change to the ORACLE_CEP_HOME
/ocep_11.1/common/bin
directory, where ORACLE_CEP_HOME
refers to the main Oracle CEP installation directory, such as /oracle_cep
:
prompt> cd /oracle_cep/ocep_11.1/common/bin
Invoke the config.cmd
(Windows) or config.sh
(UNIX) command to invoke the wizard:
prompt> config.sh
After the Configuration Wizard has finished loading, you will see a standard Oracle Welcome window.
Note:
The Oracle CEP Configuration Wizard is self-explanatory; however, if you want more information about using the tool, continue reading this procedure.Click Next.
In the Choose Create or Update Domain window, choose Create a New Oracle CEP Domain.
Click Next.
Enter the name of the administrator user for the default server of the domain.
Click Next.
Enter basic configuration information about the default server in the domain. In particular:
Enter the name of the default server. This name will also be used as the name of the directory that contains the default server files.
The listen port for Oracle CEP itself. Default is 9002.
The secure listen port. Default is 9003.
Click Next.
Enter and confirm the password for the Oracle CEP domain identity keystore.
By default, the password for the certificate private key will be the same as the identity keystore; if you want it to be different, uncheck Use Keystore Password and enter the private key password.
Click Next.
Decide whether or not to update the JDBC datasource configuration:
The Configuration Wizard bases the creation of a new domain on the Oracle CEP domain template; by default, this template does not configure any JDBC datasource for a domain. This means that, unless you change the default domain template used by the Configuration Wizard, if you choose No at this step, no JDBC data source is configured. If you want to configure a JDBC data source, choose Yes at this step to proceed to the page in which you can enter the data source information.
To create a JDBC datasource:
Select Yes.
Click Next.
Enter the new JDBC datasource values in Configure Database Properties window.
In the top section, enter the name of the datasource. Then select the database type (Oracle or Microsoft SQL Server) and corresponding drivers; you can also browse to new drivers using the Browse/Append button.
In the lower section, enter the details about the database to which this data source connects, such as its name, the name of the computer that hosts the database server, the port, and the name and password of the user that connects to the database. The JDBC connection URL is automatically generated for you based on this information.
Click Next.
To not create a JDBC datasource:
Select No.
Click Next.
In the Configure Server window, enter the name of the new domain and the full pathname of its domain location.
The configuration wizard creates the domain using its domain name in the domain location directory.
Note:
Oracle recommends you always use the default domain location to create your domains:On UNIX, the default domain is: ORACLE_CEP_HOME
/user_projects/domains
.
On Windows, the default domain is: ORACLE_CEP_HOME
\user_projects\domains
.
Click Create.
If the creation of the domain succeeded, you will see a message similar to the following in the Creating Domain window:
Domain created successfully! Domain location: C:\oracle_cep\user_projects\domains\ocep_domain
Click Done.
Use the Configuration Wizard to update an existing server in a domain.
The Configuration Wizard creates, by default, the domains in the ORACLE_CEP_HOME
/user_projects/domains
directory, where ORACLE_CEP_HOME
refers to the Oracle CEP installation directory such as d:/oracle_cep
. You can, however, create a domain in any directory you want.
The Configuration Wizard creates a single default server in the domain; all the server-related file are located in a subdirectory of the domain directory named the same as the server (such as c:\oracle_cep\user_projects\domains\my_domain\defaultserver
).
You can update only the following configuration options of an existing standalone-server in your domain:
The listen port.
The configuration of the JDBC datasource.
You can use the Configuration Wizard in the following modes:
Graphical mode—Graphical-mode is an interactive, GUI-based method for updating a domain. It can be run on both Windows and UNIX systems. See Section 2.3.1, "How to Update an Oracle CEP Standalone-Server Domain Using the Configuration Wizard in Graphical Mode."
The following procedure shows how to invoke and use the Configuration Wizard in graphical mode by executing the relevant command script for both Windows or Unix.
Note:
On Windows, you can also invoke the Configuration Wizard using the Start menu:Start > All Programs > Oracle Complex Event Processing 10gR3 > Tools > Configuration Wizard
For clarity, it is assumed in this section that you want to update a server called productionServer
whose server-related files are located in the C:\oracle_cep\user_projects\domains\mydomain\productionServer
directory.
To update an Oracle CEP standalone-server domain using the Configuration Wizard in graphical mode:
Open a command window and set your environment as described in "Setting Your Development Environment" in the Oracle CEP Getting Started.
Change to the ORACLE_CEP_HOME
/ocep_11.1/common/bin
directory, where ORACLE_CEP_HOME
refers to the main Oracle CEP installation directory, such as /oracle_cep
:
prompt> cd /oracle_cep/ocep_11.1/common/bin
Invoke the config.cmd
(Windows) or config.sh
(UNIX) command to invoke the wizard:
prompt> config.sh
After the Configuration Wizard has finished loading, you will see a standard Oracle Welcome window.
Note:
The Oracle CEP Configuration Wizard is self-explanatory; however, if you want more information about using the tool, continue reading this procedure.Click Next.
In the Choose Create or Update Domain window, select Update an existing Oracle CEP domain.
Click Next.
In the text box, enter the full pathname of the server directory that contains the files for the server you want to update.
In this example, the value is C:\oracle_cep\user_projects\domains\mydomain\productionServer
.
Click Next.
Update the listen ports for the server.
Note:
To prevent any conflicts when all servers are running at the same time, be sure that you do not enter the same values used by other servers in the domain.Click Next.
Decide whether or not to update the JDBC datasource configuration:
To update the JDBC datasource configuration:
Select Yes.
Click Next.
Enter the new JDBC datasource values.
To leave the JDBC datasource configuration unchanged:
Select No.
Click Next.
Click Update to update the server.
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 2.4.1, "How to Start an Oracle CEP Standalone-Server Using the startwlevs Script"
Section 2.4.2, "How to Stop an Oracle CEP Standalone-Server Using the stopwlevs 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:
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_HOME
/ocep_11.1/samples/domains/helloworld_domain/defaultserver
, where ORACLE_CEP_HOME
refers to the main Oracle CEP installation directory, such as /oracle_cep
.
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_HOME/jrockit-R27.6.0-50-1.6.0_05
For Windows:
set JAVA_HOME=ORACLE_CEP_HOME\jrockit-R27.6.0-50-1.6.0_05
where ORACLE_CEP_HOME
refers to the installation directory of Oracle CEP 10.3, such as /oracle_cep
(UNIX) or c:\oracle_cep
(Windows).
If using the Oracle JRockit JDK installed with Oracle JRockit Real Time 3.0, the JAVA_HOME
variable should be set as follows:
For UNIX:
JAVA_HOME=ORACLE_RT_HOME/jrrt-3.0.0-1.6.0
For Windows:
set JAVA_HOME=ORACLE_RT_HOME\jrrt-3.0.0-1.6.0
where ORACLE_RT_HOME
refers to the installation directory of Oracle JRockit Real Time 3.0, such as /jrockit
(UNIX) or c:\jrockit
(Windows).
Open a command window and change to the server directory of the domain directory. For example, to start the HelloWorld sample server:
prompt> cd C:\oracle_cep\ocep_11.1\samples\domains\helloworld_domain\defaultserver
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 3.0, enable the deterministic garbage collector by passing the -dgc
parameter to the command:
prompt> startwlevs.cmd -dgc
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:
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
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
:
port
//jndi/jmxconnector
, where host
refers to the computer hosting the server and port
refers to the server's JNDI port, configured in config.xml
file. For example:
prompt> stopwlevs.sh -url service:jmx:msarmi://ariel:9002/jndi/jmxconnector
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.
When you deploy an application to a standalone-server domain, you typically deploy to the singleton server group using either the Oracle CEP Visualizer or Deployer utility.
For more informatoin, see:
Oracle CEP Visualizer User's Guide
The simplest way to deploy an Oracle CEP application to a standalone-server domain is to use the Oracle CEP Visualizer.
For more information, see "Deploying an Application" in the Oracle CEP Visualizer User's Guide.
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.
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
.
After creating your own Oracle CEP standalone-server domain, consider the administration tasks that Section 1.5, "Understanding Oracle CEP Server Administration Tasks" describes.
For example, you can:
Create additional servers in the domain and configure the domain to be multi-server.
See Chapter 3, "Administrating Oracle CEP Multi-Server Domains."
Optionally configure the server.
See Section 1.3, "Understanding Oracle CEP Server Configuration."
Create an Oracle CEP application.
See Oracle CEP IDE Developer's Guide for Eclipse for a description of the programming model, details about the various components that make up an application, how they all fit together, and typical steps to create a new application.
Deploy your new, or existing, Oracle CEP application to the domain.
For more information, see:
Section 2.5, "Deploying an Application to an Oracle CEP Standalone-Server Domain"
"Assembling and Deploying Oracle CEP Applications" in the Oracle CEP IDE Developer's Guide for Eclipse
Manage your applications, servers, and domains:
Using the Oracle CEP Visualizer.
See Oracle CEP Visualizer User's Guide.
Using the wlevs.Admin
command line tool.
Using JMX and MBeans.