Popular Posts

Sunday, August 31, 2008

How to use jconsole to monitor and manage WSO2 WSAS

Service or system monitoring and management are essential components of any SOA framework. WSO2 WSAS provides two different mechanisms to manage and monitor web services.
1. Ajax based GUI console
2. JMX based monitoring facility

In this post, I'm going to demonstrate the second option, JMX based service and system monitoring component. You can find more information about WSAS GUI console from here.

JMX (Java Management Extension) provides a set of tools and APIs for applying a standard client/server-based architecture to monitoring and management of a Java application.
J2SE version 5.0 adds core support for the Java Management Extensions (JMX) into the Java standard libraries. We are going to use Jconsole, included in jdk1.5 or newer versions, to explore the management and monitoring capabilities provided by WSO2 WSAS.


Download and install WSO2 WSAS-2.2.1 or later

Step 1

JMX port is disabled by default in WSAS. Open WSO2WSAS_HOME/conf/server.xml and uncomment the following element.

<!--The JMX Port-->

Step 2

Start WSO2 WSAS (run wso2wsas.bat or sh).

Make a note of the JMX url which will be printed on server startup console
i.e:- JMX Service URL : service:jmx:rmi:///jndi/rmi://YourHost:9999/server

Step 3

Start command prompt (or shell in linux), type Jconsole and hit enter. JConsole:Connect to Agent window will be popped up.

Enter JMX url (service:jmx:rmi:///jndi/rmi://YourHost:9999/server)
Enter admin as user name and password. Note that, any user with admin privileges can log in to JMX.
Click on Connect.

You will be directed to the summary page of Jconsole as follows.

Step 4

Click on MBeans tab. You will see the Mbeans tree in the left pane. Select org.wso2.wsas MBean.
ServerAdmin, ServiceAdmin and StatisticsService MBeans will be listed there.
Select ServerAdmin.

You will see shutdown, restart, restartGracefully, shutdownGracefully, startMaintenance and endMaintenance administrative functions when clicking on Operations tab in the above screen.

Step 5

We observed a few administrative function of WSo2 WSAS which were exposed through JMX in the above step. Lets see how service statistics are monitored using Jconsole.

Click on StatisticsService Mbean at the left pane. Next, select Operations tab.
Following screen will be displayed.

In order to check service statistics, we must invoke a service deployed on WSAS. Open your browser and enter the following URL.
This will send a HTTP GET request to the default Version service.

Now enter 'version' as the value of the getServiceRequestCount operation in above screen and click on getServiceRequestCount.
You will get '1' as the response.

Invoke Version service a few more times (just send http GET requests using the above URL).
Enter 'version' as parameter 1 (p1) and 'getVersion' as parameter 2 (p2) of getOperationRequestCount operation.
You will see a operation return value similar to the one bwlow.

Now, you will be able to proceed with more operations and get the statistics of server and system status.


Anonymous said...

Fantastic!God bless you!Meanwhile,you can visit my China Wholesale,we have the highest quality but the lowest price fashion products wholesale from China.Here are the most popular China Wholesale productsfor all of you.You can visit http://chinaclothes.net.Also the polo clothing is a great choice for you.

Anonymous said...

Do not mean bad.Thank you so much!I just want to show some fashion things to all of you.I like puma speed, puma femmes and other puma shoes. These puma sport items are at store recently and available for anyone.

Anonymous said...

Perfect!!You are a outstanding person!Have you ever wore chaussures puma,Here are the most popular puma CAT,Puma shoes store gives some preview of puma speed cat,and casual but no sweat puma basket.

Anonymous said...

God bless you!I really agree with your opinions.Also,there are some new fashion things here,gillette razor blades.gillette mach3 razor bladesfor men.As for ladies,gillette venus razor blades must the best gift for you in summer,gillette fusion blades are all the best choice for you.

Anonymous said...

Awesome!!!Best wishes for you !!cheap polo shirts is the father of the summer should be prepared to most commonly used item, it has both style and shape of Ralph Lauren Polo, and vest with a random function polo ralph lauren, so that in the short-sleeved apply to both on many occasions, the pink and black color men's polo shirts brought into effect, lightweight cotton, linen texture to demonstrate masculine temperament and sense of fashion exhaustively.

Anonymous said...

Thank you so much!!polo shirt men'ssweate,Burberry Polo Shirts lacoste sweater, ralph lauren Columbia Jackets,ski clothing. Free Shipping, PayPal Payment. Enjoy your shopping experience on mensclothingus.com.You can find the father who desire fashionable, intellectual mens clothing simultaneously.

Anonymous said...


Anonymous said...

Do you wannaghd hair straighteners for you own , we have many
cheap ghd hair straightenersin style and great,you can choose one from these
hair straighteners
Authentic chaussure puma
chaussure sport
And chaussure nike shoes
Come here to have a look of our Wholesale Jeans
Many fashionMens Jeans ,eye-catching
Womens Jeans ,and special out standing
Blue Jeans ,you can spend less money on our
Discount Jeans but gain really fine jeans, absolutely a great bargain.
China Wholesale
wholesale from china
buy products wholesale
China Wholesalers

Anonymous said...

There are ed hardy shirts
,pretty ed hardy shirt for men,

ed hardy womens in the ed hardy online store

designed by ed hardy ,
many cheap ed hardy shirt ,glasses,caps,trouers ed hardy shirts on sale ,

You can go to edhardyshirts.com to have a look ,you may find one of ed hardy clothing fit for you
Top qualitymen's jacket,
These cheap jacket are on sale now,you can find
north face jackets inmage on our web
Ralph Lauren Polo Shirtsbuberry polo shirts

Anonymous said...