WebLogic Event Server Administration and Configuration Guide

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

wlevs.Admin Command-Line Reference

The following sections describe the wlevs.Admin utility:

 


Overview of the wlevs.Admin Utility

The wlevs.Admin utility is a command-line interface to administer WebLogic Event Server and, in particular, dynamically configure the EPL rules for application processors. The utility internally uses JMX to query the configuration and runtime MBeans of both the server and deployed applications.

The WebLogic Event Server configuration framework allows concurrent changes to both the application and server configuration by multiple users. The framework does not use locking to manage this concurrency, but rather uses optimistic version-based concurrency. This means that two users can always view the configuration of the same object with the intention to update it, but only one user is allowed to commit their changes. The other user will then get an error if they try to update the same configuration object, and must refresh their session to view the updated configuration.

Each command of the wlevs.Admin utility runs in its own transaction, which means that there is an implicit commit after each execution of a command. If you want to batch multiple configuration changes in a single transaction, you must use JMX directly to make these changes rather than the wlevs.Admin utility.

 


Required Environment for the wlevs.Admin Utility

To set up your environment for the wlevs.Admin utility:

  1. Install and configure the WebLogic Event Server software, as described in the WebLogic Event Server Installation Guide.
  2. Configure JMX connectivity for the domain you want to administer. See Configuring JMX for WebLogic Event Server.
  3. Open a command window and set your environment as described in Setting Up Your Development Environment.
  4. 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 BEA_HOME/wlevs20/bin/com.bea.wlevs.management.commandline_2.0.0.0.jar file, where BEA_HOME refers to the main BEA Home directory into which you installed WebLogic Event Server. When you use the -jar argument, you do not specify the wlevs.Admin utility name at the command line. For example
    • prompt> java -jar d:/beahome/wlevs20/bin/com.bea.wlevs.management.commandline_2.0.0.0.jar
      -url service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
      UPLOAD -application helloworld -processor helloworldProcessor
      -sourceURL file:///d:/test/newrules2.xml
    • Explicitly update your CLASSPATH by adding the following files to the CLASSPATH environment variable:
      • BEA_HOME/wlevs20/bin/com.bea.wlevs.management.commandline_2.0.0.0.jar
      • BEA_HOME/wlevs20/bin/wlevs_2.0.jar
      • BEA_HOME/wlevs20/modules/com.bea.wlevs.deployment.server_2.0.0.0.jar
      • BEA_HOME/wlevs20/modules/com.bea.wlevs.ede_2.0.0.0.jar
      • BEA_HOME/wlevs20/modules/com.bea.wlevs.management_2.0.0.0.jar
      • BEA_HOME/modules/com.bea.core.jmx_3.0.0.0.jar
      • BEA_HOME/modules/com.bea.core.jndi.context_3.0.0.0.jar
      • BEA_HOME/modules/com.bea.core.rmi_3.0.0.0.jar
      • BEA_HOME/modules/com.bea.core.i18n_1.1.0.0.jar
      • BEA_HOME/modules/modules/com.bea.core.i18n.generator_1.1.0.0.jar
      • BEA_HOME/modules/com.bea.core.diagnostics.core_1.1.0.0.jar
      • BEA_HOME/modules/javax.xml.stream_1.1.0.0.jar
      • where BEA_HOME refers to the main BEA Home directory into which you installed WebLogic Event Server.

 


Running the wlevs.Admin Utility Remotely

