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.

Inheritance hierarchy:
xms::PropertyContext
   |
   +----xms::ConnectionFactory

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

Constructors

Summary of constructors:
Constructor Description
ConnectionFactory Create a connection factory with the default properties.

ConnectionFactory – Create Connection Factory

Interface:
ConnectionFactory();

Create a connection factory with the default properties.

Parameters:
None
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

Methods

Summary of methods:
Method Description
~ConnectionFactory Delete the connection factory.
createConnection Create a connection using the default user identity.
createConnection Create a connection using a specified user identity.
getHandle Get the handle that a C application would use to access the connection factory.
isNull Determine whether the ConnectionFactory object is a null object.

~ConnectionFactory – Delete Connection Factory

Interface:
virtual ~ConnectionFactory();

Delete the connection factory.

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

Parameters:
None
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

createConnection – Create Connection (using the default user identity)

Interface:
Connection createConnection();

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 Connection.start().

Parameters:
None
Returns:
The Connection object.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION
  • XMS_X_SECURITY_EXCEPTION

createConnection – Create Connection (using a specified user identity)

Interface:
Connection createConnection(const String & userID,
                            const 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 specify a null String object, the connection factory property XMSC_USERID is used instead.
password (input)
A String object encapsulating the password to be used to authenticate the application. If you specify a null String object, the connection factory property XMSC_PASSWORD is used instead.
Returns:
The Connection object.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION
  • XMS_X_SECURITY_EXCEPTION

getHandle – Get Handle

Interface:
xmsHConnFact getHandle() const;

Get the handle that a C application would use to access the connection factory.

Parameters:
None
Returns:
The handle for the connection factory.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

isNull – Check Whether Null

Interface:
xmsBOOL isNull() const;

Determine whether the ConnectionFactory object is a null object.

Parameters:
None
Returns:
  • xmsTRUE, if the ConnectionFactory object is a null object.
  • xmsFALSE, if the ConnectionFactory object is not a null object.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

Inherited methods


Reference topic

Terms of Use | Rate this page

Last updated: 18 Jun 2008

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