![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Looking up Administered Objects Stored in EMS describes how to lookup a connection factory from an EMS server. How to create connection factories in a EMS server is described in Creating and Modifying Administered Objects in EMS.In each example, the serverUrl parameter in these expressions is a string defining the protocol and the address of the running instance of the EMS Server. The serverUrl parameter has the form:See Configuring Clients for Shared State Failover Connections for more information. For details on using SSL for creating secure connections to the server, see Configuring SSL in EMS Clients and Creating Connection Factories for Secure Connections.To dynamically create a TibjmsConnectionFactory object in a Java client:See the tibjmsMsgProducer.java sample client for a working example.To dynamically create a tibemsConnectionFactory type in a C client:See the tibemsMsgProducer.c sample client for a working example.To dynamically create a ConnectionFactory object in a C# client:See the csMsgProducer.cs sample client for a working example.By default, a client will attempt to connect to the server two times with a 500 ms delay between each attempt. A client can modify this behavior by setting new connection attempt count and delay values. There are also a number of factors that may cause a client to hang while attempting to create a connection to the EMS server, so you can set a connection timeout value to abort a connection attempt after a specified period of time. For best results, timeouts should be at least 500 milliseconds. EMS also allows you to establish separate count, delay and timeout settings for reconnections after a fault-tolerant failover, as described in Setting Reconnection Failure Parameters.Use the TibjmsConnectionFactory object’s setConnAttemptCount(), setConnAttemptDelay(), and setConnAttemptTimeout() methods to establish new connection failure parameters:factory.setConnAttemptCount(10);factory.setConnAttemptDelay(1000);factory.setConnAttemptTimeout(1000);Use the tibemsConnectionFactory_SetConnectAttemptCount and tibemsConnectionFactory_SetConnectAttemptDelay functions to establish new connection failure parameters:Use the ConnectionFactory.SetConnAttemptCount, ConnectionFactory.SetConnAttemptDelay, and ConnectionFactory.SetConnAttemptTimeout methods to establish new connection failure parameters:factory.setConnAttemptCount(10);factory.setConnAttemptDelay(1000);factory.setConnAttemptTimeout(1000);
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |