This section contains information on the following subjects:
The Deployer
is a Java-based deployment utility that provides administrators and developers command-line based operations for deploying Oracle CEP applications. In the context of Oracle CEP deployment, an application is defined as an OSGi bundle at http://www.osgi.org/
JAR file that contains the following artifacts:
The compiled Java class files that implement some of the components of the application, such as the adapters, adapter factory, and POJO that contains the business logic.
One or more Oracle CEP configuration XML files that configure the components of the application, such as the processor, adapter, or streams.
The configuration files must be located in the META-INF/wlevs
directory of the OSGi bundle JAR file.
An EPN assembly file that describes all the components of the application and how they are connected to each other. The EPN assembly file extends the standard Spring context file.
The EPN assembly file must be located in the META-INF/spring
directory of the OSGi bundle JAR file.
A MANIFEST.MF
file that describes the contents of the JAR.
See "Assembling an Oracle CEP Application" in the Oracle CEP Developer's Guide for Eclipse for detailed instructions on creating this deployment bundle.
The Deployer utility uses HTTP to connect to Oracle CEP, which means that you must configure Jetty for the server instance to which you are deploying your application. For details, see "Configuring Jetty" in the Oracle CEP Administrator's Guide.
Oracle CEP uses the deployments.xml
file to internally maintain its list of deployed application OSGi bundles. This file is located in the DOMAIN_DIR/servername
directory, where DOMAIN_DIR
refers to the main domain directory correspoding to the server instance to which you are deploying your application and servername
refers to the server instance itself. For more information, see "Component Configuration XSD Schemas" in the Oracle CEP Administrator's Guide.
Caution:
The XSD for thedeployments.
xml file is provided for your information only; Oracle does not recommend updating the deployments.xml
file manually.Before you can use the Deployer utility, you must configure your environment appropriately.
To configure the Deployer utility environment:
Install and configure the Oracle CEP software, as described in "Installing Oracle CEP" in the Oracle CEP Getting Started.
Open a command window and set your environment as described in "Setting Your Development Environment" in the Oracle CEP Getting Started.
Update your CLASSPATH
variable to include the wlevsdeploy.jar JAR
file, located in the ORACLE_CEP_HOME
/ocep_11.1/bin
directory where, ORACLE_CEP_HOME
refers to the main Oracle CEP installation directory, such as /oracle_cep
.
Sometimes it is useful to run the Deployer
utility on a computer different from the computer on which Oracle CEP is installed and running.
To run the Deployer utility remotely:
Copy the following JAR files from the computer on which Oracle CEP is installed to the computer on which you want to run the deployer utility; you can copy the JAR files to the directory name of your choice:
ORACLE_CEP_HOME
/ocep_11.1/bin/
wlevsdeploy.jar
where ORACLE_CEP_HOME
refers to the main directory into which you installed Oracle CEP.
Set your CLASSPATH
in one of the following ways:
Implicitly set your CLASSPATH
by using the -jar
argument when you run the utility; set the argument to the NEW_DIRECTORY/
wlevsdeploy.jar
file, where NEW_DIRECTORY
refers to the directory on the remote computer into which you copied the required JAR file. When you use the -jar
argument, you do not specify the Deployer
utility name at the command line.
Explicitly update your CLASSPATH
by adding the JAR file you copied to the remote computer to your CLASSPATH
environment variable:
Invoke the Deployer
utility as described in the next section.
The syntax for using the Deployer utility is as follows:
java -jar wlevsdeploy.jar [Connection Arguments] [User Credential Arguments] [Deployment Commands]
The following sections describe the various arguments and commands you can use with the Deployer utility. See Appendix B, "Examples of Using the Deployer Utility" for specific examples of using the utility.
Table B-1 lists the connection arguments you can specify with the Deployer utility.
Table B-1 Connection Arguments
Argument | Description |
---|---|
-url url
|
Specifies the URL of the deployer of the Oracle CEP instance to which you want to deploy the OSGI bundle. The URL takes the following form: http://host:port/wlevsdeployer where:
For example, if Oracle CEP is running on host http://ariel:9002/wlevsdeployer |
Table B-2 lists the user credential arguments you can specify with the Deployer utility.
Table B-2 User Credential Arguments
Argument | Description |
---|---|
-user username
|
Username of the Oracle CEP administrator. If you supply the |
-password password
|
Password of the Oracle CEP administrator. NOTE: this argument is deprecated and may be removed in a later release. Oracle recommends that you do not use this argument. |
Table B-3 lists the deployment commands you can specify with the Deployer utility.
Command | Description |
---|---|
-install bundle
|
Installs the specified OSGi bundle to the specified Oracle CEP instance. The Be sure to specify the full pathname of the bundle if it is not located relative to the directory from which you are running the Deployer utility. In particular, Oracle CEP:
|
-update bundle
|
Updates the existing OSGi bundle with new application code. The Be sure to specify the full pathname of the bundle if it is not located relative to the directory from which you are running the Deployer utility. In particular, Oracle CEP:
|
-uninstall name
|
Removes the existing bundle from the specified Oracle CEP instance. The Bundle-SymbolicName: myApp In particular, Oracle CEP:
|
-suspend name
|
Suspends a currently running OSGI bundle which was previously installed to the specified Oracle CEP instance. The Bundle-SymbolicName: myApp |
-resume name
|
Resumes a previously suspended OSGI bundle on the specified Oracle CEP instance; the configured adapters once again start immediately receiving incoming data. The Bundle-SymbolicName: myApp |
-group groupname
|
Specifies that the deploy command (install, uninstall, update, suspend, or resume) applies to a target group, or more specifically, to the set of running servers within that group. To specify the domain group, use the keyword -group all To specify a custom group, simply specify the name of the group: -group my_group |
-status name
|
Returns status information about a currently installed OSGi bundle. The Bundle-SymbolicName: myApp |
-startLevel startLevel
|
Specifies the level at which the OSGi bundle is started. Bundles with smaller numbers are started first. System bundles have start levels of under 7. |
The following examples show how to use the Deployer utility. In all the examples, Oracle CEP is running on host ariel
, listening at port 9002
, and the username/password of the server administrator is wlevs/wlevs
, respectively. For clarity, the examples are shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.
prompt> java -jar wlevsdeploy.jar -url http://ariel:9002/wlevsdeployer -user wlevs -password wlevs -install /application/bundles/com.my.exampleApp_1.0.0.0.jar
The preceding example shows how to install an OSGi bundle called com.my.exampleApp_1.0.0.0.jar
, located in the /application/bundles
directory.
The next command shows how to resume this application after it has been suspended:
prompt> java com.bea.wlevs.deployment.Deployer -url http://ariel:9002/wlevsdeployer -user wlevs -password wlevs -resume exampleApp
The next example shows how to uninstall the application, which removes all traces of it from the domain directory:
prompt> java com.bea.wlevs.deployment.Deployer -url http://ariel:9002/wlevsdeployer -user wlevs -password wlevs -uninstall exampleApp
The following example shows how to install an application called strategies_1.0.jar
to the strategygroup
; this example also shows how to use the -jar
command of the java
utility:
prompt> java -jar wlevsdeploy.jar -url http://ariel:9002/wlevsdeployer -install strategies_1.0.jar -group strategygroup