WebSphere WebSphere Business Integration Message Service Clients for C/C++ Version 1.2.7 and .NET Version 1.2.6 Operating Systems: AIX, Linux, Solaris, 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 ConnectionFactory 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
The source from where an application sends messages or receives messages. 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 (MessageProducer) or receives (MessageConsumer).
MessageProducer
An object used by an application to send messages to a destination.
MessageConsumer
An object used by an application 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 ConnectionFactory, XMS returns a handle for the ConnectionFactory 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 need only to use the declared interfaces.

The XMS object model is based on the domain independent interfaces that are described in 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: 18 Jun 2008

© Copyright IBM Corporation 2005, 2008. All Rights Reserved.