Sometimes it is useful to run the wlevs.Admin 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 wlevs.Admin; you can copy the JAR files to the directory name of your choice:
    • BEA_HOME/wlevs20/bin/com.bea.wlevs.management.commandline_2.0.0.0.jar
    • BEA_HOME/wlevs20/modules/com.bea.wlevs.deployment.server_2.0.0.0.jar
    • BEA_HOME/wlevs20/modules/com.bea.wlevs.ede_2.0.0.0.jar
    • BEA_HOME/wlevs20/modules/com.bea.wlevs.management_2.0.0.0.jar
    • BEA_HOME/modules/com.bea.core.jmx_3.0.0.0.jar
    • BEA_HOME/modules/com.bea.core.jndi.context_3.0.0.0.jar
    • BEA_HOME/modules/com.bea.core.rmi_3.0.0.0.jar
    • BEA_HOME/modules/com.bea.core.i18n_1.1.0.0.jar
    • BEA_HOME/modules/modules/com.bea.core.i18n.generator_1.1.0.0.jar
    • BEA_HOME/modules/com.bea.core.diagnostics.core_1.1.0.0.jar
    • BEA_HOME/modules/javax.xml.stream_1.1.0.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.management.commandline_2.0.0.0.jar file, where NEW_DIRECTORY refers to the directory on the remote computer into which you copied the required JAR files. When you use the -jar argument, you do not specify the wlevs.Admin utility name at the command line.
    • Explicitly update your CLASSPATH by adding all the files you copied to the remote computer to your CLASSPATH environment variable:
  3. Invoke the wlevs.Admin utility as described in the next section.

 


Syntax for Invoking the wlevs.Admin Utility

The syntax for using the wlevs.Admin utility is as follows:

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
COMMAND-NAME command-arguments

The command names and arguments are not case sensitive.

The following sections provide detailed syntax information about the arguments you can supply to the wlevs.Admin utility:

The following sections provide detailed syntax information about the supported commands of the wlevs.Admin utility:

Example Environment

In many of the examples throughout the sections that follow, it is assumed that a certain environment has been set up:

Exit Codes Returned by wlevs.Admin

All wlevs.Admin commands return an exit code of 0 if the command succeeds and an exit code of 1 if the command fails.

To view the exit code from a Windows command prompt, enter echo %ERRORLEVEL% after you run a wlevs.Admin command. To view the exit code in a bash shell, enter echo $?.

wlevs.Admin calls System.exit(1) if an exception is raised while processing a command, causing Ant and other Java client JVMs to exit.

 


Connection Arguments

java wlevs.Admin 
[ {– url URL} ]
[ User Credentials Arguments ]
[ Common Arguments ]
COMMAND-NAME command-arguments

When you invoke most wlevs.Admin commands, you specify the arguments in Table 5-1 to connect to a WebLogic Event Server instance.

Table 5-1 Connection Arguments 
Argument
Definition
-url service:jmx:rmi:///jndi/rmi://host:jmxport/jmxrmi
Specifies the URL that establishes a JMX connection to the WebLogic Event Server instance you want to administer, where:
  • host refers to the name of the computer on which the WebLogic Event Server instance is running.
  • jmxport refers to the port configured for WebLogic Event Server that listens to JMX connections.
  • This port is configured in the config.xml file of the WebLogic Event Server domain you are administering. In particular, you specify the port using the <rmi-registry-port> child element of the <jmx> element, as shown:

    <jmx>
    <jndi-service-name>JNDI</jndi-service-name>
    <rmi-service-name>RMI</rmi-service-name>
    <rmi-registry-port>1099</rmi-registry-port>
    <rmi-jrmp-port>9999</rmi-jrmp-port>
    </jmx>

    In the example, the JMX port is 1099.

Other than host and jmxport, you specify the remainder of the URL as written.
For example, if WebLogic Event Server is running on a computer with hostname ariel, and the JMX listening port is 1099, then the URL would be:
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
See Configuring JMX for WebLogic Event Server for details about configuring JMX, JNDI, and RMI for WebLogic Event Server.

 


User Credentials Arguments

java wlevs.Admin 
[ Connection Arguments ]
[ -username username [-password password] ]
[ Common Arguments ]
COMMAND-NAME command-arguments

When you invoke most wlevs.Admin commands, you specify the arguments in Table 5-2 to provide the user credentials of a WebLogic Event Server user who has permission to invoke the command.

If security has not been enabled for your WebLogic Event Server domain, then you do not have to provide user credentials.

Table 5-2 User Credentials Arguments 
Argument
Definition
-username username
The name of the user who is issuing the command. This user must have appropriate permission to view or modify the target of the command.
-password password
The password that is associated with the username.

Note: The exit code for all commands is 1 if the wlevs.Admin utility cannot connect to the server or if the WebLogic Event Server instance rejects the username and password.

 


Common Arguments

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ -verbose ]
COMMAND-NAME command-arguments

All wlevs.Admin commands support the argument in Table 5-3 to get verbose output.

Table 5-3 Common Arguments 
Argument
Definition
-verbose
Specifies that wlevs.Admin should output additional verbose information.

 


Command for Getting Usage Help

HELP

Provides syntax and usage information for all WebLogic Event Server commands (by default) or for a single command if a command value is specified on the HELP command line.

You can issue this command from any computer on which the WebLogic Event Server is installed. You do not need to start a server instance to invoke this command, nor do you need to supply user credentials, even if security is enabled for the server.

Syntax

java wlevs.Admin HELP [COMMAND]

The COMMAND argument can be:

Example

In the following example, information about using the UPLOAD command is requested:

prompt> java wlevs.Admin HELP ULOAD

The command returns the following:

Description:
Uploads rules to be configured in the EPL Processor.
Usage: 
java wlevs.Admin
[-url | -listenAddress <host-name> -listenPort <port>]
-username <username> -password <password>
UPLOAD -application <application name> -processor <eplprocessor name> -sourceURL "source url"
Where:
-application = Name of the application.
-processor = Name of the EPL Processor.
-sourceURL = source URL containing the rules in an XML format.
java wlevs.Admin -url service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi -username wlevs -password wlevs UPLOAD -application myapplication -processor eplprocessor -sourceURL file:///d:/test/rules.xml

 


Commands for Managing the Server Life Cycle

Table 5-4 is an overview of commands that manage the life cycle of a server instance. Subsequent sections describe command syntax and arguments, and provide an example for each command.

Table 5-4 Overview of Commands for Managing the Server Life Cycle 
Command
Description
Gracefully shuts down a WebLogic Event Server.

SHUTDOWN

Gracefully shuts down the specified WebLogic Event Server instance.

A graceful shutdown gives WebLogic Event Server time to complete certain application processing currently in progress.

The -url connection argument specifies the particular WebLogic Event Server instance that you want to shut down, based on the host and jmxport values. See Connection Arguments for details.

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
SHUTDOWN [-scheduleAt seconds]

Table 5-5 SHUTDOWN Arguments
Argument
Definition
-scheduleAt seconds
Specifies the number of seconds after which the WebLogic Event Server instance shuts down.
If you do not specify this parameter, the server instance shuts down immediately.

Example

The following example instructs the specified WebLogic Event Server instance to shut down in ten minutes:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
SHUTDOWN -scheduleAt 600
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

After you issue the command, the server instance prints messages to its log file and to its standard out. The messages indicate that the server state is changing and that the shutdown sequence is starting.

 


Commands for Managing the EPL Rules of an Application

Table 5-4 is an overview of commands that manage the EPL rules for a particular processor of a WebLogic Event Server application. Subsequent sections describe command syntax and arguments, and provide an example for each command.

Table 5-6 Overview of Commands for Managing Application EPL Rules
Command
Description
Adds a new EPL rule to the processor of a WebLogic Event Server application.
Deletes an existing EPL rule from the processor of a WebLogic Event Server application.
Returns the text of an existing EPL rule of the processor of a WebLogic Event Server application.
Configures a set of EPL rules for a processor of a WebLogic Event Server application by uploading the rules from an XML file.
Downloads the set of EPL rules associated with a processor of a WebLogic Event Server application to a file.

ADDRULE

Adds a new EPL rule to the specified processor of a WebLogic Event Server application.

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
ADDRULE -application application -processor processor -rule [rulename] rulestring

