Java Code Examples for org.springframework.jms.support.converter.SmartMessageConverter

Following code examples demonstrate how to use org.springframework.jms.support.converter.SmartMessageConverterfrom spring-framework. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.springframework.jms.support.converter.SmartMessageConverterand various code implementation of this class.

		protected Object extractPayload(Message message) throws JMSException {
			Object payload = extractMessage(message);
			if (message instanceof BytesMessage) {
				try {
					((BytesMessage) message).reset();
				}
				catch (JMSException ex) {
					logger.debug("Failed to reset BytesMessage after payload extraction", ex);
				}
			}
			return payload;
		} 


Advertisement
Javadoc
An extended MessageConverter SPI with conversion hint support.

In case of a conversion hi

nt being provided, the framework will call the extended method if a converter implements this interface, instead of calling the regular toMessage variant. @author Stephane Nicoll @since 4.3

Read More
Advertisement