-
Dec 21st, 2011, 05:13 AM
#1
spring integration spring-integration-2.1.0.RC1
Hello,
1. Kindly let me know about a good link explains about channels, service activators, inbound - outbound with sample configurations.
2. While trying sample code for spring integration gives an error of "no such method" - looks like some jar is missing - not suire which one. Added all jars which comes with download of spring integration spring-integration-2.1.0.RC1.
code is below
public class HelloWorldApp {
private static Logger logger = Logger.getLogger(HelloWorldApp.class);
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext(
"dd/helloworlddemo.xml");
MessageChannel inputChannel = (MessageChannel) context.getBean(
"inputChannel", MessageChannel.class);
PollableChannel outputChannel = (PollableChannel) context.getBean(
"outputChannel", PollableChannel.class);
inputChannel.send(new GenericMessage<String>("World"));
logger.info("==> HelloWorldDemo: "
+ outputChannel.receive(0).getPayload());
}
}
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schem...ring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd">
<channel id="inputChannel"/>
<channel id="outputChannel">
<queue capacity="10"/>
</channel>
<service-activator input-channel="inputChannel"
output-channel="outputChannel"
ref="helloService"
method="sayHello"/>
<beans:bean id="helloService" class="com.hcl.sprngintg.HelloService"/>
</beans:beans>
3. Any example which has inbound as file with polling and outbound as JMS message or webservice message will be great.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules