Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Integration Server Administrator's Guide | Managing JMS Triggers | What Happens When JMS Triggers Fail to Start?
 
What Happens When JMS Triggers Fail to Start?
 
How Does the JMS Trigger Restart Task Work?
When a JMS connection alias starts, Integration Server attempts to start all of the JMS triggers that use that JMS connection alias to retrieve messages from the JMS provider. Starting a JMS trigger can fail due to the following reasons:
*The JMS trigger and/or the JMS provider are not configured correctly (for example, the lookup name for the destination that the trigger subscribes to does not exist on the JNDI provider or the Integration Server does not have sufficient privileges to retrieve messages from the destination). If incorrect configuration of the JMS trigger or JMS provider prevents JMS triggers from starting, Integration Server can take no further action to start the trigger. Integration Server logs an exception which will be visible in the JMS Trigger Management page of Integration Server Administrator. The JMS trigger remains inactive until the configuration is resolved and the trigger is manually restarted (i.e. enabled).
*The JMS provider is not available at the time Integration Server attempts to start the JMS trigger. If the JMS provider is not available, the JMS connection alias will fail as well. When a connection failure causes a JMS connection alias to stop Integration Server attempts to restart the JMS connection alias every 20 seconds. When the connection to the JMS provider is restored, the JMS connection alias restarts, and Integration Server attempts to start all of the JMS triggers that use the JMS connection alias.
*The destination is temporarily unavailable on the JMS provider. In the case of Universal Messaging, a queue/channel may be unavailable temporarily if the user edits or performs maintenances on the queue/channel at the same time Integration Server attempts to start the JMS trigger. To handle this temporary situation, Integration Server retries starting the trigger if watt.server.jms.trigger.startupFailure.retryCount server configuration parameter is set to a value greater than 0 and one of the following is true:
*The JMS trigger is configured to use more than one connection and at least one of the trigger instances has already started successfully. When a JMS trigger uses multiple connections, a new instance of the trigger will be started for each connection.
*The JMS trigger failed because of a javax.jms.InvalidDestinationException. Note that a a javax.jms.InvalidDestinationException does not include a JNDI lookup failure which is a javax.naming.NamingException.
The watt.server.jms.trigger.startupFailure.retryCount parameter value determines the maximum number of retry attempts that Integration Server makes to start a JMS trigger after the trigger fails to start. After the initial trigger startup failure, Integration Server waits an interval of 1000 milliseconds and then retries starting the trigger. If startup of the trigger fails, Integration Server waits 1000 milliseconds and then makes another attempt to start the trigger. Integration Server continues in this way until the JMS trigger starts successfully, the JMS connection alias stops running, or the JMS trigger becomes disabled. When starting the trigger fails after Integration Server makes the maximum number of retry attempts, Integration Server can take no further action to start the trigger. Integration Server logs an exception which will be visible in the JMS Trigger Management page of Integration Server Administrator. The JMS trigger remains inactive until the problem is resolved and the trigger is manually restarted (i.e. enabled).
The watt.server.jms.trigger.startupFailure.retryCount parameter must be set to an integer greater than or equal to 0. When the parameter is set to 0, the default, Integration Server does not make any retry attempts.
Excessive retry attempts may cause the JMS connection alias startup time to be delayed because Integration Server uses the same thread to make retry attempts that it uses to star the alias.
It is possible that a correctly configured JMS trigger fails to start after the JMS connection alias starts up successfully. This is sometimes observed when the JMS connection alias connects to one Universal Messaging server in a Universal Messaging cluster and the JMS trigger connects to a different server in the cluster. In some cases, the JMS trigger may start successfully after a short delay. To allow these triggers to start up automatically, Integration Server schedules a task to retry starting the JMS trigger. For more information about the trigger restart task, see How Does the JMS Trigger Restart Task Work? .