How can I connect to the active EMS server in a FT URL from applications using the Admin API?
book
Article ID: KB0094265
calendar_today
Updated On:
Products
Versions
TIBCO Enterprise Message Service
-
Not Applicable
-
Description
Resolution: Description: ========= We allow users to connect to the standby EMS server by using the EMS Admin Tool (tibemsadmin) or applications using the Admin API. Any Admin change made through a standby server can be persisted in the configuration files. If both EMS FT servers share configuration files, the active server will not "see" the change as the EMS server only processes configuration files during starting up or becoming active. We don't recommend the user making admin changes via a standby server.
If your application is using the Admin API is connected to EMS via FT URL, you can use the following to find out if the server connected is the "active" server.
1). Connect to the servers in the URL list. 2). If the server connected is not the active server, close the connection and connect to the next server.
Example:
TibjmsAdmin admin = new TibjmsAdmin(serverUrl,username,password,environment); int serverstate = admin.getInfo().getState(); if (serverstate == ServerInfo.SERVER_ACTIVE) {...}
Environment: ======== All
Issue/Introduction
How can I connect to the active EMS server in a FT URL from applications using the Admin API?