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

Connection factories and connections

A ConnectionFactory object provides a template that an application uses to create a Connection object. The application uses the Connection object to create a Session object.

For C and C++, there is a single type of ConnectionFactory which has a property that enables you to select which type of protocol you want to use for a connection. For .NET, an XMS application first uses an XMSFactoryFactory object to get a reference to a ConnectionFactory object that is appropriate to the required type of protocol. This ConnectionFactory object can then only produce connections for that protocol type.

An XMS application can create multiple connections, and a multithreaded application can use a single Connection object concurrently on multiple threads.

A connection serves several purposes:

An XMS application typically creates a connection, one or more sessions, and a number of message producers and message consumers.

Creating a connection is relatively expensive in terms of system resources because it involves establishing a communications connection, and it might also involve authenticating the application.

Related tasks
Creating administered objects
Related reference
ConnectionFactory (for the C class)
ConnectionFactory (for the C++ class)
IConnectionFactory (for the .NET interface)
Properties of ConnectionFactory
Destination (for the C class)
Destination (for the C++ class)
IDestination (for the .NET interface)
Properties of Destination

Concept topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.