The sample applications provide an overview of the common features of each API. You can use them to verify your installation and messaging server setup and your own applications.
These samples do not cover the whole of the API, but rather provide an overview of how to use some of the most common features. They are subject to change in future releases of XMS.
If you require guidance on how to create your own applications, use the sample applications as a starting point. Look through the sample source code and identify the key steps to create each required object for your application (ConnectionFactory, Connection, Session, Destination, and a Producer, or a Consumer, or both), and to set any specific properties that are needed to specify how you want your application to work. For additional information, see Writing XMS applications.
Table 1 shows the three sets of sample applications (one for each API) that are supplied with XMS.
Name of sample | Description |
---|---|
SampleConsumerC SampleConsumerCPP |
A message consumer application that consumes messages from a queue or topic. |
SampleProducerC SampleProducerCPP |
A message producer application that produces messages to a queue or on a topic. |
SampleConfigC |
A configuration application that you can use to create a file-based administered object repository containing a connection factory and destination for your particular connection settings. This administered object repository can then be used with each of the sample consumer and producer applications. |
The samples that support the same functionality in the various APIs have syntactical differences.
Both the source and a compiled version are provided for each application.
The samples can operate in one of two modes:
All the samples are compatible and can therefore operate across languages.
To find out where sample applications for Message Service Client for C/C++ are installed: