Class EsbJmsListener

All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasPhysicalDestination, HasSender, IConfigurable, IJmsListener<jakarta.jms.Message>, IKnowsDeliveryCount<jakarta.jms.Message>, IListener<jakarta.jms.Message>, IPortConnectedListener<jakarta.jms.Message>, IPushingListener<jakarta.jms.Message>, IRedeliveringListener<jakarta.jms.Message>, IScopeProvider, IThreadCountControllable, ITransactionRequirements, IWithParameters, IXAEnabled, NameAware, ReceiverAware<jakarta.jms.Message>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle
Direct Known Subclasses:
FxfListener

@Category(NN_SPECIAL) public class EsbJmsListener extends JmsListener implements ITransactionRequirements
ESB (Enterprise Service Bus) extension of JmsListener.
Author:
Peter Leeuwenburgh
  • Constructor Details

    • EsbJmsListener

      public EsbJmsListener()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: IConfigurable
      Configure this component.

      configure() is called once at startup of the framework in the configure method of the owner of this IConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in the configure(), to improve performance.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class PushingJmsListener
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • getxPathLogMap

      protected Map<String,String> getxPathLogMap()
    • extractMessageProperties

      public Map<String,Object> extractMessageProperties(jakarta.jms.Message rawMessage)
      Description copied from class: AbstractJmsListener
      Fill in thread-context with things needed by the JMSListener code. This includes a Session. The Session object can be passed in externally.
      Overrides:
      extractMessageProperties in class AbstractJmsListener
      Parameters:
      rawMessage - - Original message received, can not be null
      Returns:
      A Map with the properties of the JMS Message.
    • getResultFromXPath

      protected String getResultFromXPath(String message, String xPathExpression)
    • afterMessageProcessed

      public void afterMessageProcessed(PipeLineResult plr, RawMessageWrapper<jakarta.jms.Message> rawMessageWrapper, PipeLineSession pipeLineSession) throws ListenerException
      Description copied from interface: IListener
      Called to perform actions (like committing or sending a reply) after a message has been processed by the Pipeline.
      Specified by:
      afterMessageProcessed in interface IListener<jakarta.jms.Message>
      Overrides:
      afterMessageProcessed in class AbstractJmsListener
      Throws:
      ListenerException
    • getMessageProperties

      protected Map<String,Object> getMessageProperties(PipeLineSession session)
      Description copied from class: AbstractJmsListener
      Set additional message headers/properties on the JMS response, read after message has been processed!
      Overrides:
      getMessageProperties in class AbstractJmsListener
      Parameters:
      session - which has been built during the pipeline
      Returns:
      a map with headers to set to the JMS response, or null if there was no session or no parameters.
    • setMessageProtocol

      @Mandatory public void setMessageProtocol(EsbJmsListener.MessageProtocol string)
      protocol of ESB service to be called
    • isSynchronous

      public boolean isSynchronous()
    • transactionalRequired

      public boolean transactionalRequired()
      Specified by:
      transactionalRequired in interface ITransactionRequirements
    • transactionalAllowed

      public boolean transactionalAllowed()
      Specified by:
      transactionalAllowed in interface ITransactionRequirements
    • setCopyAEProperties

      @Default("false") public void setCopyAEProperties(boolean b)
      if true, all JMS properties in the request starting with "ae_" are copied to the reply.
    • setForceMessageIdAsCorrelationId

      public void setForceMessageIdAsCorrelationId(Boolean force)
      if messageProtocol=RR, default value is: true
      Overrides:
      setForceMessageIdAsCorrelationId in class AbstractJmsListener
    • setUseReplyTo

      public void setUseReplyTo(boolean newUseReplyTo)
      if messageProtocol=FF, default value is: false
      Overrides:
      setUseReplyTo in class AbstractJmsListener
    • setxPathLoggingKeys

      public void setxPathLoggingKeys(String string)
      Comma separated list of all XPath keys that need to be logged. (overrides msg.log.keys property)