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.
The Module is essentially the same as the previous version although I have added some additional functionality:

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.

NBM Plug-in Download
I have added the generated Suite files to the NetBeans Plu-in portal and they can be found at http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=13434
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

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.
- caps.management.client.jar
- jbi-admin-common.jar
- appserv-rt.jar
- appserv-ext.jar
- appserv-deployment-client.jar
- jmsremote_optional.jar
- MsgServerInterface
- QueueInterface
- TopicInterface
- MsgInterface

NBM Plug-in Download
I have added the generated Suite files to the NetBeans Plu-in portal and they can be found at http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=13434








hi dante,
is there a chance seeing this as a nb plugin somewhen? (hosted on the netbeans site?)
ala
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 05:48 PM 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 192.18.1.36 on September 18, 2008 at 02:37 PM 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 04:44 PM 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 82.20.139.218 on September 19, 2008 at 08:31 AM GMT #
I have added the NBM to http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=13434 for those interested.
Posted by Andrew Hopkinson on September 23, 2008 at 10: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]
java.lang.ClassNotFoundException: com.sun.appserv.management.util.misc.RunnableBase$HowToRun
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:244)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Caused: java.lang.NoClassDefFoundError: com/sun/appserv/management/util/misc/RunnableBase$HowToRun
at com.sun.enterprise.server.ApplicationServer.<clinit>(ApplicationServer.java:394)
at com.sun.enterprise.util.ORBManager.initProperties(ORBManager.java:314)
----------
Anyone else experienced this and have a solution?
Regards
Mikael
Posted by Mikael Beermann on October 24, 2008 at 07:30 AM GMT #
Hi,
I can reproduce this and will look into it.
Posted by 82.20.139.218 on October 24, 2008 at 08: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 http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=13434
Posted by Andrew Hopkinson on October 30, 2008 at 11: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.
com.sun.caps.management.common.CAPSManagementRemoteException: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><jbi-task version="1.0" xmlns="http://java.sun.com/xml/ns/jbi/management-message" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <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 mdjcap00.t1.test.ishealthcare.net - Cannot determine whether its local or remote.</loc-message><loc-param>mdjcap00.t1.test.ishealthcare.net</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.caps.management.client.CAPSManagementClientFactory.getInstance(CAPSManagementClientFactory.java:302)
at com.sun.aph.nbm.jcaps6manager.impl.MsgServerImpl.connect(MsgServerImpl.java:55)
at com.sun.aph.nbm.jcaps6manager.OneMsgServerNode$1.construct(OneMsgServerNode.java:147)
at com.sun.aph.nbm.jcaps6manager.SwingWorker$2.run(SwingWorker.java:63)
at java.lang.Thread.run(Thread.java:619)
Posted by Raghu on January 15, 2009 at 03:30 PM GMT #