WebLogic Event Server Reference

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Deployer Command-Line Reference

This section contains information on the following subjects:

 


Overview of Using the Deployer Command-Line Utility

com.bea.wlevs.deployment.Deployer is a Java-based deployment utility that provides administrators and developers command-line based operations for deploying WebLogic Event Server applications. In the context of WebLogic Event Server deployment, an application is defined as an OSGi bundle JAR file that contains the following artifacts:

See Assembling a WebLogic Event Server Application: Main Steps for detailed instructions on creating this deployment bundle.

The Deployer utility uses HTTP to connect to WebLogic Event Server, which means that you must configure Jetty for the server instance to which you are deploying your application. For details, see Configuring WebLogic Event Server.

WebLogic Event Server uses the deployments.xml file to internally maintain its list of deployed application OSGi bundles. This file is located in in the DOMAIN_DIR directory, where DOMAIN_DIR refers to the main domain directory correspoding to the server instance to which you are deploying your application. See Deployment XSD Schema for information about this file.

WARNING: The XSD for the deployments.xml file is provided for your information only; BEA does not recommend updating the deployments.xml file manually.

 


Required Environment for the Deployer Utility

To set up your environment to use the com.bea.wlevs.deployment.Deployer utility:

  1. Install and configure the WebLogic Event Server software, as described in Installing WebLogic Event Server.
  2. Open a command window and set your environment as described in Setting Up Your Development Environment.
  3. Update your CLASSPATH variable to include the com.bea.wlevs.deployment.client_2.0.jar JAR file, located in the WLEVS_HOME/bin directory where, WLEVS_HOME refers to the main WebLogic Event Server installation directory, such as /beahome/wlevs20.
  4. Alternatively, you can later use the -jar option at the command line to call this JAR file, such as:

    prompt> java -jar /beahome/wlevs20/bin/com.bea.wlevs.deployment.client_2.0.jar -url ...

    It is assumed in the remainder of this section that you have updated your CLASSPATH and are going to call the com.bea.wlevs.deployment.Deployer class directly.

 


Running the Deployer Utility Remotely

Sometimes it is useful to run the com.bea.wlevs.deployment.Deployer utility on a computer different from the computer on which WebLogic Event Server is installed and running. To run the utility remotely, follow these steps:

  1. Copy the following JAR files from the computer on which WebLogic Event Server 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:
    • BEA_HOME/wlevs20/bin/com.bea.wlevs.deployment.client_2.0.jar
    • where BEA_HOME refers to the main BEA Home directory into which you installed WebLogic Event Server.

  2. 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/com.bea.wlevs.deployment.client_2.0.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 com.bea.wlevs.deployment.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:
  3. Invoke the com.bea.wlevs.deployment.Deployer utility as described in the next section.

 


Syntax for Invoking the Deployer Utility

The syntax for using the Deployer utility is as follows:

java  com.bea.wlevs.deployment.Deployer 
[Connection Arguments]
[User Credential Arguments]
[Deployment Commands]

The following sections describe the various arguments and commands you can use with the Deployer utility. See Examples of Using the Deployer Utility for specific examples of using the utility.

Connection Arguments

The following table describes the connection arguments you can specify with the Deployer utility.

Table 3-1 Connection Arguments
Argument
Description
-url url
Specifies the URL of the deployer of the WebLogic Event Server instance to which you want to deploy the OSGI bundle.
The URL takes the following form:

http://host:port/wlevsdeployer

where:
  • host refers to the hostname of the computer on which WebLogic Event Server is running.
  • port refers to the port number to which WebLogic Event Server listens; its value is 9002 by default. This port is specified in the config.xml file that describes your WebLogic Event Server domain, located in the DOMAIN_DIR/config directory, where DOMAIN_DIR refers to your domain directory. The port number is the value of the <Port> child element of the <Netio> element:
  • <Netio>
    <Name>NetIO</Name>
    <Port>9002</Port>
    </Netio>

For example, if WebLogic Event Server is running on host ariel at port 9002, then the URL would be:

http://ariel:9002/wlevsdeployer

User Credential Arguments

The following table describes the user credential arguments you can specify with the Deployer utility.

Table 3-2 User Credential Arguments
Argument
Description
-user username
Username of the WebLogic Event Server administrator.
If you supply the -user option but you do not supply a corresponding -password option, the Deployer utility prompts you for the password.
-password password
Password of the WebLogic Event Server administrator.

Deployment Commands

The following table describes the deployment commands you can specify with the Deployer utility.

Table 3-3 Deployment Commands
Command
Description
-install bundle
Installs the specified OSGi bundle to the specified WebLogic Event Server instance.
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, WebLogic Event Server:
  • Copies the specified bundle to the domain directory.
  • Searches the META-INF/wlevs directory in the bundle for the component configuration files and extracts them to the domain directory.
  • Updates the internal deployment registry.
-update bundle
Updates the existing OSGi bundle with new application code.
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, WebLogic Event Server:
  • Copies the updated bundles to the domain directory.
  • Searches the META-INF/wlevs directory in the updated bundle for the updated component configuration files and extracts them to the domain directory.
  • Updates the internal deployment registry with the updated information.
-uninstall name
Removes the existing bundle from the specified WebLogic Event Server instance.
The name parameter refers to the symbolic name of the OSGi bundle that you want to remove. The symbolic name is the value of the Bundle-SymbolicName header in the bundle's MANIFEST.MF file:
Bundle-SymbolicName: myApp
In particular, WebLogic Event Server:
  • Removes the specified OSGi bundle from the domain directory.
  • Removes the bundles from the internal deployment registry .
-start name
Starts an OSGI bundle which was previously installed to the specified WebLogic Event Server instance.
The name parameter refers to the symbolic name of the OSGi bundle that you want to start. The symbolic name is the value of the Bundle-SymbolicName header in the bundle's MANIFEST.MF file:
Bundle-SymbolicName: myApp
-stop name
Stops an OSGI bundle that is currently running on the specified WebLogic Event Server instance.
The name parameter refers to the symbolic name of the OSGi bundle that you want to stop. The symbolic name is the value of the Bundle-SymbolicName header in the bundle's MANIFEST.MF file:
Bundle-SymbolicName: myApp
-status name
Returns status information about a currently installed OSGi bundle.
The name parameter refers to the symbolic name of the OSGi bundle for which you want status information. The symbolic name is the value of the Bundle-SymbolicName header in the bundle's MANIFEST.MF file:
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.

 


Examples of Using the Deployer Utility

The following examples show how to use the Deployer utility. In all the examples, WebLogic Event Server 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 com.bea.wlevs.deployment.Deployer 
-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 start this application after it has been installed:

prompt> java com.bea.wlevs.deployment.Deployer 
-url http://ariel:9002/wlevsdeployer -user wlevs -password wlevs
-start exampleApp

Finally, 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

  Back to Top       Previous  Next