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

ConnectionFactory

An application uses a connection factory to create a connection.

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

Functions

Summary of functions:
Function Description
xmsConnFactCreate Create a connection factory with the default properties.
xmsConnFactCreateConnection Create a connection using the default user identity.
xmsConnFactCreateConnectionForUser Create a connection using a specified user identity.
xmsConnFactDispose Delete the connection factory.

xmsConnFactCreate – Create Connection Factory

Interface:
xmsRC xmsConnFactCreate(xmsHConnFact *factory,
                        xmsHErrorBlock errorBlock);

Create a connection factory with the default properties.

Parameters:
factory (output)
The handle for the connection factory.
errorBlock (input)
The handle for an error block or a null handle.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

xmsConnFactCreateConnection – Create Connection (using the default user identity)

Interface:
xmsRC xmsConnFactCreateConnection(xmsHConnFact factory,
                                  xmsHConn *connection,
                                  xmsHErrorBlock errorBlock);

Create a connection using the default user identity.

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.

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

Parameters:
factory (input)
The handle for the connection factory.
connection (output)
The handle for the connection.
errorBlock (input)
The handle for an error block or a null handle.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION
  • XMS_X_SECURITY_EXCEPTION

xmsConnFactCreateConnectionForUser – Create Connection (using a specified user identity)

Interface:
xmsRC xmsConnFactCreateConnectionForUser(xmsHConnFact factory,
                                         xmsCHAR *userID,
                                         xmsCHAR *password,
                                         xmsHConn *connection,
                                         xmsHErrorBock errorBlock);

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 xmsConnStart().

Parameters:
factory (input)
The handle for the connection factory.
userID (input)
The user identifier to be used to authenticate the application. The user identifier is in the format of a null terminated string. If the user identifier is null, the connection factory property XMSC_USERID is used instead.
password (input)
The password to be used to authenticate the application. The password is in the format of a null terminated string. If the password is null, the connection factory property XMSC_PASSWORD is used instead.
connection (output)
The handle for the connection.
errorBlock (input)
The handle for an error block or a null handle.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION
  • XMS_X_SECURITY_EXCEPTION

xmsConnFactDispose – Delete Connection Factory

Interface:
xmsRC xmsConnFactDispose(xmsHConnFact *factory,
                         xmsHErrorBlock errorBlock);

Delete the connection factory.

If an application tries to delete a connection factory that is already deleted, the call is ignored.

Parameters:
factory (input/output)
On input, the handle for the connection factory. On output, the function returns a null handle.
errorBlock (input)
The handle for an error block or a null handle.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

Reference topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.