Este conteúdo não está disponível no idioma selecionado.
Chapter 5. Building and Using Services
5.1. Message Listener Configuration Properties Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Each
listener
configuration needs to supply information for:
- the
registry
(see theservice-category
,service-name
,service-description
andEPR-description
tag names.) If you set the optionalremove-old-service
tag name totrue
, the Enterprise Service Bus will remove any pre-existing service entry from theregistry
and 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
listener
class (see thelistenerClass
tag name). - the endpoint reference that the
listener
will 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-URL
andmessage-selector
tag names). - the
action pipeline
. This needs one or more <action> elements, each of which must contain theclass
tag name. These will determine whichaction
class 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.SystemPrintln
class.
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.