diff --git a/.classpath b/.classpath index 98cf23a..87b4010 100644 --- a/.classpath +++ b/.classpath @@ -12,10 +12,6 @@ - - - - - + diff --git a/.project b/.project index ba707a1..a4c1e0d 100644 --- a/.project +++ b/.project @@ -26,14 +26,8 @@ - - org.springframework.ide.eclipse.core.springbuilder - - - - org.springframework.ide.eclipse.core.springnature org.eclipse.jem.workbench.JavaEMFNature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jdt.groovy.core.groovyNature diff --git a/pom.xml b/pom.xml index 435b26d..d34b9f9 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ UTF8 3.1.0.M2 - 2.0.4.RELEASE + 2.1.0.BUILD-SNAPSHOT true @@ -32,7 +32,7 @@ log4j log4j - 1.2.12 + 1.2.15 test diff --git a/src/main/java/org/springframework/integration/flow/handler/FlowMessageHandler.java b/src/main/java/org/springframework/integration/flow/handler/FlowMessageHandler.java index 7313687..9bc407a 100644 --- a/src/main/java/org/springframework/integration/flow/handler/FlowMessageHandler.java +++ b/src/main/java/org/springframework/integration/flow/handler/FlowMessageHandler.java @@ -36,7 +36,12 @@ import org.springframework.integration.support.MessageBuilder; */ public class FlowMessageHandler extends AbstractReplyProducingMessageHandler { - private static Log log = LogFactory.getLog(FlowMessageHandler.class); + /** + * + */ + private static final String FLOW_CONVERSATION_ID_HEADER = "flow.conversation.id"; + + private static Log log = LogFactory.getLog(FlowMessageHandler.class); private final MessageChannel flowInputChannel; @@ -54,7 +59,7 @@ public class FlowMessageHandler extends AbstractReplyProducingMessageHandler { protected Object handleRequestMessage(Message requestMessage) { UUID conversationId = requestMessage.getHeaders().getId(); - Map flowConversationIdHeader = Collections.singletonMap("flow.conversation.id", + Map flowConversationIdHeader = Collections.singletonMap(FLOW_CONVERSATION_ID_HEADER, (Object) conversationId); Message message = MessageBuilder @@ -69,14 +74,14 @@ public class FlowMessageHandler extends AbstractReplyProducingMessageHandler { flowInputChannel.send(message); while ((response = flowOutputChannel.receive(timeout)) != null) { - if (conversationId.equals(response.getHeaders().get("flow.conversation.id"))) { + if (conversationId.equals(response.getHeaders().get(FLOW_CONVERSATION_ID_HEADER))) { return response; } else { if (response.getPayload() instanceof MessagingException) { MessagingException me = (MessagingException) response.getPayload(); log.debug("failed message: " + me.getFailedMessage()); - if (conversationId.equals(me.getFailedMessage().getHeaders().get("flow.conversation.id"))) { + if (conversationId.equals(me.getFailedMessage().getHeaders().get(FLOW_CONVERSATION_ID_HEADER))) { return response; } @@ -85,7 +90,7 @@ public class FlowMessageHandler extends AbstractReplyProducingMessageHandler { } } catch (MessagingException me) { log.error(me.getMessage(), me); - if (conversationId.equals(me.getFailedMessage().getHeaders().get("flow.conversation.id"))) { + if (conversationId.equals(me.getFailedMessage().getHeaders().get(FLOW_CONVERSATION_ID_HEADER))) { return new ErrorMessage(me); } } diff --git a/src/main/resources/META-INF/spring.schemas b/src/main/resources/META-INF/spring.schemas index eeab0be..a348fc1 100644 --- a/src/main/resources/META-INF/spring.schemas +++ b/src/main/resources/META-INF/spring.schemas @@ -1,2 +1,3 @@ http\://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd=org/springframework/integration/flow/config/spring-integration-flow-2.0.xsd -http\://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd=org/springframework/integration/flow/config/spring-integration-flow-2.0.xsd \ No newline at end of file +http\://www.springframework.org/schema/integration/flow/spring-integration-flow-2.1.xsd=org/springframework/integration/flow/config/spring-integration-flow-2.1.xsd +http\://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd=org/springframework/integration/flow/config/spring-integration-flow-2.1.xsd \ No newline at end of file diff --git a/src/main/resources/org/springframework/integration/flow/config/spring-integration-flow-2.0.xsd b/src/main/resources/org/springframework/integration/flow/config/spring-integration-flow-2.0.xsd index de47fce..0316d8c 100644 --- a/src/main/resources/org/springframework/integration/flow/config/spring-integration-flow-2.0.xsd +++ b/src/main/resources/org/springframework/integration/flow/config/spring-integration-flow-2.0.xsd @@ -1,13 +1,14 @@ - + diff --git a/src/main/resources/org/springframework/integration/flow/config/spring-integration-flow-2.1.xsd b/src/main/resources/org/springframework/integration/flow/config/spring-integration-flow-2.1.xsd new file mode 100644 index 0000000..32a30a4 --- /dev/null +++ b/src/main/resources/org/springframework/integration/flow/config/spring-integration-flow-2.1.xsd @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The receiving Message channel of this endpoint + + + + + + + + + + + + + The receiving Message channel of this endpoint + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/springframework/integration/flow/config/xml/FlowWithErrorTest.java b/src/test/java/org/springframework/integration/flow/config/xml/FlowWithErrorTest.java index 3c2ae58..b5e66f4 100644 --- a/src/test/java/org/springframework/integration/flow/config/xml/FlowWithErrorTest.java +++ b/src/test/java/org/springframework/integration/flow/config/xml/FlowWithErrorTest.java @@ -61,8 +61,7 @@ public class FlowWithErrorTest { @Override public void handleMessage(Message message) throws MessagingException { - assertTrue( message.getPayload() instanceof MessagingException ); - System.out.println("got error message"); + assertTrue( message.getPayload() instanceof MessagingException ); } }); diff --git a/src/test/resources/FlowClientNamespaceTest-context.xml b/src/test/resources/FlowClientNamespaceTest-context.xml index 8b5e275..59d38ac 100644 --- a/src/test/resources/FlowClientNamespaceTest-context.xml +++ b/src/test/resources/FlowClientNamespaceTest-context.xml @@ -1,9 +1,10 @@ diff --git a/src/test/resources/FlowConfigNamespaceTest-context.xml b/src/test/resources/FlowConfigNamespaceTest-context.xml index 2dd7b65..0b346e3 100644 --- a/src/test/resources/FlowConfigNamespaceTest-context.xml +++ b/src/test/resources/FlowConfigNamespaceTest-context.xml @@ -1,10 +1,10 @@ diff --git a/src/test/resources/FlowWithErrorTest-context.xml b/src/test/resources/FlowWithErrorTest-context.xml index 4f9814c..8d5a40f 100644 --- a/src/test/resources/FlowWithErrorTest-context.xml +++ b/src/test/resources/FlowWithErrorTest-context.xml @@ -5,7 +5,7 @@ xmlns:int-flow="http://www.springframework.org/schema/integration/flow" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd - http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd + http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd"> diff --git a/src/test/resources/FlowWithOptionalResponseTest-context.xml b/src/test/resources/FlowWithOptionalResponseTest-context.xml index 129882c..511e26c 100644 --- a/src/test/resources/FlowWithOptionalResponseTest-context.xml +++ b/src/test/resources/FlowWithOptionalResponseTest-context.xml @@ -5,7 +5,7 @@ xmlns:int-flow="http://www.springframework.org/schema/integration/flow" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd - http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd + http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd"> diff --git a/src/test/resources/FlowWithReferencesTest-context.xml b/src/test/resources/FlowWithReferencesTest-context.xml index 03cbfc7..11f5e76 100644 --- a/src/test/resources/FlowWithReferencesTest-context.xml +++ b/src/test/resources/FlowWithReferencesTest-context.xml @@ -1,10 +1,10 @@ diff --git a/src/test/resources/META-INF/spring/integration/flows/no-response/flow-context.xml b/src/test/resources/META-INF/spring/integration/flows/no-response/flow-context.xml index 504c164..2a05aea 100644 --- a/src/test/resources/META-INF/spring/integration/flows/no-response/flow-context.xml +++ b/src/test/resources/META-INF/spring/integration/flows/no-response/flow-context.xml @@ -5,7 +5,7 @@ xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-flow="http://www.springframework.org/schema/integration/flow" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd - http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd + http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> diff --git a/src/test/resources/META-INF/spring/integration/flows/optional-response/flow-context.xml b/src/test/resources/META-INF/spring/integration/flows/optional-response/flow-context.xml index 1d30caf..a367b45 100644 --- a/src/test/resources/META-INF/spring/integration/flows/optional-response/flow-context.xml +++ b/src/test/resources/META-INF/spring/integration/flows/optional-response/flow-context.xml @@ -5,7 +5,7 @@ xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-flow="http://www.springframework.org/schema/integration/flow" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd - http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd + http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> diff --git a/src/test/resources/META-INF/spring/integration/flows/subflow1/subflow1-context.xml b/src/test/resources/META-INF/spring/integration/flows/subflow1/subflow1-context.xml index bef9b04..ee19edc 100644 --- a/src/test/resources/META-INF/spring/integration/flows/subflow1/subflow1-context.xml +++ b/src/test/resources/META-INF/spring/integration/flows/subflow1/subflow1-context.xml @@ -5,7 +5,7 @@ xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-flow="http://www.springframework.org/schema/integration/flow" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd - http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd + http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> diff --git a/src/test/resources/META-INF/spring/integration/flows/subflow2/subflow2-context.xml b/src/test/resources/META-INF/spring/integration/flows/subflow2/subflow2-context.xml index b4f9078..9164c37 100644 --- a/src/test/resources/META-INF/spring/integration/flows/subflow2/subflow2-context.xml +++ b/src/test/resources/META-INF/spring/integration/flows/subflow2/subflow2-context.xml @@ -6,7 +6,7 @@ xmlns:int-flow="http://www.springframework.org/schema/integration/flow" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd - http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd + http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> diff --git a/src/test/resources/META-INF/spring/integration/flows/subflow4/subflow4-context.xml b/src/test/resources/META-INF/spring/integration/flows/subflow4/subflow4-context.xml index be9ff94..d4c3b5b 100644 --- a/src/test/resources/META-INF/spring/integration/flows/subflow4/subflow4-context.xml +++ b/src/test/resources/META-INF/spring/integration/flows/subflow4/subflow4-context.xml @@ -6,7 +6,7 @@ xmlns:int-flow="http://www.springframework.org/schema/integration/flow" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd - http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd + http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> diff --git a/src/test/resources/META-INF/spring/integration/flows/subflow5/subflow5-context.xml b/src/test/resources/META-INF/spring/integration/flows/subflow5/subflow5-context.xml index 3c5d7a1..68bc74e 100644 --- a/src/test/resources/META-INF/spring/integration/flows/subflow5/subflow5-context.xml +++ b/src/test/resources/META-INF/spring/integration/flows/subflow5/subflow5-context.xml @@ -6,7 +6,7 @@ xmlns:int-flow="http://www.springframework.org/schema/integration/flow" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd - http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow-2.0.xsd + http://www.springframework.org/schema/integration/flow http://www.springframework.org/schema/integration/flow/spring-integration-flow.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">