Load2.java

 

This class is a JMS application that loads a given queue with a number of messages, then terminates, in a similar way to Load1.java. The command line syntax is also similar to that for Load1.java (substitute Load2 for Load1 in the syntax). For details, see Load1.java.

The difference is that each message contains a user property called value, which takes a randomly selected integer value between 0 and 100. This property means that we can apply message selectors to the messages. Consequently, the messages can be shared between the two consumers that are created in the client application described in ASFClient2.java.


uj25720_