此内容没有您所选择的语言版本。
Chapter 5. Building and Using Services
5.1. Message Listener Configuration Properties 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Each
listener configuration needs to supply information for:
- the
registry(see theservice-category,service-name,service-descriptionandEPR-descriptiontag names.) If you set the optionalremove-old-servicetag name totrue, the Enterprise Service Bus will remove any pre-existing service entry from theregistryand then add this new instance. Always use this functionality with care as the entire service will be removed, including every end-point reference. - the instantiation of the
listenerclass (see thelistenerClasstag name). - the endpoint reference that the
listenerwill service. This is transport-specific. The following example corresponds to a Java Message Service endpoint reference (see theconnection-factory,destination-type,destination-name,jndi-type,jndi-URLandmessage-selectortag names). - the
action pipeline. This needs one or more <action> elements, each of which must contain theclasstag name. These will determine whichactionclass will be instantiated for that link in thechain.
This example configuration instantiates a
listener object (the jms-listener tag), which will wait for those incoming ESB messages that are serialized within an interface. It then delivers each incoming message to an action pipeline consisting of two steps (<action> elements):
- action1:
MyJMSListenerAction(an example follows). - notificationAction: an
org.jboss.soa.esb.actions.SystemPrintlnclass.
The reason there are two listeners is that the gateway listener is the ESB-unaware listener and its role is to encapsulate the JMS message in the ESB message used throughout the enterprise service bus.