Reverted the RuntimeBeanReference to a String value for the constructor-arg of the Subscription object when parsing an endpoint. That is necessary to handle the case where channels are 'auto-created' by the MessageBus on demand (e.g. HelloWorldDemo).

This commit is contained in:
Mark Fisher
2008-05-19 13:45:24 +00:00
parent 984d335f14
commit 73f4a0c7de
3 changed files with 2 additions and 4 deletions

View File

@@ -30,7 +30,6 @@ import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.integration.ConfigurationException;
import org.springframework.integration.endpoint.ConcurrencyPolicy;
import org.springframework.integration.handler.DefaultMessageHandlerAdapter;
import org.springframework.integration.scheduling.PollingSchedule;
import org.springframework.integration.scheduling.Schedule;
import org.springframework.integration.scheduling.Subscription;
@@ -111,7 +110,7 @@ public abstract class AbstractTargetEndpointParser extends AbstractSingleBeanDef
}
if (StringUtils.hasText(inputChannel)) {
RootBeanDefinition subscriptionDef = new RootBeanDefinition(Subscription.class);
subscriptionDef.getConstructorArgumentValues().addGenericArgumentValue(new RuntimeBeanReference(inputChannel));
subscriptionDef.getConstructorArgumentValues().addGenericArgumentValue(inputChannel);
if (schedule != null) {
subscriptionDef.getConstructorArgumentValues().addGenericArgumentValue(schedule);
}