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.
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. |
xmsRC xmsConnFactCreate(xmsHConnFact *factory, xmsHErrorBlock errorBlock);
Create a connection factory with the default properties.
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().
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().
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.