Skip to content

Instantly share code, notes, and snippets.

@snicoll
Created March 12, 2014 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snicoll/9505882 to your computer and use it in GitHub Desktop.
Save snicoll/9505882 to your computer and use it in GitHub Desktop.
@EnableJms
@Configuration
static class EnableJmsConfig {
@Bean
public JmsListenerContainerTestFactory defaultJmsListenerContainerFactory() {
return new JmsListenerContainerTestFactory("default");
}
@Bean
public JmsListenerContainerTestFactory simpleJmsListenerContainerFactory() {
return new JmsListenerContainerTestFactory("simple");
}
}
@Component
static class SampleBean {
@JmsListener(destination = "myQueue")
public void defaultHandle(String msg) {
}
@JmsListener(factoryId = "simple", destination = "myQueue")
public void simpleHandle(String msg) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment