WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, Windows

The XMS object model

The XMS API is an object oriented interface. The XMS object model is based on the JMS 1.1 object model.

The following list summarizes the main XMS classes, or types of object:
ConnectionFactory
A ConnectionFactory object encapsulates a set of configuration parameters for a connection. An application uses a connection factory to create a connection. An application can create a ConnectionFactory object at run time, or it can create a ConnectionFactory object from an object definition that is retrieved from a repository of administered objects.
Connection
A Connection object encapsulates an application's active connection to a messaging server. An application uses a connection to create sessions.
Destination
A destination is where an application sends messages, or it is a source from which an application receives messages, or both. In the publish/subscribe domain, a Destination object encapsulates a topic and, in the point-to-point domain, a Destination object encapsulates a queue. An application can create a Destination object at run time, or it can create a Destination object from an object definition that is retrieved from a repository of administered objects.
Session
A session is a single threaded context for sending and receiving messages. An application uses a session to create messages, message producers, and message consumers.
Message
A Message object encapsulates a message that an application sends or receives.
MessageProducer
An application uses a message producer to send messages to a destination.
MessageConsumer
An application uses a message consumer to receive messages sent to a destination.

Figure 1 shows these objects and their relationships.

Figure 1. XMS objects and their relationships
This
diagram shows the main types of XMS object: ConnectionFactory, Connection,
Session, MessageProducer, MessageConsumer, Message, and Destination. An application
uses a connection factory to create a connection, and uses a connection to
create sessions. The application can then use a session to create messages,
message producers, and message consumers. The application uses a message producer
to send messages to a destination, and uses a message consumer to receive
messages sent to a destination.

XMS applications written in C++ use these classes and their methods. XMS applications written in C use the same object model even though C is not an object oriented language. When a C application calls a function to create an object, XMS stores the object internally and returns a handle for the object to the application. The application can then use the handle subsequently to access the object. For example, if a C application creates a connection factory, XMS returns a handle for the connection factory to the application. In general, for each C++ method in the C++ interface, there is an equivalent C function in the C interface.

In .NET, the XMS classes are defined as a set of .NET interfaces. Each object is implemented by a concrete implementation of its interface. When you are coding XMS .NET applications, you only need to use the declared interfaces.

The XMS object model is based upon the domain independent interfaces that are described in the Java Message Service Specification, Version 1.1. Domain specific classes, such as Topic, TopicPublisher, and TopicSubscriber, are not provided.


Concept topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.