The following sections describe the wlevs.Admin
utility:
The wlevs.Admin
utility is a command-line interface to administer Oracle Complex Event Processing (or Oracle CEP for short) and, in particular, dynamically configure the EPL rules for application processors and monitor the event latency and throughput of an application. The utility internally uses JMX to query the configuration and runtime MBeans of both the server and deployed applications.
The Oracle CEP 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.
To set up your environment for the wlevs.Admin
utility:
-jar
argument when you run the utility; set the argument to the ORACLE_CEP_HOME
/ocep_10.3/bin/wlevsadmin.jar
file, where ORACLE_CEP_HOME
refers to the main Oracle CEP installation directory. When you use the -jar
argument, you do not specify the wlevs.Admin
utility name at the command line. For exampleprompt> java -jar d:/oracle_cep/ocep_10.3/bin/wlevsadmin.jar
-url service:jmx:rmi:///jndi/rmi://localhost:9004/jmxrmi
UPLOAD -application helloworld -processor helloworldProcessor
-sourceURL file:///d:/test/newrules2.xml
ORACLE_CEP_HOME
/ocep_10.3/bin/wlevsadmin.jar
ORACLE_CEP_HOME
/ocep_10.3/bin/wlevs.jar
ORACLE_CEP_HOME
/ocep_10.3/modules/com.bea.wlevs.deployment.server_3.0.0.0.jar
ORACLE_CEP_HOME
/ocep_10.3/modules/com.bea.wlevs.ede_3.0.0.0.jar
ORACLE_CEP_HOME
/ocep_10.3/modules/com.bea.wlevs.management_3.0.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.jmx_6.0.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.jndi.context_6.0.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.rmi_6.0.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.i18n_1.4.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.diagnostics.core_2.1.0.0.jar
ORACLE_CEP_HOME
/modules/javax.xml.stream_1.1.1.0.jar
where ORACLE_CEP_HOME
refers to the main directory into which you installed Oracle CEP.
Sometimes it is useful to run the wlevs.Admin
utility on a computer different from the computer on which Oracle CEP is installed and running. To run the utility remotely, follow these steps:
wlevs.Admin
; you can copy the JAR files to the directory name of your choice:ORACLE_CEP_HOME
/ocep_10.3/bin/wlevsadmin.jar
ORACLE_CEP_HOME
/ocep_10.3/modules/com.bea.wlevs.deployment.server_3.0.0.0.jar
ORACLE_CEP_HOME
/ocep_10.3/modules/com.bea.wlevs.ede_3.0.0.0.jar
ORACLE_CEP_HOME
/ocep_10.3/modules/com.bea.wlevs.management_3.0.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.jmx_6.0.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.jndi.context_6.0.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.rmi_6.0.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.i18n_1.4.0.0.jar
ORACLE_CEP_HOME
/modules/com.bea.core.diagnostics.core_2.1.0.0.jar
ORACLE_CEP_HOME
/modules/javax.xml.stream_1.1.1.0.jar
where ORACLE_CEP_HOME
refers to the main directory into which you installed Oracle CEP.
-jar
argument when you run the utility; set the argument to the NEW_DIRECTORY/
wlevsadmin.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. wlevs.Admin
utility as described in the next section.
To use SSL when using the wlevs.Admin
command-line utility, you must first create a trust keystore, as described in the following steps:
DOMAIN_DIR
/
servername
/ssl
directory, where DOMAIN_DIR
refers to the main domain directory and servername
refers to the name of your server, such as d:\oracle_cep\user_projects\domains\mydomain\myserver\ssl
.prompt> java -jarORACLE_CEP_HOME
/ocep_10.3/utils/security/wlevsgrabcert.jarhost
:secureport
truststorepathtrustfile
truststorepasswordpassword
ORACLE_CEP_HOME
refers to the directory in which you installed Oracle CEP, such as d:\oracle_cep
.host
refers to the host on which Oracle CEP is runningsecureport
refers to the network i/o port configured for SSL; see How SSL Is Configured in Oracle CEP.trustfile
refers to the name of the generated trust keystore file; default is evstrust.jks
password
refers to the password you want to assign to the trust keystore file; default is changeit
.prompt> java -jar /oracle_cep/ocep_10.3/utils/security/wlevsgrabcert.jar ariel:9003 truststorepath clitrust.jks truststorepassword secret
To specify that the wlevs.Admin
command-line utility use this trust keystore file, use the following properties:
Also be sure to specify the secure port in the URL. For example:
prompt> java wlevs.Admin-Djavax.net.ssl.trustStore=clitrust.jks
-url service:jmx:rmi:///jndi/rmi://ariel:
-Djavax.net.ssl.trustStorePassword=secret9003
/jmxrmi
-username wlevs -password wlevs
SHUTDOWN -scheduleAt 600
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:
In many of the examples throughout the sections that follow, it is assumed that a certain environment has been set up:
Also, for clarity, all the examples are shown on multiple lines; however, when you run the command, enter all arguments and commands on a single line.
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.
java wlevs.Admin
[ {-urlURL
} | {-listenAddresshostname
-listenPortport
} ]
[ 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 an Oracle CEP instance.
Specifies the URL that establishes a JMX connection to the Oracle CEP instance you want to administer, where:
This port is configured in the
For example, if Oracle CEP is running on a computer with hostname ariel, and the JMX listening port is 9004, then the URL would be:
See Configuring JMX for Oracle Complex Event Processing for details about configuring JMX, JNDI, and RMI for Oracle CEP.
|
|
Specifies the name of computer on which the Oracle CEP instances is running. This argument, together with
-listenPort , is used to build the URL that establishes a JMX connection to the server you want to administer.
|
|
Specifies the port configured for Oracle CEP that listens to JMX connections. This argument, together with
-listenAddress , is used to build the URL that establishes a JMX connection to the server you want to administer.
The JMX port is configured in the
config.xml file of the Oracle CEP domain you are administering. In particular, the port is the <rmi-registry-port> child element of the <jmx> element, as shown:
See Configuring JMX for Oracle Complex Event Processing for details about configuring JMX, JNDI, and RMI for Oracle CEP.
|
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 an Oracle CEP user who has permission to invoke the command.
If security has not been enabled for your Oracle CEP domain, then you do not have to provide user credentials.
Note: | The exit code for all commands is 1 if the wlevs.Admin utility cannot connect to the server or if the Oracle CEP instance rejects the username and password. |
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.
Provides syntax and usage information for all Oracle CEP 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 Oracle CEP 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.
java wlevs.Admin HELP [COMMAND
]
In the following example, information about using the UPLOAD command is requested:
prompt> java wlevs.Admin HELP UPLOAD
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:9004/jmxrmi -username wlevs -password wlevs UPLOAD -application myapplication -processor eplprocessor -sourceURL file:///d:/test/rules.xml
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.
Gracefully shuts down the specified Oracle CEP instance.
A graceful shutdown gives Oracle CEP time to complete certain application processing currently in progress.
The -url
connection argument specifies the particular Oracle CEP instance that you want to shut down, based on the host
and jmxport
values. See Connection Arguments for details.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
SHUTDOWN[-scheduleAt
seconds
]
The following example instructs the specified Oracle CEP instance to shut down in ten minutes:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
SHUTDOWN -scheduleAt 600
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.
Table 5-6 is an overview of commands that manage the EPL rules for a particular processor of an Oracle CEP application. Subsequent sections describe command syntax and arguments, and provide an example for each command.
Adds a new EPL rule to the specified processor of an Oracle CEP application.
If a rule with the same name (identified with the rulename
parameter) already exists, then the ADDRULE
command replaces the existing rule with the new one.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
ADDRULE -applicationapplication
-processorprocessor
-rule[
rulename
]
rulestring
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP 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.
|
|
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:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
ADDRULE -application helloworld -processor helloworldProcessor
-rule myrule "SELECT * FROM Withdrawal RETAIN 5 EVENTS"
Deletes an existing EPL rule from the specified processor of an Oracle CEP application.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
DELETERULE -applicationapplication
-processorprocessor
-rule
rulename
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP 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.
|
|
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.
|
The following example shows how to delete the EPL rule called myrule
from the helloworldProcessor
of the helloworld
application:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
DELETERULE -application helloworld -processor helloworldProcessor
-rule myrule
Replaces an existing EPL rule with another rule. Oracle CEP first destroys the original rule and then inserts the new one in its place. If the original rule was parameterized, any existing bindings are applied to the new rule.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
REPLACERULE -applicationapplication
-processorprocessor
-rule
rulename
rulestring
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP 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.
|
|
The following example shows how to replace a rule called myrule
with the EPL text SELECT * FROM Withdrawal RETAIN 10 EVENTS
in the helloworldProcessor
of the helloworld
application:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
REPLACERULE -application helloworld -processor helloworldProcessor
-rule myrule "SELECT * FROM Withdrawal RETAIN 10 EVENTS"
Returns the full text of an EPL rule from the specified processor of an Oracle CEP application.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
GETRULE -applicationapplication
-processorprocessor
-rule
rulename
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP 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.
|
|
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.
|
The following example shows how to get the full text of the EPL rule called myrule
from the helloworldProcessor
of the helloworld
application:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
GETRULE -application helloworld -processor helloworldProcessor
-rule myrule
Adds a new set of parameters to a parameterized EPL query.
See Parameterized Queries for information about using parameterized EPL queries.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
ADDPARAMS -applicationapplication
-processorprocessor
-rule
rulename
-valuesvalues
-paramsparams
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP application specified with the
-application argument, whose parameterized 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.
|
|
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.
|
|
The following example shows how to use the ADDPARAMS command:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
ADDPARAMS -application myApplication -processor myProcessor
-rule MarketRule
-values "NYSE,BGP" -params nyBGP
The example shows how to add a parameter set identified by the string nyBGP
, with values NYSE,BGP
, to a parameterized query MarketRule
running in the myProcessor
component of myApplication
. Because the parameter set is composed of two values, the EPL query must contain two placeholders.
Deletes one or all set of parameters associated with a parameterized EPL query.
See Parameterized Queries for information about using parameterized EPL queries.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
DELETEPARAMS -applicationapplication
-processorprocessor
-rule
rulename
[-paramsparams
]
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP application specified with the
-application argument, whose parameterized 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.
|
|
Specifies the name of the parameterized EPL rule for which you want to delete one or all of its parameter sets.
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.
|
|
The following example shows how to use the DELETEPARAMS command:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
DELETEPARAMS -application myApplication -processor myProcessor
-rule MarketRule
-params nasORCL
The example shows how to delete the parameter set identified with the nasORCL string from the parameterized query MarketRule
running in the myProcessor
component of myApplication
.
To delete all parameter sets associated to the query, do not specify the -params
option:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
DELETEPARAMS -application myApplication -processor myProcessor
-rule MarketRule
Returns one or all the parameter sets currently bound to a parameterized EPL query.
See Parameterized Queries for information about using parameterized EPL queries.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
GETPARAMS -applicationapplication
-processorprocessor
-rule
rulename
[-paramsparams
]
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP application specified with the
-application argument, whose parameterized 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.
|
|
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.
|
|
The following example shows how to use the GETPARAMS command:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
GETPARAMS -application myApplication -processor myProcessor
-rule MarketRule
The example shows how to get all the parameters currently associated with the parameterized query MarketRule
running in the myProcessor
component of myApplication
. The command would return something like:
NASDAQ,ORCL
NYSE,JPM
NYSE,WFC
NYSE,BGP
To retrieve a particular parameter set, specify its ID using the -params
option:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
GETPARAMS -application myApplication -processor myProcessor
-rule MarketRule
-params nasORCL
Replaces the configured EPL rules for a specified processor 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.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
UPLOAD -applicationapplication
-processorprocessor
-sourceURL
sourcefileURL
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP 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.
|
|
The following example shows how upload the EPL rules in the c:\processor\config\myrules.xml
file to the helloworldProcessor
of the helloworld
application:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
UPLOAD -application helloworld -processor helloworldProcessor
-sourceURL file:///c:/processor/config/myrules.xml
Downloads the set of EPL rules associated with the specified processor of an Oracle CEP application to an XML file.
The XML file is of the same format as described in UPLOAD.
java wlevs.Admin
[ Connection Arguments ]
[ User Credentials Arguments ]
[ Common Arguments ]
DOWNLOAD -applicationapplication
-processorprocessor
-file
destinationfile
[-overwrite
overwrite
]
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.
|
|
Specifies the name of the particular processor, attached to the Oracle CEP 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.
|
|
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:9004/jmxrmi
-username wlevs -password wlevs
DOWNLOAD -application helloworld -processor helloworldProcessor
-file c:\processor\config\myrules.xml
The following sections describe wlevs.Admin
commands for managing Oracle CEP MBeans.
See the Javadoc for the full description of the Oracle CEP MBeans.
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 Oracle CEP 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 Oracle CEP 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
.
Table 5-16 is an overview of the MBean management commands.
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
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
GET [-pretty] {-typembeanType
| -mbeanobjectName
} [-propertyproperty1
] [-propertyproperty2
]...
Returns information for all MBeans of the specified type. For more information, see Specifying MBean Types.
|
|||
|
The following example displays all properties of the EPLProcessorMBean
that was registered for the Processor Stage when the application called helloworld
was deployed in Oracle CEP.
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
GET -pretty
-mbean com.bea.wlevs:Name=eplprocessor,Type=EPLProcessor,Application=helloworld
The following example displays all instances of all EPLProcessorMBean
MBeans.
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
GET -pretty -type EPLProcessor
Invokes a management operation for one or more MBeans. For Oracle CEP MBeans, you usually use this command to invoke operations other than the get
Attribute
and set
Attribute
that most Oracle CEP MBeans provide.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
INVOKE {-typembeanType
| -mbeanobjectName
} -methodmethodname
[argument
. . .]
Invokes the operation on all MBeans of a specific type. For more information, see Specifying MBean Types.
|
|
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:9004/jmxrmi
-username wlevs -password wlevs
INVOKE -mbean com.bea.wlevs:Name=eplprocessor,Type=EPLProcessor,Application=helloworld
-method addRule "SELECT * FROM Withdrawal RETAIN ALL"
Searches for Oracle CEP MBeans whose
javax.management.ObjectName
matches a pattern that you specify.
All MBeans that are created from an Oracle CEP 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
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
QUERY -pretty -patternobject-name-pattern
The following example searches for all com.bea.wlevs.configuration.application.DefaultProcessorConfig
MBeans:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
QUERY -pattern *:Type=EPLProcessor,*
If the command succeeds, it returns the following:
Ok
All the commands for managing the EPL rules of an Oracle CEP 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 Oracle CEP instance:
-pattern com.bea.wlevs:*,Type=EPLProcessor
prompt> java wlevs.Admin -url
service:jmx:rmi:///jndi/rmi://ariel:9004/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 --------
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.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
SET {-typembeanType
| -mbeanobjectName
}
-propertyproperty1
property1_value
[-propertyproperty2
property2_value
] . . .
Sets the properties for all MBeans of a specific type. For more information, see Specifying MBean Types.
|
|
|
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:9004/jmxrmi
-username wlevs -password wlevs
SET -mbean com.bea.wlevs:Name=helloworldOutstream,Type=Stream,Application=helloworld
-property MaxSize 1024
Table 5-21 is an overview of commands for managing event record and playback for a particular stage of an Oracle CEP application. Subsequent sections describe command syntax and arguments, and provide an example for each command.
Starts the recording of events for any particular stage of an Oracle CEP application.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
STARTRECORD -applicationapplication
-stagestage
Specifies the name of the Oracle CEP application whose event record and playback 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.
|
|
The following example shows how to start the recording of events on the helloworldAdapter
stage of the helloworld
application deployed to the specified Oracle CEP instance:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
STARTRECORD -application helloworld -stage helloworldAdapter
Enables the playing back of events of a particular stage of a Oracle CEP application.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
ENABLEPLAYBACK -applicationapplication
-stagestage
Specifies the name of the Oracle CEP application whose event record and playback 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.
|
|
The following example shows how to enable the playback of events on the helloworldAdapter
stage of the helloworld
application deployed to the specified Oracle CEP instance:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
ENABLEPLAYBACK -application helloworld -stage helloworldAdapter
Stops the recording of events for a stage of an Oracle CEP application in which the recording of events has been previously started.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
STOPRECORD -applicationapplication
-stagestage
Specifies the name of the Oracle CEP application whose event record and playback 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.
|
|
The following example shows how to stop the recording of events on the helloworldAdapter
stage of the helloworld
application deployed to the specified Oracle CEP instance; it is assumed that the recording of events was previously started for the stage:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
STOPRECORD -application helloworld -stage helloworldAdapter
Disables the playback of events for a stage of an Oracle CEP application in which the playback of events has been previously enabled.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
DISABLEPLAYBACK -applicationapplication
-stagestage
Specifies the name of the Oracle CEP application whose event record and playback 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.
|
|
The following example shows how to disable the playback of events on the helloworldAdapter
stage of the helloworld
application deployed to the specified Oracle CEP instance; it is assumed that the playback of events was previously enabled for the stage:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
DISABLEPLAYBACK -application helloworld -stage helloworldAdapter
Configures the parameters associated with the recording of events for a stage of an Oracle CEP application.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
CONFIGURERECORD -applicationapplication
-stagestage
startTime
-startTime
[-endTimeendTime
] [-durationduration
]
Specifies the name of the Oracle CEP application whose event record and playback 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.
|
|||
Specifies the actual time when the recording should end. Specify
null if you want the recording to run forever.
|
|||
Specifies the duration of time after which event recording for this stage ends. Specify
null if you want the recording to run forever.
|
The examples in this section show how to configure the recording of events of the helloworldAdapter
of the helloworld
application deployed to the specified Oracle CEP instance.
The following example specifies a start and end time for recording:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
CONFIGURERECORD -application helloworld -stage helloworldAdapter
-startTime 10-20-2007:11:22:07 -endTime 10-20-2007:12:22:07
The following example specifies a start and a duration for recording:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
CONFIGURERECORD -application helloworld -stage helloworldAdapter
-startTime 10-20-2007:11:22:07 -duration 01:00:00
The following example specifies a start and a duration of null
, which means recording with run forever:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
CONFIGURERECORD -application helloworld -stage helloworldAdapter
-startTime 10-20-2007:11:22:07 -duration null
Configures the parameters associated with the playback of events for a stage of an Oracle CEP application.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
CONFIGUREPLAYBACK -applicationapplication
-stagestage
startTime
-startTime
[-endTimeendTime
] [-durationduration
]
[-speedspeed
] [-loopbackloopback
]
Specifies the name of the Oracle CEP application whose event record and playback 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.
|
|||
Specifies the actual time when the playback should end. Specify
null if you want the playback to run forever.
|
|||
Specifies the duration of time after which event playback for this stage ends. Specify
null if you want the playback to run forever.
|
|||
The examples in this section show how to configure the playback of events of the helloworldAdapter
of the helloworld
application deployed to the specified Oracle CEP instance.
The following example specifies a start and end time for playback and that the speed of playback should be twice the normal speed and that once the playback of events for the time interval is over, the playback should start again:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
CONFIGUREPLAYBACK -application helloworld -stage helloworldAdapter
-startTime 10-20-2007:11:22:07 -endTime 10-20-2007:12:22:07
-speed 2 -loopback true
The following example specifies a start and a duration for playback, that the speed of playback is 2 times slower than normal, and that the playback of events should occur only once:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
CONFIGUREPLAYBACK -application helloworld -stage helloworldAdapter
-startTime 10-20-2007:11:22:07 -duration 01:00:00
-speed 0.5 -loopback false
The following example specifies a start and a duration of null
, which means playback with run forever at normal speed with loopback:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
CONFIGUREPLAYBACK -application helloworld -stage helloworldAdapter
-startTime 10-20-2007:11:22:07 -duration null
Table 5-21 is an overview of commands for monitoring throughput and latency in an Oracle CEP application. Subsequent sections describe command syntax and arguments, and provide an example for each command.
Monitors the average amount of time, or latency, it takes an event to pass through a specified path of the EPN of the specified application.
You specify the start and end stages of the path, and whether it should start or end at the entry or exit points of each respective stage. If you specify the same stage for the start and end of the path, you can monitor the latency of events flowing through a single stage.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
MONITORAVGLATENCY -applicationapplication
-startStagestartStage
-startStagePointstagePoint
-endStageendStage
-endStagePointstagePoint
-avgIntervalavgInterval
-timeUnittimeUnit
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.
|
|
The following example shows how to monitor the average latency of events flowing through the eplprocessor
component, from entry point to exit point, of the helloworld
application. Note that because the same stage is specified for both the start and end stages (eplprocessor
), the latency monitoring is happening for just the events flowing through a single stage:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
MONITORAVGLATENCY -application helloworld -startStage eplprocessor
-startStagePoint entry -endStage eplprocessor -endStagePoint exit
-avgInterval 100 -timeUnit MILLISECONDS
Specifies whether the average latency of events between the start- and end-points of a path crosses a specified threshold.
You specify the start and end stages of the path, and whether it should start or end at the entry or exit points of each respective stage. If you specify the same stage for the start and end of the path, you can monitor the latency threshold of events flowing through a single stage.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
MONITORAVGLATENCYTHRESHOLD -applicationapplication
-startStagestartStage
-startStagePointstagePoint
-endStageendStage
-endStagePointstagePoint
-avgIntervalavgInterval
-timeUnittimeUnit
-thresholdthreshold
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.
|
|
The following example shows how to monitor the average latency threshold of events above 10 seconds average latency on the eplprocessor
stage, from entry point to exit point, of the helloworld
application.
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
MONITORAVGLATENCY -application helloworld -startStage eplprocessor
-startStagePoint entry -endStage eplprocessor -endStagePoint exit
-avgInterval 100 -timeUnit MILLISECONDS -threshold 100
Monitors the maximum latency of events flowing through a specified path of the EPN of the specified application.
You specify the start and end stages of the path, and whether it should start or end at the entry or exit points of each respective stage. If you specify the same stage for the start and end of the path, you can monitor the maximum latency of events flowing through a single stage.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
MONITORMAXLATENCY -applicationapplication
-startStagestartStage
-startStagePointstagePoint
-endStageendStage
-endStagePointstagePoint
-maxIntervalmaxInterval
-timeUnittimeUnit
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.
|
|
The following example shows how to monitor the maximum latency of events flowing through the eplprocessor
stage, from entry point to exit point, of the helloworld
application:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
MONITORMAXLATENCY -application helloworld -startStage eplprocessor
-startStagePoint entry -endStage eplprocessor -endStagePoint exit
-maxInterval 100 -timeUnit MILLISECONDS
Monitors the average number of events flowing through the entry or exit point of a stage of the EPN of the specified application.
java wlevs.Admin
[Connection Arguments
]
[ User Credentials Arguments ]
[ Common Arguments ]
MONITORAVGTHROUGHPUT -applicationapplication
-stagestage
-StagePointstagePoint
-throughputIntervalthroughputInterval
-avgIntervalavgInterval
-timeUnittimeUnit
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.
|
|
The following example shows how to monitor the number of events flowing through the entry point of the eplprocessor
stage of the helloworld
application:
prompt> java wlevs.Admin
-url service:jmx:rmi:///jndi/rmi://ariel:9004/jmxrmi
-username wlevs -password wlevs
MONITORMAXLATENCY -application helloworld
-stage eplprocessor -stagePoint entry
-throughputInterval 100 -avgInterval 100 -timeUnit MILLISECONDS