8 Replies Latest reply on Jan 16, 2018 2:56 AM by kavinthamaduranga

    JBoss JMS standalone GUI tool for beginners showing queues and messages

    frederikw

      When we (InterCommit.nl) started using JBoss Messaging, we needed a simple standalone tool providing an overview (via a GUI) of the queues and the number of messages on/through those queues. This information is available in JBoss, but getting this information and displaying it in an overview was not straightforward. A similar thing applies for viewing messages on a queue and creating messages for a queue.

       

      The attached zip-file contains the tool "ICIT JMS Monitor" which does all this and the included source code (LGPL) can provide beginners insight in how to get basic JMS tasks done. A readme is included in the zip-file. Installing and running is as simple as unzipping and starting icitjmsmon.bat/sh.

       

      No need to configure anything, all required libraries are included. Provide the JBoss AS hostname and click Connect - that's it. This was also the reason we started developing this "run-click-go" tool, other tools (like HermesJMS) proved to be too cumbersome.

       

      The ICIT JMS Monitor shows:

      - the JMS queues in JBoss AS

      - per queue:

        - the number of messages processed

        - amount processed in the last few seconds

        - amount processed over a period of 1 minute

        - peak values for messages processed

      With the ICIT JMS Monitor you can:

      - deploy a queue

      - browse messages on a queue

      - view a message on a queue

      - delete a message from a queue

      - create a text or Object message and send it to a queue

      - create and send messages in bulk (amount of messages and delay between sending can be specified)

       

      The tool also shows which libraries are required on the client/tool-side to connect to JBoss AS and it shows how basic security (username/password) can be implemented. Both can take a long time to figure out if you are a beginning JBoss JMS programmer.

       

      Happy messaging.

        • 1. Re: JBoss JMS standalone GUI tool for beginners showing queues and messages
          beckymc

          Thank you!! This is just what I was looking for, and it works great.

          • 2. Re: JBoss JMS standalone GUI tool for beginners showing queues and messages
            user_gaurav

            I Would have loved the tool.

            But I am unable to use the tool .I am getting

            this error can u help me

            10/17 19:27 JavaSystemOut: 19:27:01,220 INFO : tools.ConfUtil - Properties loaded from: resources/config\jndi.properties

             

            10/17 19:27 Starting connect window

            10/17 19:27 JavaSystemOut: 19:27:01,235 INFO : tools.ConfUtil - Properties loaded from: resources/config\jndi.properties

             

            10/17 19:27 Added window ICIT JMS Monitor 0.1 Connect to JBoss server

            10/17 19:28 ERROR:

            JavaSystemError - Exception in thread "Timer-1" java.lang.IndexOutOfBoundsException: Invalid index

                at javax.swing.DefaultRowSorter.convertRowIndexToView(Unknown Source)

                at javax.swing.JTable.convertRowIndexToView(Unknown Source)

                at javax.swing.JTable.repaintSortedRows(Unknown Source)

                at javax.swing.JTable.sortedTableChanged(Unknown Source)

                at javax.swing.JTable.tableChanged(Unknown Source)

                at javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)

                at javax.swing.table.AbstractTableModel.fireTableRowsUpdated(Unknown Source)

                at nl.intercommit.mario.tools.jbossmon.ServerQueueMon.updateData(ServerQueueMon.java:347)

                at nl.intercommit.mario.tools.jbossmon.ServerQueueMon$qInfoUpdateTask.run(ServerQueueMon.java:24)

                at java.util.TimerThread.mainLoop(Unknown Source)

             

            Regrads,

            Guarav

            • 3. Re: JBoss JMS standalone GUI tool for beginners showing queues and messages
              frederikw

              Hello Gaurav,

               

              I got a similar "Invalid Index" error when I connected to a JBoss server that had no JMS enabled. But before the "Invalid Index" error was shown, a whole bunch of other errors was also shown in the log-window, e.g.:

              javax.management.InstanceNotFoundException: jboss.messaging:service=ServerPeer is not registered.

               

              To start JBoss 5.1 with JMS, try starting JBoss with "run -c all". This might solve your problem.

              I think the tool expects at least 1 registerd queue and will give the "Invalid Index" error if there are no queues (or could not retrieve the queues from JBoss).

              • 4. Re: JBoss JMS standalone GUI tool for beginners showing queues and messages
                user_gaurav

                Hi Fred,

                Thanks for reply!!

                 

                No I am connect the server am using Jboss-4-2-X .

                Even I am able to create a queue also.

                My server has lots of queues and even those are working and handshaked with other ems server.

                This stack trace is the starting one.

                I think This has to do with many no Queues being displayed

                in Swing front end.

                 

                I have updated jndi.properties file accordingly.

                 

                Any help,

                Regards,

                Gaurav

                • 5. Re: JBoss JMS standalone GUI tool for beginners showing queues and messages
                  user_gaurav

                  This is the full stack trace

                  No Queues are displayed

                   

                   

                   

                  10/18 09:25 ICIT JMS Monitor 0.1 starting ...

                  10/18 09:25 Log file opened: C:\DOCUME~1\user1\LOCALS~1\Temp\icitmon0.log

                  10/18 09:25 Running on x86 Windows XP 5.1 with Sun Microsystems Inc. Java HotSpot(TM) Client VM 1.6.0-b105

                  10/18 09:25 Labels loaded from: resources/config/mariotoolslabels.txt

                  10/18 09:25 Reading settings from file C:\DOCUME~1\user1\LOCALS~1\Temp\ICITMonSettings0.1.xml

                  10/18 09:25 JavaSystemOut: 09:25:25,739 INFO : tools.ConfUtil - Log4j configured from: resources/config\log4j.properties

                   

                  10/18 09:25 JavaSystemOut: 09:25:25,739 INFO : tools.ConfUtil - Properties loaded from: resources/config\jndi.properties

                   

                  10/18 09:25 Starting connect window

                  10/18 09:25 JavaSystemOut: 09:25:25,786 INFO : tools.ConfUtil - Properties loaded from: resources/config\jndi.properties

                   

                  10/18 09:25 Added window ICIT JMS Monitor 0.1 Connect to JBoss server

                  10/18 09:25 ERROR:

                  JavaSystemError - Exception in thread "Timer-1" java.lang.IndexOutOfBoundsException: Invalid index

                      at javax.swing.DefaultRowSorter.convertRowIndexToView(Unknown Source)

                      at javax.swing.JTable.convertRowIndexToView(Unknown Source)

                      at javax.swing.JTable.repaintSortedRows(Unknown Source)

                      at javax.swing.JTable.sortedTableChanged(Unknown Source)

                      at javax.swing.JTable.tableChanged(Unknown Source)

                      at javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)

                      at javax.swing.table.AbstractTableModel.fireTableRowsUpdated(Unknown Source)

                      at nl.intercommit.mario.tools.jbossmon.ServerQueueMon.updateData(ServerQueueMon.java:347)

                      at nl.intercommit.mario.tools.jbossmon.ServerQueueMon$qInfoUpdateTask.run(ServerQueueMon.java:24)

                      at java.util.TimerThread.mainLoop(Unknown Source)

                      at java.util.TimerThread.run(Unknown Source)

                   

                  Regards,

                  Gaurav

                  • 6. Re: JBoss JMS standalone GUI tool for beginners showing queues and messages
                    frederikw

                    Hello Gaurav,

                     

                    the tool includes libraries from JBoss 5 (see the lib-directory). If you use JBoss 4, you should probably replace those libraries. But I don't know if the source code will then compile (JBoss 5 classes used in the tool may not exist in JBoss 4).

                     

                    The error appears to originate in ServerQueueMon.java on the line

                    fireTableRowsUpdated(0, getRowCount()-1);

                    You can replace that with

                    fireTableDataChanged();

                     

                    But that will probably not remove the cause of the error. Most of the data that the tool displays is retrieved using methods in JmsUtil.java

                    Try calling these methods from a test program. E.g. if JmsUtil.getQueueNames(InitialContext) returns an empty list, you probably found the cause of the problems.

                    • 7. Re: JBoss JMS standalone GUI tool for beginners showing queues and messages
                      davija001

                      This looks good, but I am unable to use this program.  When I can actually connect, it tells me there are 17 queues, but the menus & list don't actually show up because something is hogging the UI thread and never allows it to draw the table.

                       

                      It says the update should happen every 5000 milliseconds, but it actually seems to be constantly refreshing.

                      • 8. Re: JBoss JMS standalone GUI tool for beginners showing queues and messages
                        kavinthamaduranga

                        Any tools for EAP 7 to monitor jms queues and journals ?