Sun Java System Message Queue 4.2 Developer's Guide for Java Clients

Example Application Code

The Message Queue installation includes example programs illustrating both JMS and JAXM messaging (see Chapter 5, Working with SOAP Messages). They are located in the following directories:

Each directory (except the JMS directory) contains a README file describing the source files included in that directory. The table below lists the directories of interest to Message Queue Java clients.

Table 1–3 Example Programs




Sample programs showing how to create and deploy a JMS client in Message Queue, including the steps required to create administered objects and to look up such objects with JNDI from within client code 


Sample programs demonstrating the use of the JMS API with Message Queue 


Sample programs demonstrating the use of SOAP messages in conjunction with JMS in Message Queue 


Four subdirectories containing source code for the following: 

  • A GUI application using the JMS API to implement a simple chat application

  • A GUI application using the Message Queue JMS monitoring API to obtain a list of queues from a Message Queue broker and browse their contents with a JMS queue browser

  • The Message Queue Ping demo program

  • The Message Queue Applet demo program


Sample programs demonstrating the use of the JMS API to monitor a message broker 


Examples for plugging in a PointBase and an Oracle database 


Examples of imqobjmgr command files