Table 5-7 ADDRULE Arguments
Argument
Definition
-application application
Specifies the name of the WebLogic Event Server application whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on using wlevs.Admin to get the exact name of your application if you do not currently know it.
You can also get the exact application name by looking at the MANIFEST.MF file of the application; the application name is specified by the Bundle-SymbolicName header.
-processor processor
Specifies the name of the particular processor, attached to the WebLogic Event Server application specified with the -application argument, whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on getting the exact name if you do not know it.
-rule [rulename] rulestring
Specifies the EPL rule you want to add to the specified processor of your application.
The rulename parameter is not required; if you do not specify it, WebLogic Event Server generates a name for you.
Enter the EPL rules using double quotes.

Example

The following example shows how to add the EPL rule SELECT * FROM Withdrawal RETAIN 5 EVENTS, with name myrule, to the helloworldProcessor of the helloworld application deployed to the specified WebLogic Event Server application:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
ADDRULE – application helloworld – processor helloworldProcessor
– rule myrule "SELECT * FROM Withdrawal RETAIN 5 EVENTS"
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

DELETERULE

Deletes an existing EPL rule from the specified processor of a WebLogic Event Server application.

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
DELETERULE -application application -processor processor -rule rulename

Table 5-8 DELETERULE Arguments
Argument
Definition
-application application
Specifies the name of the WebLogic Event Server application whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on using wlevs.Admin to get the exact name of your application if you do not currently know it.
You can also get the exact application name by looking at the MANIFEST.MF file of the application; the application name is specified by the Bundle-SymbolicName header.
-processor processor
Specifies the name of the particular processor, attached to the WebLogic Event Server application specified with the -application argument, whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on getting the exact name if you do not know it.
-rule rulename
Specifies the name of the EPL rule you want to delete.
See Querying for Application and Processor Names for details on querying for the rule name if you do not know it. You can also use the DOWNLOAD command to get the list of rules for a particular processor.

Example

The following example shows how to delete the EPL rule called myrule from the helloworldProcessor of the helloworld application deployed to the specified WebLogic Event Server application:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
DELETERULE – application helloworld – processor helloworldProcessor
– rule myrule
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

GETRULE

Returns the full text of an EPL rule from the specified processor of a WebLogic Event Server application.

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
GETRULE -application application -processor processor -rule rulename

Table 5-9 GETRULE Arguments
Argument
Definition
-application application
Specifies the name of the WebLogic Event Server application whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on using wlevs.Admin to get the exact name of your application if you do not currently know it.
You can also get the exact application name by looking at the MANIFEST.MF file of the application; the application name is specified by the Bundle-SymbolicName header.
-processor processor
Specifies the name of the particular processor, attached to the WebLogic Event Server application specified with the -application argument, whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on getting the exact name if you do not know it.
-rule rulename
Specifies the name of the EPL rule for which you want to view its full text.
See Querying for Application and Processor Names for details on querying for the rule name if you do not know it. You can also use the DOWNLOAD command to get the list of rules for a particular processor.

Example

The following example shows how to get the full text of the EPL rule called myrule from the helloworldProcessor of the helloworld application deployed to the specified WebLogic Event Server application:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
GETRULE – application helloworld – processor helloworldProcessor
– rule myrule
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

UPLOAD

Replaces the configured EPL rules for a specified processer with the EPL rules from an uploaded XML file.

The XML file that contains the list of EPL rules conforms to the processor configuration XSD Schema. This file contains one or more EPL rules that will replace those currently configured for the specified processor. An example of the XML file is as follows:

<?xml version="1.0" encoding="UTF-8" ?> 
<config >
<processor>
<name>helloworldProcessor</name>
<rules>
<rule id="helloworldRule1">
<![CDATA[ SELECT * FROM HelloWorldEvent RETAIN 2 EVENTS ]]>
</rule>
</rules>
</processor>
</config>

In the preceding example, the XML file configures a single rule, with name helloworldRule1, and its EPL query text is SELECT * FROM HelloWorldEvent RETAIN 2 EVENTS.

WARNING: When you use the UPLOAD command of the wlevs.Admin utility, you use the -processor argument to specify the name of the processor to which you want to add the EPL rules, as you do with the other EPL commands. This means that the utility ignores any <name> elements in the XML file to avoid any naming conflicts.

