Administrators define connection factories in a repository. Each connection factory has administrative parameters that guide the creation of server connections. Usage follows either of two models:You can use the EMS server as a name service provider—one tibemsd process provides both the name repository and the message service. Administrators define factories in the name repository. Client programs create connection factory objects with the URL of the repository, and call tibemsConnectionFactory_CreateConnection. This function automatically accesses the corresponding factory in the repository, and uses it to create a connection to the message service.
Administered ObjectsAdministered objects let administrators configure EMS behavior at the enterprise level. Administrators define these objects, and client programs use them. This arrangement relieves program developers and end users of the responsibility for correct configuration.tibemsConnectionFactory tibemsConnectionFactory_Create( void );
factory has usage pointer.The resulting connection factory object is empty. This call does not attempt to access the repository (see also tibemsLookupContext on page 322).tibems_status tibemsConnectionFactory_CreateConnection(tibemsConnectionFactory factory,tibemsConnection* connection,
factory and connection have usage pointer.
The connection object presents this user identity to the server. Set to NULL if the server isn’t authenticating or authorizing users. The connection object authenticates the user identity with this password. Set to NULL if the server isn’t authenticating or authorizing users.When the identity parameters are null, the connection object presents a default user identity. If the server configuration permits that anonymous user, then the call succeeds.
factory and connection have usage pointer.
The connection object presents this user identity to the server. Set to NULL if the server isn’t authenticating or authorizing users. The connection object authenticates the user identity with this password. Set to NULL if the server isn’t authenticating or authorizing users.When the identity parameters are null, the connection object presents a default user identity. If the server configuration permits that anonymous user, then the call succeeds.tibems_status tibemsConnectionFactory_Destroy(tibemsConnectionFactory factory )
factory has usage pointer.
tibems_status tibemsConnectionFactory_GetSSLProxyHost(tibemsConnectionFactory factory,
factory and proxy-host have usage pointer.
tibems_status tibemsConnectionFactory_GetSSLProxyPort(tibemsConnectionFactory factory,
factory has usage pointer.
tibems_status tibemsConnectionFactory_GetSSLProxyUser(tibemsConnectionFactory factory,
factory and proxy-user have usage pointer.
tibems_status tibemsConnectionFactory_GetSSLProxyPassword(tibemsConnectionFactory factory,
factory and proxy-password have usage pointer.
factory has usage pointer.
tibems_status tibemsConnectionFactory_SetClientID(tibemsConnectionFactory factory,
factory has usage pointer.
A client ID string lets the server associate a client-specific factory with each client program. When such a factory already exists, the server supplies that factory to the client. If a factory does not yet exist for the client, the server creates one, and stores it for future use by that specific client.tibems_status tibemsConnectionFactory_SetConnectAttemptCount(tibemsConnectionFactory factory,tibems_int connAttempts );
factory has usage pointer.
This value limits the number of times that a connection object attempts to establish a connection to the server. The minimum value is 1.Setting Connection Attempts, Timeout and Delay Parameters in the TIBCO Enterprise Message Service User’s Guidetibems_status tibemsConnectionFactory_SetConnectAttemptDelay(tibemsConnectionFactory factory,tibems_int delay );
factory has usage pointer.
This value determines the time (in milliseconds) between connection attempts. The minimum value is 250.Setting Connection Attempts, Timeout and Delay Parameters in the TIBCO Enterprise Message Service User’s Guidetibems_status tibemsConnectionFactory_SetConnectAttemptTimeout(tibemsConnectionFactory factory,tibems_int timeout );
factory has usage pointer.
This value determines the maximum time (in milliseconds) the client will wait for a connection to the server to be established.Setting Connection Attempts, Timeout and Delay Parameters in the TIBCO Enterprise Message Service User’s Guidetibems_status tibemsConnectionFactory_SetMetric(tibemsConnectionFactory factory,tibemsFactoryLoadBalanceMetric metric );
factory has usage pointer.
When the connection factory balances the client load among several servers, it uses this metric to determine the least loaded server, so the connection factory can create a connection to it. For values, see tibemsFactoryLoadBalanceMetric on page 283.tibems_status tibemsConnectionFactory_SetMulticastDaemon(
The port number for the multicast daemon that connections created using this factory will connect to.A connection to the multicast daemon is required when multicast is enabled and a consumer is subscribed to a multicast-enabled topic. Setting the port with this method will override the default port supplied by the server.Set whether message consumers subscribed to multicast-enabled topics will receive messages over multicast.tibems_status tibemsConnectionFactory_SetMulticastEnabled(tibems_bool multicastEnabled);
Enable or disable multicast capabilities for connections created by this factory When enabled, message consumers using a connection created by this factory, and which are subscribed to a multicast-enabled topic will receive messages over multicast. The default is enabled.multicast and multicast_daemon_default server parameters in the TIBCO Enterprise Message Service User’s Guideextern tibems_status tibemsConnectionFactory_SetPkPassword(
factory has usage pointer.
Connections created by the connection factory decode their SSL private key using this password when establishing SSL communication.It is an error to call this function on a connection factory for which an tibemsSSLParams struct is not yet set.Notice that this SSL private key encryption password is distinct from the server authentication password, and from the proxy authentication password.tibems_status tibemsConnectionFactory_SetReconnectAttemptCount(tibemsConnectionFactory factory,tibems_int connAttempts );
factory has usage pointer.
This value limits the number of times that a connection object attempts to reestablish a connection to the server. The minimum value is 1.tibems_status tibemsConnectionFactory_SetReconnectAttemptDelay(tibemsConnectionFactory factory,tibems_int delay );
factory has usage pointer.
This value determines the time (in milliseconds) between reconnection attempts. The minimum value is 250.tibems_status tibemsConnectionFactory_SetReconnectAttemptTimeout(tibemsConnectionFactory factory,tibems_int timeout );
factory has usage pointer.
This value determines the maximum time (in milliseconds) a client will wait for the reconnection to be established.tibems_status tibemsConnectionFactory_SetServerURL(tibemsConnectionFactory factory,
factory has usage pointer.
The factory object contacts the EMS server at this URL, to access a corresponding factory defined by the administrator.Reconnect and Fault ToleranceTo enable reconnection behavior and fault tolerance, the connection factory’s server URL parameter must be a comma-separated list of two or more URLs. To enable client reconnection in a situation with only one server, you may supply two copies of that server’s URL (for example, tcp://localhost:7222,tcp://localhost:7222).Note that tibemsConnectionFactory_SetServerURL can be used to set the server URL for a connection factory only once. If the URL has previously been set for the connection factory, tibemsConnectionFactory_SetServerURL returns the status code TIBEMS_EXCEPTION.tibems_status tibemsConnectionFactory_SetSSLParams(tibemsConnectionFactory factory,tibemsSSLParams sslparams );
factory and sslparams have usage pointer.
The connection establishes SSL communication using these parameters.tibems_status tibemsConnectionFactory_SetSSLProxy(tibemsConnectionFactory factory,
factory has usage pointer.
The connection factory establishes SSL communication through a web proxy at this host. Supply a simple hostname, a fully qualified hostname with domain name, or an IP address (dot notation). The connection factory establishes SSL communication through a web proxy on this port.An SSL proxy lets an EMS application create an SSL connection to an EMS server, even though a firewall separates the application from the server. The proxy usually runs within the firewall’s DMZ.A connection factory contacts the SSL proxy, requesting an SSL connection to the server. The proxy authenticates the application program, and mediates the initial SSL negotiation between application and server. After the SSL connection is established, the application and server use it to communicate directly with one another.tibemsConnectionFactory factory,
factory has usage pointer.
The connection factory authenticates itself to the SSL proxy using this username. The connection factory authenticates itself to the SSL proxy using this password.When a connection factory establishes an EMS server connection through an SSL proxy host, the proxy might first require authentication before facilitating a connection. When required, use this call to set that authentication data on the connection factory. Notice that this proxy authentication data is distinct from the server authentication data, and from the SSL private key encryption password.tibemsConnectionFactory factory,
factory has usage pointer.
When a connection factory establishes an EMS server connection, the EMS server requests identification. Use this call to set the username that the connection factory uses to identify itself to the EMS server. Notice that this server authentication data is different from SSL authentication data.tibemsConnectionFactory factory,
factory has usage pointer.
When a connection factory establishes an EMS server connection, the EMS server requests authentication. Use this call to set the password that the connection factory uses to authenticate itself with the EMS server. Notice that this server authentication data is different from SSL authentication data.
Copyright © TIBCO Software Inc. All Rights Reserved.