Software AG Products 10.5 | Administering Integration Server | Configuring Integration Server for JMS Messaging | Monitoring a Connection Factory Object for Changes | Registering an Event Listener
 
Registering an Event Listener
You can monitor a connection factory used by a JMS connection alias for changes by registering an event listener with the JNDI provider. Specifically, Integration Server registers an event listener to be notified about changes to the connection factory object in the JNDI namespace. After registering an event listener, Integration Server can receive notifications for change events or error events for the cluster connection factory object.
Note:Integration Server can register an event listener with any JNDI provider that supports EventContext interface. The webMethods JNDI provider supports the EventContext interface.
A change event indicates that changes occurred in the connection factory object used by the JMS connection alias. When Integration Server receives a change event for the connection factory object, Integration Server refreshes the connection to the webMethods Broker using the new cluster connection factory object.
An error event indicates that a NamingExceptionEvent occurred on the JNDI provider. A NamingExceptionEvent can occur for multiple reasons, one if which is if the connection between Integration Server and the JNDI provider fails. After a NamingExceptionEvent occurs, the JNDI provider deregisters the event listener. As part of monitoring the state of the connection to the webMethods Broker, Integration Server monitors the state of an event listener. If Integration Server determines that the event listener was deregistered, Integration Server re-registers the change listener, polls the connection factory object for changes, and, if necessary, refreshes the connection.
Note:
The value of the watt.server.jms.connection.monitorPeriod configuration property determines the frequency with which Integration Server checks the state of an active connection and any registered change listeners. The default value is 45 seconds.