Exception Listener

 

Configuration and Testing. PAGEREF _Toc225244380 \h 2

Attributes. PAGEREF _Toc225244382 \h 2

Connection to Enterprise Server PAGEREF _Toc225244383 \h 5

Functional Demonstration. PAGEREF _Toc225244384 \h 6

Scenario 1. PAGEREF _Toc225244385 \h 6

Scenario 2. PAGEREF _Toc225244386 \h 6

Use Case Scenario. PAGEREF _Toc225244387 \h 7

Useful Tips. PAGEREF _Toc225244388 \h 8

 

The Exception Listener component listens for exceptions from components running in a Fiorano network. It connects to the configured Enterprise Server and obtains details of all running Peer Servers whose names match the regular expression provided in the configuration. It then subscribes for messages on all topics, whose names match the regular expression in configuration, for each Peer Server identified. With the default values for regular expressions the component listens for messages on topics whose names end with ON_EXCEPTION on all Peer Servers.  It sends out messages received from configured topics on its output port. Messages sent out from the component have an additional string property ESBX_SYSTEM_SOURCE_TOPIC_NAME that contains the name of topic to which the message was actually sent.

Configuration and Testing

 

Figure 1: Configurations of Exception Listener

TOP

Attributes

Connect only to host peer server

This property determines whether the component should listen for messages only from topics on the Peer Server on which the component is running.

The component listens for messages only from the configured topics on the Peer Server on which this component is running. When this value is selected neither Enterprise Server connection is needed to fetch the details of Peer Servers nor the regular expression for matching the Peer Server name and hence, properties Pattern for peer server name, Server URL, Back Up Server URL, JMS User Name, JMS Password are hidden.

The component listens for messages from the configured topics on configured Peer Servers. When this value is selected an Enterprise Server connection to fetch the details of Peer Servers and the regular expression for filtering Peer Servers are needed and hence, properties Pattern for peer server name, Server URL, Backup Server URL, JMS User Name, JMS Password are shown.

Pattern for peer server name

This property determines the Peer Servers from the Fiorano network that have to be monitored. The Fiorano network from which Peer Servers are filtered is determined by the Enterprise Server details provided against properties Server URL and Backup Server URL.

Click the ellipsis button  to specify the pattern matching condition(s). A dialog box appears containing a table with two fields:

Name – This column contains the regular expression that should be used to match the Peer Server name. Regular expressions should follow the syntax described java.util.regex.Pattern. Please check the following link for details http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html

Value – The value in this column determines whether Peer Servers whose names match regular expression defined in Name column should be monitored or not. If this column value is, ignoring case, true then the Peer Servers whose names match the regular expression is selected. If the value is false, Peer Servers whose names match the regular expression is not selected.

Figure 2: Defining regular expression for filtering peer servers

If no patterns are defined, then no Peer Server will be selected and the component does not listen for any messages. When there are multiple pattern matches defined for each Peer Server name in Fiorano network, validation against all pattern matching conditions is performed. If even a single pattern matching condition is not satisfied, the Peer Server will not be selected.

Patterns can be loaded from a properties file using File... button. Click the following link http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#load(java.io.InputStream for details on properties file.

Example:

Figure 3: Sample pattern matching condition

Pattern matching condition in Figure 3 matches and selects all Peer Servers whose name has English alphabets only, but does not start with B.

Server URL

The URL of Enterprise Server to which the Peer Servers that have to be monitored are connected. For more information, refer to section Connection to Enterprise Server.

Back Up Server URL

The alternate URL that should be tried for connecting to the Enterprise Server if the Enterprise Server cannot be connected to using the URL mentioned against property Server URL. For more information, refer to section Connection to Enterprise Server.

Note: In case of Enterprise Servers in HA mode, this should point to Secondary Server URL if the primary is set against Server URL property and vice-versa.

JMS User Name

The user name to connect to the Enterprise Server. For more information, refer to section Connection to Enterprise Server.

JMS Password

The password to connect to the Enterprise Server. For more information, refer to section Connection to Enterprise Server.

InitialContextFactory

InitialContextFactory implementation class name which can be used to create Initial Context that is used to lookup Peer Server's administration object. This is required to find the list of topics created on Peer Server.

Note: This property need not be changed normally.

JNDI User Name

The user name required to create Initial Context for looking up objects on Peer Server. This user should be present  on each of the Peer Servers and have permission to perform lookup for JMS objects.

JNDI Password

The password for user provided against property JNDI User Name required to create Initial Context for looking up objects on Peer Server.

Regex of Topic Name

This property determines the topics on Peer Servers from the Fiorano network that have to be monitored. Refer help for property Pattern for peer server name to specify pattern matching conditions for topic names.

Time Slice To Ping Peers

This property determines the time interval in milliseconds after which the component has to periodically poll for changes in Peer Servers and topics. At every poll interval, the component does the following:

o         If the Peer Server is not available in the network but the component has created and cached a connection to the Peer Server during previous polls, then the connection is discarded.

o         If the Peer Server is available in the network, but component has not created and cached a connection to the Peer Server during previous polls, then a new connection is made and cached.

TOP

Connection to Enterprise Server

A connection to Enterprise Server is required only if property Connect only to host peer server is set to yes. The connection is made during the component launch using the properties Server URL, Back Up Server URL, JMS User Name, and JMS Password. If the Enterprise Server connection cannot be successfully made during the component launch, the component is automatically stopped and the error is logged in the error logs of the component.

Whenever, the component tries to check for newly added Peer Servers or topics which match configured criteria based on property Time Slice To Ping Peers it validates connection with Enterprise Server and if the connection is found invalid, it tries to reconnect using the configured Enterprise Server details.

TOP

Functional Demonstration

Scenario 1

The Regular Expression can be specified to match or differ based on the configuration. To allow topics whose name  matches with the regular expression, the value column for that Regular Expression must be set as true. To allow topics whose name does not match with a regular expression, the value column for that regular expression must be set as false.

To make the exception listener listen to the error ports of all the Event Processes other than itself, the regular expression list can be specified as shown in Figure 4.

Figure 4: Configuration to listen on exception ports of only one event process

Similarly, regular expressions can be used to match the peers on which the exception listener has to subscribe to.

TOP

Scenario 2

Configure the Exception Listener as described in Configuration and Testing section; configure a CBR with any schema. Use feeder to send an improper message to the CBR and display component to check the output message send by Exception Listener (which is picked from the exception port of CBR) on its output port.

Figure 5: Event process for scenario 2

Sample Input

Figure 6: Sample Inout

Sample Output

Figure 7: Sample Output

TOP

Use Case Scenario

In a sales force integration scenario, exception listener component listens for exceptions which might occur at any step of the process.

Figure 8: Salesforce Integration scenario

The Event Process demonstrating this scenario is bundled with the installer.

Documentation of the scenario and instructions to run the flow can be found in the Help tab of flow when open in Studio.

TOP

Useful Tips

TOP

Copyright © 1999-2008, Fiorano Software Technologies Pvt. Ltd. All rights reserved.

Copyright © 2008-2009, Fiorano Software Pty. Ltd. All rights reserved.

This software is the confidential and proprietary information of Fiorano Software ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the license agreement enclosed with this product or entered into with Fiorano.