This section contains information on the following subjects:
A domain is the basic administration unit for Oracle Complex Event Processing (or Oracle CEP for short). It consists of one or more Oracle CEP server instances, zero or more deployed applications, and logically related resources and services that are managed, collectively, as one unit. If the domain contains more than one server instance, they can be clustered together. For details, see Configuring and Using Oracle CEP Clustered Domains.
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 BEA_HOME
/user_projects/domains
directory, where BEA_HOME
refers to the parent directory of the main Oracle CEP installation directory such as d:/beahome
. 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. Once you have created a domain with a single default server, you can use the Configuration Wizard to create additional servers in the domain.
The following list describes the important files and directories of a server in a domain, relative to the server directory (which is a subdirectory of the main domain directory):
deployments.xml
—XML file that contains the list of applications, packaged as OSGi bundles, that are currently deployed to the Oracle CEP instance of this domain.startwlevs.cmd
—Command file used to start an instance of Oracle CEP. The UNIX equivalent is called startwlevs.sh
.stopwlevs.cmd
—Command file used to stop an instance of Oracle CEP. The UNIX equivalent is called stopwlevs.sh
.config/config.xml
—XML file that describes the services that have been configured for the Oracle CEP instance. Services include logging, debugging, Jetty Web Service, and JDBC data sources.config/security*
—Files that configure security for the domain.config/atnstore.txt
—File that lists the configured users and groups for this domain.You can also use the Configuration Wizard to add a new server to an existing domain, or update an existing server to reconfigure its administration user, listen ports, and JDBC configuration.
To create an Oracle CEP domain, use the Configuration Wizard. This tool guides you through the entire process, allowing you to customize the domain to more closely match your particular environment by:
You can use the Configuration Wizard in the following modes:
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 Creating a Domain in Graphical Mode.
Silent-mode configuration is a non-interactive method of creating and configuring a domain that requires the use of an XML properties file for selecting configuration options. You can run silent-mode configuration in either of two ways: as part of a script or from the command line. Silent-mode configuration is a way of setting configurations options only once and then using those options to duplicate the creating and configuration of a domain on many machines. See Creating a Domain in Silent 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. You can also invoke the Configuration Wizard on Windows using the Start ment:
Start > All Programs > Oracle CEP 3.0 > Tools > Configuration Wizard
To invoke and use the Configuration Wizard in graphical mode, follow these steps:
WLEVS_HOME
/common/bin
directory, where WLEVS_HOME
refers to the main Oracle CEP installation directory, such as /beahome_wlevs/wlevs30
:prompt> cd /beahome_wlevs/wlevs30/common/bin
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. Click Next.
Note: | The Oracle CEP Configuration Wizard is self-explanatory; however, if you want more information about using the tool, continue reading this procedure. |
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 data source 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.
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.
Note: | Oracle recommends you always use the default domain location to create your domains: BEA_HOME /user_projects/domains (UNIX) or BEA_HOME \user_projects\domains (Windows). |
Domain created successfully!
Domain location: C:\bea_wlevs\user_projects\domains\wlevs30_domain
Using the Configuration Wizard in silent mode allows a non-interactive method of creating and configuring a domain; this method requires the use of an XML properties file for selecting configuration options. To run the Configuration Wizard using silent mode:
silent.xml
file that defines the configuration settings normally entered by a user during an interactive session of the Configuration Wizard. See Creating a silent.xml File.Note: | Incorrect entries in the silent.xml file can cause failures. To help you determine the cause of a failure, we recommend that you create a log file when you launch the Configuration Wizard. |
WLEVS_HOME
/common/bin
directory, where WLEVS_HOME
refers to the main Oracle CEP installation directory, such as /beahome_wlevs/wlevs30
:prompt> cd /beahome_wlevs/wlevs30/common/bin:
config.cmd
(Windows) or config.sh
(UNIX) command in silent mode:prompt> config.cmd -mode=silent -silent_xml=
path_to_xml_file
where path_to_xml_file
is the full pathname of the silent.xml
template file you created in the preceding step.
If you want to create an execution log, use the -log=
full_path_to_log_file
option; for example:
prompt> config.cmd -mode=silent -silent_xml=
path_to_xml_file
-log=C:\logs\create_domain.log
The command does not return any messages if it completes successfully. See Returning Exit Codes to the Command Window for getting information about the success or failure of the silent execution of the Configuration Wizard.
When you run the Configuration Wizard in silent mode, the program uses an XML file (silent.xml
) to determine which configuration options should be used.
To create a silent.xml
file, follow these steps:
silent.xml
on the computer on which you want to run the Configuration Wizard in silent mode.silent.xml
file.silent.xml
file you just created, edit the values for the keywords shown in Table 2-1 to reflect your configuration.
For example, if you want to create the new domain in the C:\bea_wlevs\user_projects\domains
directory, update the corresponding <data-value>
element as follows
<data-value name="DOMAIN_LOCATION"
value="C:\bea_wlevs\user_projects\domains" />
<?xml version="1.0" encoding="UTF-8"?>
<bea-installer xmlns="http://www.bea.com/plateng/wlevs/config/silent">
<input-fields>
<data-value name="CONFIGURATION_OPTION" value="createDomain" />
<data-value name="USERNAME" value="wlevs" />
<data-value name="PASSWORD" value="wlevs" />
<data-value name="SERVER_NAME" value="my_wlevs_server" />
<data-value name="DOMAIN_NAME" value="mydomain" />
<data-value name="DOMAIN_LOCATION" value="C:\bea_wlevs\user_projects\domains" />
<data-value name="NETIO_PORT" value="9002" />
<data-value name="RMI_REGISTRY_PORT" value="1099" />
<data-value name="RMI_JRMP_PORT" value="9999" />
<data-value name="KEYSTORE_PASSWORD" value="my_keystore_password" />
<data-value name="PRIVATEKEY_PASSWORD" value="my_privatekey_password" />
<data-value name="DB_URL" value="jdbc:bea:oracle://localhost:1521:XE" />
<data-value name="DB_USERNAME" value="db_user" />
<data-value name="DB_PASSWORD" value="db_password" />
</input-fields>
</bea-installer>
When run in silent mode, the Configuration Wixard generates exit codes that indicate the success or failure of the creation and configuration of the domain. These exit codes are shown in the following table.
Listing 2-1 provides a sample Windows command file that invokes the Configuration Wizard in silent mode and echoes the exit codes to the command window from which the script is executed.
rem Execute the Configuration Wizard in silent mode
@echo offconfig.cmd -mode=silent -silent_xml=
c:\scripts\silent.xml-log=C:\logs\create_domain.logs
@rem Return an exit code to indicate success or failure
set exit_code=%ERRORLEVEL%
@echo.
@echo Exitcode=%exit_code%
@echo.
@echo Exit Code Key
@echo ---------------
@echo 0=Configuration Wizard completed successfully
@echo -1=Configuration Wizard failed due to a fatal error
@echo -2=Configuration Wizard failed due to an internal XML parsing error
@echo.
Use the Configuration Wizard to add new servers to an existing domain. The procedure is similar to creating a new domain, so be sure you read Creating a Domain Using the Configuration Wizard before continuing with this section.
For clarity, it is assumed that:
user_projects\domains\mydomain
.defaultserver
and the server files are located in the C:\bea_wlevs\user_projects\domains\mydomain\defaultserver
directory.mydomain
domain called productionServer
.Follow these steps to add a new server to an existing domain in graphical mode:
productionServer
.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.
mydomain
for the domain name and C:\bea_wlevs\user_projects\domains
for the domain location. Click Create.Domain created successfully!
Domain location: C:\bea_wlevs\user_projects\domains\mydomain
Adding a new server to an existing domain in silent mode is similar to creating a new domain, as described in Creating a Domain in Silent Mode. The only difference is in the values of the options in the silent.xml
file. In particular:
createDomain
.Based on the assumptions described in Adding New Servers to an Existing Domain Using the Configuration Wizard, the silent.xml file would look something like the following:
<?xml version="1.0" encoding="UTF-8"?>
<bea-installer xmlns="http://www.bea.com/plateng/wlevs/config/silent">
<input-fields>
<data-value name="CONFIGURATION_OPTION" value="createDomain" />
<data-value name="USERNAME" value="wlevs" />
<data-value name="PASSWORD" value="wlevs" />
<data-value name="SERVER_NAME" value="productionServer" />
<data-value name="DOMAIN_NAME" value="mydomain" />
<data-value name="DOMAIN_LOCATION" value="C:\bea_wlevs\user_projects\domains" />
<data-value name="NETIO_PORT" value="9102" />
<data-value name="RMI_REGISTRY_PORT" value="1199" />
<data-value name="RMI_JRMP_PORT" value="9998" />
<data-value name="KEYSTORE_PASSWORD" value="my_keystore_password" />
<data-value name="PRIVATEKEY_PASSWORD" value="my_privatekey_password" />
<data-value name="DB_URL" value="jdbc:bea:oracle://localhost:1521:XE" />
<data-value name="DB_USERNAME" value="db_user" />
<data-value name="DB_PASSWORD" value="db_password" />
</input-fields>
</bea-installer>
Use the Configuration Wizard to update an existing servers in a domain. The procedure has similarities with creating a new domain and default server, so be sure you read Creating a Domain Using the Configuration Wizard before continuing with this section.
You can update the only following configuration options of an existing server in your domain:
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:\bea_wlevs\user_projects\domains\mydomain\productionServer
directory.
Follow these steps to update an existing server in your domain using the Configuration Wizard in graphical mode.
C:\bea_wlevs\user_projects\domains\mydomain\productionServer
. Click Next.
Updating an existing server in a domain in silent mode is similar to creating a new domain, as described in Creating a Domain in Silent Mode. The main difference is in the values of the options in the silent.xml
file. In particular:
updateDomain
.C:\bea_wlevs\user_projects\domains\mydomain\productionServer
.Be sure that the new server configuration options, such as NETIO_PORT, RMI_REGISTRY_PORT, and RMI_JRMP_PORT, are different than the options for any other servers in the domain. The database options can be the same if you want the updated server to connect to the same database as the other servers.
Based on the assumptions described in Updating an Existing Server Using the Configuration Wizard, the silent.xml
file would look something like the following:
<?xml version="1.0" encoding="UTF-8" ?>
<bea-installer xmlns="http://www.bea.com/plateng/wlevs/config/silent">
<input-fields><data-value name="CONFIGURATION_OPTION" value="updateDomain" />
<data-value name="EXISTING_DOMAIN_PATH" value="C:\bea_wlevs\user_projects\domains\mydomain\productionServer" />
<data-value name="NETIO_PORT" value="9102" />
<data-value name="RMI_REGISTRY_PORT" value="1199" />
<data-value name="RMI_JRMP_PORT" value="9998" />
<data-value name="DB_URL" value="jdbc:bea:oracle://localhost:1521:XE" />
<data-value name="DB_USERNAME" value="db_user" />
<data-value name="DB_PASSWORD" value="db_password" />
</input-fields>
</bea-installer>
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). The script to stop the server is called stopwlevs.cmd
(Windows) or stopwlevs.sh
(UNIX).
To start an instance of Oracle CEP:
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 WLEVS_HOME
/samples/domains/helloworld_domain/defaultserver
, where WLEVS_HOME
refers to the main Oracle CEP installation directory, such as /beahome_wlevs/wlevs30
.
If using the Oracle JRockit JDK installed with Oracle CEP 3.0, the JAVA_HOME
variable should be set as follows:
JAVA_HOME=BEA_HOME_WLEVS
/jrockit-R27.6.0-23-1.5.0_15 (UNIX)
set JAVA_HOME=BEA_HOME_WLEVS
\jrockit-R27.6.0-23-1.5.0_15 (Windows)
where BEA_HOME_WLEVS
refers to the installation directory of Oracle CEP 3.0, such as /beahome_wlevs
(UNIX) or c:\beahome_wlevs
(Windows).
If using the Oracle JRockit JDK installed with Oracle JRockit Real Time 2.0, the JAVA_HOME
variable should be set as follows:
JAVA_HOME=BEA_HOME_WLRT
/jrockit-realtime20_150_11 (UNIX)
set JAVA_HOME=BEA_HOME_WLRT
\jrockit-realtime20_150_11 (Windows)
where BEA_HOME_WLRT
refers to the installation directory of Oracle JRockit Real Time 2.0, such as /beahome_wlrt
(UNIX) or c:\beahome_wlrt
(Windows).
prompt> cd C:\bea_wlevs\wlevs30\samples\domains\helloworld_domain\defaultserver
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 2.0, enable the deterministic garbage collector by passing the -dgc
parameter to the command:
prompt> startwlevs.cmd -dgc
To stop a running Oracle CEP server instance:
prompt> cd C:\bea_wlevs\wlevs30\samples\domains\helloworld_domain\defaultserver
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:rmi:///jndi/rmi://
host:jmxport/
jmxrmi
, where host
refers to the computer hosting the server and jmxport
refers to the server’s JMX port, configured in config.xml
file. For example:
prompt> stopwlevs.sh -url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
In the example, the host is ariel
and the JMX port is 1099
.
See
Table 5-1, Connection Arguments, on page 5-6 for additional details about the -url
argument.
After creating your own Oracle CEP domain: