Class JmsInvokerServiceExporter

    • Method Detail

      • setIgnoreInvalidRequests

        public void setIgnoreInvalidRequests​(boolean ignoreInvalidRequests)
        Set whether invalidly formatted messages should be discarded. Default is "true".

        Switch this flag to "false" to throw an exception back to the listener container. This will typically lead to redelivery of the message, which is usually undesirable - since the message content will be the same (that is, still invalid).

      • afterPropertiesSet

        public void afterPropertiesSet()
        Description copied from interface: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        Specified by:
        afterPropertiesSet in interface InitializingBean
      • readRemoteInvocation

        @Nullable
        protected RemoteInvocation readRemoteInvocation​(Message requestMessage)
                                                 throws JMSException
        Read a RemoteInvocation from the given JMS message.
        Parameters:
        requestMessage - current request message
        Returns:
        the RemoteInvocation object (or null in case of an invalid message that will simply be ignored)
        Throws:
        JMSException - in case of message access failure
      • createResponseMessage

        protected Message createResponseMessage​(Message request,
                                                Session session,
                                                RemoteInvocationResult result)
                                         throws JMSException
        Create the invocation result response message.

        The default implementation creates a JMS ObjectMessage for the given RemoteInvocationResult object. It sets the response's correlation id to the request message's correlation id, if any; otherwise to the request message id.

        Parameters:
        request - the original request message
        session - the JMS session to use
        result - the invocation result
        Returns:
        the message response to send
        Throws:
        JMSException - if creating the message failed