Skip to main content

Testing some FrameWorks and applications on Glassfish build 40+ part IV

Posted by kalali on March 31, 2006 at 3:00 PM PST

This time i want to setup and test a utility that i am using with my Application server to mange them and monitor them.
Utility that i will use is Mc4j A very powerful and flexible jmx console built on top of Netbeans Platform .
so to follow this blog entry you will need GlassFish build 40+ , although i am testing it on buid 42 .Also you will need to have Mc4j version 1.2 beta 9 or newer.
first lets see what is JMX in very brief JMX like other java Stuff is an standard with some JSR related to it that handle requirement to manage java based applications in an standard and unified way it will allows to create powerful distributed management and monitoring system across different servers and aplications.
if you use jmx rule to build your configuration system then your application could be managed via any standard JMX console and any other application can interact with your application management system in an standard way.
How this become possible ? indeed you provide some java classes which are named managed beans or simply MBeans that provide access to other obects (mainly exposed or configurable objects) or your system. each MBean then register in another Object which is named MBean server.
? An MBean server with some services to handle MBeans compose a JMX Agent.this JMX agent provide facilities that remote application could communicate and manage your application.
but why we use JMXTechnology . i think some of reasons for using jmx is :

  • It provice an standard way to manage applications.
  • the architecture is well though and easily extendable.
  • You can integrate it with other management system because of its non intrusive nature.

For me , it is really suite that i use one application as a management console to manage my servers and applications that are running on them.
Lets see how we can use Mc4j to manage GlassFish. If you run mc4j you will see that it provide opens up and bring a friendly environment like netbeans. something like :

To access Glassfish management trough JMX you need to register the GlassFish as a server in mc4j , so in management menu choose create server connection. a dialog will opens let it be there. now go to your GlassFish installation \bin directory. execute asadmin start-domain in case that you have one domain in your application server then that domain will start and a page like the following will shown up.

as you see in the image and in your own console window it shows up something related to jmx in your console , a url that you will use to access the JMX agent of glassFish trough mc4J copy that url and goto mc4j wizard window.
configure the MC4J wizard window like the following image by selecting the SJSAS as server type and pasring that url in server url, now you will need just to enteruser name and password which by default are admin/adminadmin. now you shoule be able to see a window much like the following one , as you can see , in left panel there come a glassFish node which is lighted with green. it means that mc4j is connected to this server and you can monitor / manage this server using mc4j.

Extend the GlassFish Node and you will see manything there.You can view the server JVM status , and also you can view the server resources itself. to view the server resources you will need to extpand the MBeans / amx node which is main node for GlassFish management.
Happy exploration
some images from my own explorations ;-)

What you can do when you are netbeans based.. dynamic Pool size chart
Dynamic Pool usage Chart Look which action we have over OSWorkFlow web application in this MBean

Related Topics >>