use of org.springframework.jms.support.converter.MessagingMessageConverter in project spring-framework by spring-projects.
the class JmsListenerContainerFactoryIntegrationTests method messagingMessageConverterCanBeUsed.
@Test
public void messagingMessageConverterCanBeUsed() throws JMSException {
MessagingMessageConverter converter = new MessagingMessageConverter();
converter.setPayloadConverter(new UpperCaseMessageConverter());
this.containerFactory.setMessageConverter(converter);
testMessageConverterIsUsed();
}
use of org.springframework.jms.support.converter.MessagingMessageConverter in project spring-framework by spring-projects.
the class JmsMessagingTemplateTests method customConverterAlwaysTakesPrecedence.
@Test
public void customConverterAlwaysTakesPrecedence() {
MessageConverter customMessageConverter = mock(MessageConverter.class);
JmsMessagingTemplate messagingTemplate = new JmsMessagingTemplate();
messagingTemplate.setJmsMessageConverter(new MessagingMessageConverter(customMessageConverter));
messagingTemplate.setJmsTemplate(this.jmsTemplate);
messagingTemplate.afterPropertiesSet();
assertPayloadConverter(messagingTemplate, customMessageConverter);
}
Aggregations