Channel Adapters are now endpoints, but if no "channel" attribute if provided for a <channel-adapter/> element, a DirectChannel will be created automatically. The <poller/> sub-element now belongs within the <channel-adapter/> (not the consumer endpoint downstream). This enables support for multiple Channel Adapters to share a MessageChannel. Also, the @Poller annotation belongs at class-level along with @ChannelAdapter if a @Pollable method is being adapted via MethodInvokingSource.

This commit is contained in:
Mark Fisher
2008-08-17 22:37:35 +00:00
parent c48fa5a361
commit 9b85225675
36 changed files with 701 additions and 802 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ import javax.jms.TopicSubscriber;
*/
public class StubSession implements Session {
private String messageText;
private final String messageText;
public StubSession(String messageText) {

View File

@@ -9,7 +9,11 @@
<si:message-bus/>
<si:channel-adapter id="channel" source="jmsSource"/>
<si:channel id="channel"/>
<si:channel-adapter source="jmsSource" channel="channel">
<si:poller period="5000" initial-delay="0" max-messages-per-poll="1"/>
</si:channel-adapter>
<si:jms-source id="jmsSource" jms-template="jmsTemplate"/>