Arch2Arch Tab BEA.com
Syndicate this blog (XML)

WebLogic Event Server Administration

Bookmark Blog Post

del.icio.us del.icio.us
Digg Digg
DZone DZone
Furl Furl
Reddit Reddit

Paco Gomez's Blog | July 26, 2007  12:40 AM | Comments (0)


Configuration

The management tasks described here are performed using WLEvS version 2.0 and wlshell version 2.1.0. The example used is the HelloWorld application, included with WLEvS. By default, this domain has the JMX services enabled.

wlshell is a DSL (Domain Specific Language) for JMX. It is a scripting shell fully compliant with the JMX specification, providing access to MBeans in a convenient manner. Since both WLEvS and wlshell are based on standard JMX, the products interoperate directly out of the box, without any customization. WLEvS also includes another utility, wlevs.Admin, to access the MBeans and work with EPL rules.

On the machine running wlshell, it is not necessary to install WLEvS. The only requirements are the wlshell install files and a valid JDK or JRE (version 5 or 6). Please refer to the wlshell installation documentation and the section about using the JMXRemote connector. wlshell can run on the same machine as WLEvS or remotely on another server.

Connecting to WLEvS

We are going to start the HelloWorld WLEvS domain and wlshell. In wlshell, we use the "connect" command to connect to the WLEvS server, indicating the URL, user name and password, as shown here:
#connect
connect service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi wlevs wlevs

#change to wlevs domain
com.bea.wlevs:

#set keys
keys Type Name Application

#list current directory
ls

#show the explorer
explore

Here is a screenshot of those commands executed in wlshell:

wlevs-01.gif

We will be using the keys "Type, Name and Application" for the rest of the article, unless otherwise noted. The concept of "keys" is described in detail here.

The explorer is shown below, displaying the MBean server URL, available JMX domains and all the MBeans registered on the "com.bea.wlevs" domain. The explorer is very convenient to browse the MBeans and see what attributes and operations are available.

wlevs-02.gif

Managing Server Life Cycle

The ServerRuntime MBean provides an operation to shutdown the server. The command to shutdown the server is:
cd /ServerRuntime
invoke shutdown
or simply:
invoke /ServerRuntime/shutdown
Managing EPL Rules

Each Processor inside an Application has one corresponding MBean, which exposes EPL Rules management operations. The following screenshot shows the MBean for the "helloworldProcessor" in the "helloworld" application:

wlevs-03.gif

The following screenshot shows a sample interaction with the EPLProcessor MBean to add and delete EPL rules:

wlevs-04.gif

The script used is:
app = helloworld
cd /EPLProcessor/${app}Processor/$app

get AllRules
invoke getRule helloworldRule
invoke deleteRule helloworldRule
get AllRules
invoke addRule helloworldRule "select * from HelloWorldEvent retain 1 event"
get AllRules


Accessing other MBeans

WLEvS provides MBeans for many other components like streams and application adapters. We can access their attributes and operations in the same way with wlshell.

As an example, the following script modifies dynamically the Message attribute of the "helloworldAdapter":
cd /HelloWorldAdapterConfig/${app}Adapter/$app
get Message
set Message "Hi! the time is now: "
get Message

This is the wlshell output when executing the previous script:

wlevs-06.gif

The change takes effect immediately, as seen in the WLEvS console output:

wlevs-05.gif

Conclusion

WebLogic Event Server provides all the management operations through the standard JMX interface. JMX-compliant tools, like wlshell, can be used to effectively administer WLEvS. In this blog entry I have described some basic management tasks, using MBean attributes and operations. Additional administrative tasks can be done on other MBeans using the same techniques described here.

References

    WLEvS - WebLogic Event Server Product Center

Comments

Comments are listed in date ascending order (oldest first) | Post Comment



Only logged in users may post comments. Login Here.

Powered by
Movable Type 3.31