See Configuring the Complex Event Processor Rules for details and examples of creating the EPL rule XML file.

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
UPLOAD -application application -processor processor -sourceURL sourcefileURL

Table 5-10 UPLOAD Arguments
Argument
Definition
-application application
Specifies the name of the WebLogic Event Server application whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on using wlevs.Admin to get the exact name of your application if you do not currently know it.
You can also get the exact application name by looking at the MANIFEST.MF file of the application; the application name is specified by the Bundle-SymbolicName header.
-processor processor
Specifies the name of the particular processor, attached to the WebLogic Event Server application specified with the -application argument, whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on getting the exact name if you do not know it.
-sourceURL sourcefileURL
Specifies the URL of the XML file that contains the EPL rules.

Example

The following example shows how upload the EPL rules in the c:\processor\config\myrules.xml file to the helloworldProcessor of the helloworld application deployed to the specified WebLogic Event Server application:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
UPLOAD – application helloworld – processor helloworldProcessor
– sourceURL file:///c:/processor/config/myrules.xml
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

DOWNLOAD

Downloads the set of EPL rules associated with the specified processor of a WebLogic Event Server application to an XML file.

The XML file is of the same format as described in UPLOAD.

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
DOWNLOAD -application application -processor processor
-file destinationfile [-overwrite overwrite]

Table 5-11 DOWNLOAD Arguments
Argument
Definition
-application application
Specifies the name of the WebLogic Event Server application whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on using wlevs.Admin to get the exact name of your application if you do not currently know it.
You can also get the exact application name by looking at the MANIFEST.MF file of the application; the application name is specified by the Bundle-SymbolicName header.
-processor processor
Specifies the name of the particular processor, attached to the WebLogic Event Server application specified with the -application argument, whose EPL rules you want to manage.
See Querying for Application and Processor Names for details on getting the exact name if you do not know it.
-file destinationfile
Specifies the name of the XML file to which you want the wlevs.Admin utility to download the EPL rules.
Be sure you specify the full pathname of the file.
-overwrite overwrite
Specifies whether the wlevs.Admin utility should overwrite an existing file.
Valid values for this argument are true or false; default value is false.

Example

The following example shows how download the set of EPL rules currently attached to the helloworldProcessor of the helloworld application to the file c:\processor\config\myrules.xml; the utility overwrites any existing file:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
DOWNLOAD – application helloworld – processor helloworldProcessor
– file c:\processor\config\myrules.xml
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

 


Commands for Managing WebLogic Event Server MBeans

The following sections describe wlevs.Admin commands for managing WebLogic Event Server MBeans.

See the Javadoc for the full description of the WebLogic Event Server MBeans.

Specifying MBean Types

To specify which MBean or MBeans you want to access, view, or modify, all of the MBean management commands require either the -mbean argument or the -type argument.

Use the -mbean argument to operate on a single instance of an MBean.

Use the -type argument to operate on all MBeans that are an instance of a type that you specify. An MBean's type refers to the interface class of which the MBean is an instance. All WebLogic Event Server MBeans are an instance of one of the interface classes defined in the com.bea.wlevs.management.configuration, com.bea.wlevs.management.runtime, com.bea.wlevs.deployment.mbean and com.bea.wlevs.server.management.mbean packages. . For a complete list of all WebLogic Event Server MBean interface classes, see the Javadocs for the respective packages.

To determine the value that you provide for the -type argument, do the following: Find the MBean's interface class and remove the MBean suffix from the class name. For example, for an MBean that is an instance of the com.bea.wlevs.management.configuration.EPLProcessorMBean, use EPLProcessor.

MBean Management Commands

Table 5-12 is an overview of the MBean management commands.

Table 5-12 MBean Management Command Overview 
Command
Description
Displays properties of MBeans.
Invokes management operations that an MBean exposes for its underlying resource.
Searches for MBeans whose ObjectName matches a pattern that you specify.
Sets the specified property values for the named MBean instance.

GET

