Skip to content

Instantly share code, notes, and snippets.

@snicoll
Created March 11, 2014 14:45
Show Gist options
  • Save snicoll/9487251 to your computer and use it in GitHub Desktop.
Save snicoll/9487251 to your computer and use it in GitHub Desktop.
@EnableJms
@Configuration
static class EnableJmsConfig {
@Bean
public JmsListenerContainerFactory defaultJmsMJmsListenerContainerFactory() {
DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
factory.setConnectionFactory(testConnectionFactory());
factory.setDestinationResolver(testDestinationResolver());
factory.setMessageConverter(testMessageConverter());
return factory;
}
@Bean
public ConnectionFactory testConnectionFactory() {
return new StubConnectionFactory();
}
@Bean
public DestinationResolver testDestinationResolver() {
return new BeanFactoryDestinationResolver();
}
@Bean
public MessageConverter testMessageConverter() {
return new SimpleMessageConverter();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment