Java CAPS Tip : NetBeans 6.1 JMS Monitoring based on the Management API

Following on from my blog entry "Building a JMS Browser Monitoring / Management Plug-in Module for NetBeans" I was asked if this was built using the Java CAPS Management API. The previous blog entry was actually built around the Java CAPS 6 stcqueueviewer API and as such did not have access to all the new functionality within the Management API. Therefore I decided to copy the existing project and modify the core JMS Implementation Classes to work with the Management API and will quickly document the key differences.

Module Description

The Module is essentially the same as the previous version although I have added some additional functionality:
  • Add / Delete Queues
  • Add / Delete Topics
  • View Message Details
  • Delete Message
JMS Browser

Whereas we previously connected to the Message Server directly, on 18007, we now connect to the Glassfish Application Server, on 4848, and use the built in JMX functionality to access the JMS Service. Although I only access the JMS service we could extend this to implement nodes attached tot he other Service types. So maybe it should not longer be referred to as a JMS Browser but an Application Server Management / Monitoring (Alpha) implementation. I may well continue working on this and add the functionality I need and that used to be available in LHVisualizer.

Key Changes

To modify the example to work with the Management API we need to change the contents of the Jar Wrapper module so that it now contains the following.
  2. jbi-admin-common.jar
  3. appserv-rt.jar
  4. appserv-ext.jar
  5. appserv-deployment-client.jar
  6. jmsremote_optional.jar
In addition the Implementation classes for the following Interfaces need to be modified to use the appropriate calls.
  1. MsgServerInterface
  2. QueueInterface
  3. TopicInterface
  4. MsgInterface
As you can see their was no change to the core Module Components, apart from where I had already decided my original implementation needed tweaking, an thus is relatively quick to implement. The new version of the Project files can be found in the file "". It should be noted that because of the restriction on file sizes I have removed the appserv-rt.jar from the JavaCAPS6ManagementWrapper/release/modules/ext directory. Therefore to get the module working you will need to copy the version from your <GLASSFISH-DIR>/lib directory.

Removed File

NBM Plug-in Download

I have added the generated Suite files to the NetBeans Plu-in portal and they can be found at


hi dante,

is there a chance seeing this as a nb plugin somewhen? (hosted on the netbeans site?)


just add this and that url press download and add some librries and you are ready to go?

regards chris

Posted by Christian Brennsteiner on September 17, 2008 at 10:48 AM GMT #

I will add this as soon as I can get the NetBeans Plug-in Portal to let me log in :-( I will then post the URL as part of the blog entry.

Posted by guest on September 18, 2008 at 07:37 AM GMT #

hi dante,

one big disadvantage i see just right now....
i think due to api "missconception/shortcomming" (you rely on CAPS management api right?) it will not be possible to play around with non embedded JMQ servers :-(

am i right?

i am hoping that sun will add support for standalon JMQs soon.

regards chris

Posted by Christian Brennsteiner on September 18, 2008 at 09:44 AM GMT #

This implementation does use the Java CAPS Management API whilst the previous blog used the stcqueueviewer utils. This does not mean that it is restricted to just monitoring Java CAPS Messages Servers. The main Plug-in code is based around a set of interfaces (MsgServerInterface / QueueInterface / TopicInterface / MsgInterface) and to back this I have written the two versions of the Impl classes (one for the Management API and one for stcqueueviewer).

There if we have the appropriate Management API for any JMS Server we could write the appropriate Impl classes and modify the MsgServerFactory class to return the appropriate Impl classes based on the passed Server Type.

At the moment I am still awaiting an appropriate interface for the SunMQ but as soon as one is available I will look at adding it.

Posted by guest on September 19, 2008 at 01:31 AM GMT #

I have added the NBM to for those interested.

Posted by Andrew Hopkinson on September 23, 2008 at 03:35 AM GMT #

When I Install this NBN in netbeans, the server monitoring functions of glassfish stops working. When I expand the Glassfish nodo under servers in the services tab all that happens is that the text "Wait..." comes up. In the netbeans log it says:

VARNING [org.openide.loaders]: Should override getLookup() in class org.netbeans.modules.xml.schema.SchemaDataObject, e.g.: [MultiDataObject.this.]getCookieSet().getLookup()

ALLVARLIG [org.openide.util.RequestProcessor]



at Method)


at java.lang.ClassLoader.loadClass(

at sun.misc.Launcher$AppClassLoader.loadClass(

at java.lang.ClassLoader.loadClass(

at org.netbeans.ProxyClassLoader.loadClass(

at java.lang.ClassLoader.loadClass(

at java.lang.ClassLoader.loadClassInternal(

Caused: java.lang.NoClassDefFoundError: com/sun/appserv/management/util/misc/RunnableBase$HowToRun

at com.sun.enterprise.server.ApplicationServer.<clinit>(

at com.sun.enterprise.util.ORBManager.initProperties(

Anyone else experienced this and have a solution?


Posted by Mikael Beermann on October 24, 2008 at 12:30 AM GMT #


I can reproduce this and will look into it.

Posted by guest on October 24, 2008 at 01:42 AM GMT #

I tracked down what the issue was it appears I missed the appserv-ext.jar from the library wrapper module. I have updated the example code and the NetBeans Plugin at

Posted by Andrew Hopkinson on October 30, 2008 at 04:07 AM GMT #

Can I use this module to connect remote message servers? I am getting this error while trying to connect remote stcms message servers. <?xml version="1.0" encoding="UTF-8" standalone="yes"?><jbi-task version="1.0" xmlns="" xmlns:xsi="" > <jbi-task-result><frmwk-task-result><frmwk-task-result-details><task-result-details><task-id>CAPS_MANAGEMENT_CLIENT_TASKS</task-id><task-result>FAILED</task-result><message-type>ERROR</message-type><task-status-msg><msg-loc-info><loc-token>UICMN1905</loc-token><loc-message>Unknown host - Cannot determine whether its local or remote.</loc-message><loc-param></loc-param></msg-loc-info></task-status-msg></task-result-details><locale></locale></frmwk-task-result-details><is-cause-framework>YES</is-cause-framework></frmwk-task-result></jbi-task-result></jbi-task>
at com.sun.aph.nbm.jcaps6manager.impl.MsgServerImpl.connect(
at com.sun.aph.nbm.jcaps6manager.OneMsgServerNode$1.construct(
at com.sun.aph.nbm.jcaps6manager.SwingWorker$

Posted by Raghu on January 15, 2009 at 07:30 AM GMT #

I'm not able to connect to remote STCMS servers using this any idea what could be the reason ?

Posted by Chandrakanth Belde on May 05, 2010 at 02:54 PM GMT #

Not sure unless it's a firewall / port issue

Posted by guest on June 29, 2010 at 04:27 AM GMT #

Post a Comment:
Comments are closed for this entry.

As a member of the Oracle A-Team we specialise in enabling and supporting the Oracle Fusion Middleware communities.


« June 2016