INT-2275: any outbound-channel-adapter in <chain>

Add re-init logic for nested chains
Add logic about nested element for AbstractChannelAdapterParser
Refactor of DefaultOutboundChannelAdapterParser
Test for non-last nested chain with some outbound-channel-adapter
Improve XSD for chain-type
Manual outbound-channel-adapter ability for chain
Integration tests for all outbound-channel-adapter within <chain>
Remove redundant 'return-value-required' attribute from <stored-proc-outbound-channel-adapter>
Add support 'expectReply' for FileWritingMessageHandler

INT-2275 polishing & refactor FileOutbound*Parser

HttpRequestExecutingMessageHandlerTests polishing

INT-2275: polishing JavaDoc
This commit is contained in:
Artem Bilan
2012-01-03 23:26:16 +02:00
committed by Oleg Zhurakousky
parent 4d5b8d5be1
commit 45c429ee2b
58 changed files with 1302 additions and 318 deletions

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:jms="http://www.springframework.org/schema/integration/jms"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd">
<int:channel id="receiveChannel">
<int:queue/>
</int:channel>
<int:chain input-channel="outboundChainChannel">
<jms:outbound-channel-adapter destination="testQueue"/>
</int:chain>
<jms:message-driven-channel-adapter destination="testQueue" channel="receiveChannel"/>
<bean id="testQueue" class="org.apache.activemq.command.ActiveMQQueue">
<constructor-arg value="test.queue"/>
</bean>
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
</bean>
</beans>

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2002-2012 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.jms;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.Message;
import org.springframework.integration.MessageChannel;
import org.springframework.integration.core.PollableChannel;
import org.springframework.integration.support.MessageBuilder;
import static org.junit.Assert.*;
/**
* //INT-2275
*
* @author Artem Bilan
*/
public class JmsOutboundInsideChainTests {
@Test
public void testJmsOutboundChannelInsideChain(){
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("JmsOutboundInsideChainTests-context.xml", getClass());
PollableChannel receiveChannel = context.getBean("receiveChannel", PollableChannel.class);
MessageChannel outboundChainChannel = context.getBean("outboundChainChannel", MessageChannel.class);
String testString = "test";
Message<String> shippedMessage = MessageBuilder.withPayload(testString).build();
outboundChainChannel.send(shippedMessage);
Message<?> receivedMessage = receiveChannel.receive();
assertEquals(testString, receivedMessage.getPayload());
context.close();
}
}