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

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
ConnectionFactories and Connection objects
Connection to a WebSphere service integration bus
Secure connections to a WebSphere MQ queue manager
Secure connections to a WebSphere service integration bus messaging engine
Property mapping for administered objects
Related tasks
Creating administered objects
Related reference
Required properties for administered ConnectionFactory 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.

If you are connecting to WebSphere MQ, and you set the XMSC_USERID property of the connection factory, it must match the userid of the logged on user. If you do not set these properties, the queue manager will use the userid of the logged on user by default. If you require further connection-level authentication of individual users you can write a client authentication exit which is configured in WebSphere MQ. You can learn more about creating a client authentication exit in the Authentication topic in the WebSphere MQ Clients manual.

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.

If you are connecting to WebSphere MQ, and you set the XMSC_USERID property of the connection factory, it must match the userid of the logged on user. If you do not set these properties, the queue manager will use the userid of the logged on user by default. If you require further connection-level authentication of individual users you can write a client authentication exit which is configured in WebSphere MQ. You can learn more about creating a client authentication exit in the Authentication topic in the WebSphere MQ Clients manual.

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: 18 Jun 2008

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