Working with Sample Projects

Working through the sample projects helps you to understand how TIBCO ActiveMatrix BusinessWorks Plug-in for WebSphere MQ works.

After installing the plug-in, you can locate the eight sample projects in the TIBCO_HOME/bw/palettes/bwmq/version_number/samples directory. These sample projects contain twenty processes, each process corresponds to a task.

The eight sample projects are as follows:

  • basicSendReceive

    This package contains a process. The process puts a message in the queue and then retrieves the message using the Get activity.

  • dynamicDestinations

    This package contains three processes, which are related to dynamic destinations.

    Dynamic destinations are queues, which do not exist until they are opened for read or write. These queues are patterned after a model queue (which you have to create), and they can be of a temporary or permanent nature.

    Temporary dynamic queues disappear as soon as the last subscriber and message are gone from the queue.

    Permanent dynamic queues behave much like normal queues in that they survive queue manager restarts and retain their messages as would a normal queue. The main difference is that they can be created and deleted by an application, which frees administrators from some of the maintenance obligations for applications designed to use them.

    A dynamic queue can be created either by the Put, Get, or Listen activity. The most common use of dynamic queues is for the reply messages.

    A brief description of these processes are as follows:

    GetFromDynamicDest shows the Get activity can create a destination and listen on it.

    ListenToDynamicDest shows the Listener activity can create and listen on a dynamic destination.

    SendToDynamicDest shows the Put activity can create a dynamic queue and a subsequent Get activity can get either that message or a response type message on the dynamic queue.

    In all cases, the dynamic queue can exist until the process that created it ends.

  • logicalmessages

    This package contains five processes, which show the ways in which logical messages can be handled by the plug-in. Logical messages can be created and consumed in single pass activities through the Get, Put, and Listen activities. Logical messages can also be processed in loops by the Get and Put activities.

  • messagebodyschemas

    This package contains one process, which shows the use of message body schemas. It uses a schema from the Resources directory to map a number of different kinds of variables on and off of a message using the Get and Put activities.

  • mqtransactions

    This package contains three processes, which shows how the Get, Put, and Publish activities can be wrapped in a local transaction group such as the messages sent and retrieved by each activity are only committed when the process exits the local transaction group. The RequestReply activity does not participate in transactions because it is a compound activity, which requires that its initial put to the request queue be committed immediately. Rollback of all messages involved in a local transaction is also illustrated.

  • pubsub

    This package contains two processes, which shows the basic use of the pub sub capabilities of the plug-in.

  • report

    This package contains two processes. The plug-in can be configured such that all of the commonly used reporting options are selectable on the Advanced tab of the Put activity. The fact that the reports were created is verified by listening for them in another process.

  • segmented

    This package contains two processes. Message segmentation is a technique used to split large messages into smaller ones called "segments", which can fit into the buffers of the various channels encountered in the messaging system. With this plug-in, messages can be explicitly segmented, whereby you provide the segment size, or have the queue manager segment the message as necessary along the way. The Put activity provides explicit configuration options for segmenting messages but the Get and Listener activities support segmented messages implicitly.