Products | Versions |
---|---|
TIBCO ActiveMatrix Adapter for Websphere MQ | - |
Not Applicable | - |
Resolution:
One of the following two mechanisms can be used to enable the adapter to reconnect to EMS Server in case of server restart or network outages:
Mechanism 1 :
------------
Usage of admqs.tra file for Re-connectivity
-------------------------------------------
1) Add two urls to JmsProviderUrl global variable in admqs.tra separated by a comma.
e.g. tibco.clientVar.JmsProviderUrl =tcp://<ems_server_name>:7222,tcp://<ems_server_name:7222
2) Add two variables as shown below to admqs.tra file. This will be referenced by adapter when it tries to reconnect to JMS server tibco.jmsReconnectCount=10000
tibco.jmsReconnectDelay=5000
3) Go to "Connection Factory Name" field under all available JMS Sessions under "Advanced Folder" of Adapter configuration and make the value blank.
This will make sure that the re-connection settings are picked up from adr3.tra and not from factories.conf
Note :
1. The value of tibco.jmsReconnectDelay above is in millisec
2. The default value for reconnect attempt count is 4. The minimum value is 1.
The default value for the delay (in milliseconds) between reconnection attempts, is 500. The minimum value is 250.
==========================================================================================================
Mechanism 2 :
------------
Usage of EMS factories.conf file for Re-connectivity
-----------------------------------------------------
Steps:
1. Stop the EMS server . If EMS Server is installed as a service on a windows machine, go to the Windows Services icon in Control Panel and double click. From the list of services (as shown in the figure below) select the TIBCO EMS Server Service and click on the stop service button. If EMS Server is installed on UNIX machine, execute the script to stop the EMS server.
2. In Windows Explorer (in case of Windows machines) or on command prompt go to the bin folder under the installation folder
of Tibco EMS (for example C:\tibco\ems\bin).
3. Make a backup copy of the factories.conf file. Open the factories.conf file in notepad/wordpad.
4. Change the following parameters in the file,
[TopicConnectionFactory]
type = topic
url = tcp://<EMS Server Machine Name>:<TCP Port>, tcp://<EMS Server Machine Name>:<TCP Port>
metric = connections
connect_attempt_count = 10000
connect_attempt_delay = 5000
reconnect_attempt_count = 10000
reconnect_attempt_delay = 5000
[QueueConnectionFactory]
type = queue
url = tcp://<EMS Server Machine Name>:<TCP Port>, tcp://<EMS Server
Machine Name>:<TCP Port>
metric = connections
connect_attempt_count = 10000
connect_attempt_delay = 5000
reconnect_attempt_count = 10000
reconnect_attempt_delay = 5000
Note :
a> Do not use localhost as the machine name, please specify the actual machine name in the configuration.
b> It is important to specify the url in the format ur1,ur2 for reconnection to work. In case Fault Tolerant servers are not
being used, the values of url1 and url2 should be the same.
c> Save the factories.conf file
d> Open the file tibemd.conf and set the “listen” parameter to the url format tcp://<EMS Server Machine Name>:<TCP Port>.
Note: Do not use localhost here. Specify the exact machine name for EMS reconnection to work.
e> Save the tibemsd.conf file and start the EMS Server.
f> Check the “JNDI Lookup” check box in the JMS sessions folder in the project if the TRA version is 5.3.x.