open class JmsInvokerServiceExporter : RemoteInvocationBasedExporter, SessionAwareMessageListener<Message>, InitializingBean
JMS message listener that exports the specified service bean as a JMS service endpoint, accessible via a JMS invoker proxy.
Note that this class implements Spring's org.springframework.jms.listener.SessionAwareMessageListener interface, since it requires access to the active JMS Session. Hence, this class can only be used with message listener containers which support the SessionAwareMessageListener interface (e.g. Spring's org.springframework.jms.listener.DefaultMessageListenerContainer).
Thanks to James Strachan for the original prototype that this JMS invoker mechanism was inspired by!
Author
Juergen Hoeller
Author
James Strachan
Since
2.0
See Also
JmsInvokerClientInterceptorJmsInvokerProxyFactoryBean
JmsInvokerServiceExporter()
JMS message listener that exports the specified service bean as a JMS service endpoint, accessible via a JMS invoker proxy. Note that this class implements Spring's org.springframework.jms.listener.SessionAwareMessageListener interface, since it requires access to the active JMS Session. Hence, this class can only be used with message listener containers which support the SessionAwareMessageListener interface (e.g. Spring's org.springframework.jms.listener.DefaultMessageListenerContainer). Thanks to James Strachan for the original prototype that this JMS invoker mechanism was inspired by! |
open fun afterPropertiesSet(): Unit |
|
open fun onMessage(requestMessage: Message, session: Session): Unit |
|
open fun setIgnoreInvalidRequests(ignoreInvalidRequests: Boolean): Unit
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). |
|
open fun setMessageConverter(messageConverter: MessageConverter): Unit
Specify the MessageConverter to use for turning request messages into org.springframework.remoting.support.RemoteInvocation objects, as well as org.springframework.remoting.support.RemoteInvocationResult objects into response messages. Default is a org.springframework.jms.support.converter.SimpleMessageConverter, using a standard JMS javax.jms.ObjectMessage for each invocation / invocation result object. Custom implementations may generally adapt Serializables into special kinds of messages, or might be specifically tailored for translating RemoteInvocation(Result)s into specific kinds of messages. |