Displays MBean properties (attributes) and JMX object names (in the javax.management.ObjectName format).

The output of the command is as follows:

{MBeanName object-name {property1 value} {property2 value}. . .} 
. . .

Note that the properties and values are expressed as name-value pairs, each of which is returned within curly brackets. This format facilitates parsing of the output by a script.

If -pretty is specified, each property-value pair is displayed on a new line and curly brackets are not used to separate the pairs:

MBeanName: object-name
property1
: value
property2
: value
.
.
.
MBeanName:
object-name
property1
: value
abbribute2
: value

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
GET [-pretty] {– type mbeanType|– mbean objectName} [– property property1] [– property property2]...

Table 5-13 GET Arguments
Argument
Definition
-type mbeanType
Returns information for all MBeans of the specified type. For more information, see Specifying MBean Types.
-mbean objectName
Fully qualified object name of an MBean in the javax.management.ObjectName format.
For example, if you want to look up an MBean for an EPL Processor Stage, the naming is as follows
"com.bea.wlevs:Name=<Name of the Stage>,Type=<type of Mbean>, Application=<name of the application>"
-pretty
Places property-value pairs on separate lines.
-property property
The name of the MBean property (attribute) or properties to be listed.

Note: If property is not specified using this argument, all properties are displayed.

Example

The following example displays all properties of the EPLProcessorMBean that was registered for the Processor Stage when the application called helloworld was deployed in Weblogic Event Server.

prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
GET -pretty
-mbean com.bea.wlevs:Name=eplprocessor,Type=EPLProcessor,Application=helloworld
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

For more information about the environment in which this example runs, see Example Environment.

The following example displays all instances of all EPLProcessorMBean MBeans.

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
GET -pretty -type EPLProcessor

INVOKE

Invokes a management operation for one or more MBeans. For WebLogic Event Server MBeans, you usually use this command to invoke operations other than the getAttribute and setAttribute that most WebLogic Event Server MBeans provide.

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
INVOKE {– type mbeanType|– mbean objectName} – method methodname [argument . . .]

Table 5-14 INVOKE Arguments
Arguments
Definition
-type mbeanType
Invokes the operation on all MBeans of a specific type. For more information, see Specifying MBean Types.
-mbean objectName
Fully qualified object name of an MBean in the javax.management.ObjectName format.
For example, if you want to invoke an MBean for an EPL Processor Stage, the naming is as follows
"com.bea.wlevs:Name=<Name of the Stage>,Type=<type of Mbean>, Application=<name of the application>"
-method methodname
Name of the method to be invoked.
argument
Arguments to be passed to the method call.
When the argument is a String array, the arguments must be passed in the following format:
"String1;String2;. . . "

Example

The following example invokes the addRule method of the com.bea.wlevs.configuration.application.DefaultProcessorConfig MBean:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
INVOKE -mbean com.bea.wlevs:Name=eplprocessor,Type=EPLProcessor,Application=helloworld
-method addRule "SELECT * FROM Withdrawal RETAIN ALL"
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

For more information about the environment in which this example runs, see Example Environment.

QUERY

Searches for WebLogic Event Server MBeans whose javax.management.ObjectName matches a pattern that you specify.

All MBeans that are created from a WebLogic Event Server MBean type are registered in the MBean Server under a name that conforms to the javax.management.ObjectName conventions. You must know an MBean’s ObjectName if you want to use wlevs.Admin commands to retrieve or modify specific MBean instances.

The output of the command is as follows:

{MBeanName object-name {property1 value} {property2 value}. . .} 
. . .

Note that the properties and values are expressed as name-value pairs, each of which is returned within curly brackets. This format facilitates parsing of the output by a script.

If -pretty is specified, each property-value pair is displayed on a new line and curly brackets are not used to separate the pairs:

MBeanName: object-name
property1
: value
property2
: value
.
.
.
MBeanName:
object-name
property1
: value
abbribute2
: value

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
QUERY -pretty – pattern object-name-pattern

