Created
March 29, 2013 01:21
-
-
Save arthurtsang/5268129 to your computer and use it in GitHub Desktop.
Create a Spring Integration Channel programatically and register that as a Spring bean
This file contains hidden or 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
private SubscribableChannel createInputChannel(String inputChannelName) { | |
PublishSubscribeChannel channel = new PublishSubscribeChannel(); | |
channel.setBeanName(inputChannelName); | |
channel.setBeanFactory(applicationContext); | |
//channel.setApplySequence(true); | |
((ConfigurableApplicationContext)applicationContext).getBeanFactory().registerSingleton(inputChannelName, channel); | |
return channel; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment