![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
• For Java applications, a JAR file must be present in the environment CLASSPATH of the client.Before creating the connection factory, ensure that the CLASSPATH includes the JAR file:Include the tibemsufo.h header file.Include the TIBCO.EMS.UFO.dll file.java com.tibco.tibems.ufo package.tibemsufo library and functions.TIBCO.EMS.UFO package.When an unshared state connection fails, the connection’s ExceptionListener callback is invoked. To recover the connection—repair it so that it is connected to an active server—the client application calls the connection factory’s recoverConnection method or tibemsUFOConnectionFactory_RecoverConnection function. This must be performed in the ExceptionListener callback. The recover connection method blocks until the connection (and its related objects, including sessions, producers, and consumers) are fully recreated, or until it has failed in all its attempts to recreate these objects.
1. Methods called inside a MessageListener callback immediately return a Java exception ConnectionFailureException or C status of TIBEMS_SERVER_NOT_CONNECTED.Note that the connection is considered broken from the point where the underlying TCP/SSL connection fails, and until recoverConnection or tibemsConnectionFactory_RecoverConnection successfully returns.
• Unshared State Specify multiple servers as a list of URLs separated by plus (+) signs. For example, to identify the first server as tcp://server0:7222, and the second server as tcp://server1:7344, you can specify:
• Dual State To combine shared state server pairs with unshared state servers, use commas to separate the servers that share state, and plus (+) signs to separate servers that do not share state. For example, this line specifies server a1 and a2 as a fault-tolerant pair that share state, and servers b1 and b2 as a second pair with shared state:serverUrl=tcp://a1:8222,tcp://a2:8222+tcp://b1:8222,tcp://b2:8222
Server lookup functions do not permit unshared state syntax. That is, you cannot separate server URLs using the plus (+) symbol during a server lookup.If the EMS client is using a shared state connection factory, then the values specified by way of properties or API calls will be the values used during client connect and reconnect sequences. However, if the client is using an unshared state factory, then the application layer values do not directly override the connect_attempt_count and reconnect_attempt_count properties set in the unshared state connection factory. Instead, the value specified at the application level is multiplied by the value in the connection factory to determine the resulting count. Also if the connect_attempt_delay and/or reconnect_attempt_delay are overidden at the application layer, the resulting actual delays can vary significantly from the override value.For example, if the unshared state connection factory has a connect_attempt_count value of 5 and the Java system property com.tibco.tibjms.connect.attempts is set to 3 for the Java client, then the effective connect_attempt_count will be 15.The connection factory connect attempt and reconnect attempt properties are documented in factories.conf on page 251.The sections Setting Connection Attempts, Timeout and Delay Parameters and Setting Reconnection Failure Parameters describe the use of these settings.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |