Created
March 11, 2014 14:45
-
-
Save snicoll/9487251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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