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

IConnectionFactory

An application uses a connection factory to create a connection.

Inheritance hierarchy:
IBM.XMS.IPropertyContext
   |
   +----IBM.XMS.IConnectionFactory

For a list of the XMS defined properties of a ConnectionFactory object, see Properties of ConnectionFactory.

Related concepts
Connection factories and connections
Connecting to a WebSphere service integration bus
Related tasks
Creating administered objects

Methods

Summary of methods:
Method Description
CreateConnection Create a connection factory with the default properties.
CreateConnection Create a connection using a specified user identity.

CreateConnection – Create Connection Factory (using the default user identity)

Interface:
IConnection CreateConnection();

Create a connection factory with the default properties.

The connection factory properties XMSC_USERID and XMSC_PASSWORD, if they are set, are used to authenticate the application. If these properties are not set, the connection is created without authenticating the application, provided the messaging server permits a connection without authentication. The properties are ignored if the application connects to a WebSphere MQ queue manager in bindings mode.

Parameters:
None
Exceptions:
  • XMSException

CreateConnection – Create Connection (using a specified user identity)

Interface:
IConnection CreateConnection(String userId, String password);

Create a connection using a specified user identity.

The specified user identifier and password are used to authenticate the application. The connection factory properties XMSC_USERID and XMSC_PASSWORD, if they are set, are ignored. The user identifier and password are ignored if the application connects to a WebSphere MQ queue manager in bindings mode.

The connection is created in stopped mode. No messages are delivered until the application calls Connection.start().

Parameters:
userID (input)
A String object encapsulating the user identifier to be used to authenticate the application. If you provide a null, an attempt is made to create the connection without authentication.
password (input)
A String object encapsulating the password to be used to authenticate the application. If you provide a null, an attempt is made to create the connection without authentication.
Returns:
The Connection object.
Exceptions:
  • XMSException
  • XMS_X_SECURITY_EXCEPTION

Inherited properties and methods


Reference topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.