Table 5-15 QUERY Arguments
Argument
Definition
-pretty
Places property-value pairs on separate lines.
-pattern object-name-pattern
A partial javax.management.ObjectName for which the QUERY command searches. The value must conform to the following pattern:
property-list
where property-list specifies one or more components (property-value pairs) of a javax.management.ObjectName.
You can specify these property-value pairs in any order.
Within a given naming property-value pair, there is no pattern matching. Only complete property-value pairs are used in pattern matching. However, you can use the * wildcard character in the place of one or more property-value pairs.
For example, type=epl* is not valid, but type=EPLProcessor,* is valid.
If you provide at least one property-value pair in the property-list, you can locate the wildcard anywhere in the given pattern, provided that the property-list is still a comma-separated list.

Example

The following example searches for all com.bea.wlevs.configuration.application.DefaultProcessorConfig MBeans:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
QUERY -pattern *:Type=EPLProcessor,*
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

If the command succeeds, it returns the following:

Ok

For more information about the environment in which this example runs, see Example Environment.

Querying for Application and Processor Names

All the commands for managing the EPL rules of a WebLogic Event Server application require you know the name of the application, as well the particular processor to which you want to apply the rules. Typically you know these names, but if you do not, you can use the QUERY command to get the information from the MBean instances that represent applications and their attached processors.

In particular, use the following -pattern argument to get a list of all applications, processors, and rules for a given WebLogic Event Server instance:

  -pattern  com.bea.wlevs:*,Type=EPLProcessor 

For example:

prompt> java wlevs.Admin -url  
service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
QUERY -pretty
-pattern com.bea.wlevs:*,Type=EPLProcessor

A sample output of this command is shown below:

Command Output
------------------------------------------------------
MBeanName: "com.bea.wlevs:Name=helloworldProcessor,Type=EPLProcessor,Application=helloworld,"
AllRules:
helloworldRule = select * from HelloWorldEvent retain 1 event
--end of command output --------

In the sample output above:

SET

Sets the specified property (attribute) values for an MBean.

If the command is successful, it returns OK and saves the new values to the server configuration.

Syntax

java wlevs.Admin 
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
SET {– type mbeanType|– mbean objectName}
– property property1 property1_value
[-property property2 property2_value] . . .

Table 5-16 SET Arguments
Argument
Definition
-type mbeanType
Sets the properties for all MBeans of a specific type. For more information, see Specifying MBean Types.
-mbean objectName
Fully qualified object name of an MBean in the javax.management.ObjectName format:
"com.bea.wlevs:Name=<name of the stage>,Type=<MBean type>,Application=<name of the deployed application>"
-property property
The name of the property to be set.
property _value
The value to be set.
  • Some properties require you to specify the name of a WebLogic Event Server MBean. In this case, specify the fully qualified object name of an MBean in the javax.management.ObjectName format. For example:
    "com.bea.wlevs:Name=<name of the stage>,Type=<type of MBean>,Application=<name of the application>"
  • When the property value is an MBean array, separate each MBean object name by a semicolon and surround the entire property value list with quotes. For example:
    "com.bea.wlevs:Application=<name of the application>,Type=<type of MBean>,Name=<name of the Stage>;Type=<type of MBean>,Name=<name of the stage>"
  • When the property value is a String array, separate each string by a semicolon and surround the entire property value list with quotes:
"String1;String2;. . . "
  • When the property value is a String or String array, you can set the value to null by using either of the following:
  • -property property-name ""
    -property property-name

  • If the property value contains spaces, surround the value with quotes:
  • "-Da=1 -Db=3"

Example

The following example shows how to set the MaxSize property of the stream named helloworldOutstream of the helloworld application:

prompt> java wlevs.Admin 
-url service:jmx:rmi:///jndi/rmi://ariel:1099/jmxrmi
-username wlevs -password wlevs
SET -mbean com.bea.wlevs:Name=helloworldOutstream,Type=Stream,Application=helloworld
-property MaxSize 1024
Note: For clarity, the preceding example is shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.

For more information about the environment in which this example runs, see Example Environment.


  Back to Top       Previous  Next