Broker 10.5 | webMethods Broker Documentation | webMethods Broker Administration Java API Programmer’s Guide | Managing Broker Territories | Using Territory Gateways | Maintaining a Connection Between Gateway Brokers | Activating the Keep-Alive Feature between Gateway Brokers
 
Activating the Keep-Alive Feature between Gateway Brokers
To activate the keep-alive feature on a gateway Broker, you use the BrokerAdminClient.setTerritoryGatewayKeepAlive method and specify the following two parameters:
*territory_name. The name of the territory where the remote gateway Broker resides.
*KeepAlive. The number of seconds between the keep-alive messages. To disable gateway keep-alive feature, specify 0 seconds.
Be aware that BrokerAdminClient.setTerritoryGatewayKeepAlive method activates the keep-alive feature in one direction. That is, it instructs the Broker to which the BrokerAdminClient client is connected, to issue keep-alive messages to the gateway Broker in the other territory. It does not instruct the remote gateway Broker to issue keep-alive messages. To activate keep-alive messages in both directions, you must execute BrokerAdminClient.setTerritoryGatewayKeepAlive on both gateway Brokers.
To implement the keep-alive feature correctly, you must understand the conditions that cause the firewalls to drop a connection. (In most cases, you will need to coordinate with the network administrators at each end of the gateway to obtain information about the behavior of the firewalls.) Given this information, you can determine which gateway Broker must issue keep-alive messages (it may be both) and the frequency at which the messages need to be issued to prevent the connection from dropping.