diff --git a/getting-started/jms/.classpath b/getting-started/jms/.classpath index 24166ba5..dde3100b 100644 --- a/getting-started/jms/.classpath +++ b/getting-started/jms/.classpath @@ -1,6 +1,9 @@ + + + diff --git a/getting-started/jms/.gitignore b/getting-started/jms/.gitignore new file mode 100644 index 00000000..ea8c4bf7 --- /dev/null +++ b/getting-started/jms/.gitignore @@ -0,0 +1 @@ +/target diff --git a/getting-started/jms/README.txt b/getting-started/jms/README.txt deleted file mode 100644 index 4a60dcf3..00000000 --- a/getting-started/jms/README.txt +++ /dev/null @@ -1,9 +0,0 @@ -Instructions for running the HelloWorldDemo sample -------------------------------------------------------------------------------- -1. See README.txt in the parent directory. - -This demo consists of two samples, ChannelAdapterDemo and GatewayDemo. -PLease see the corresponding javadocs for more details on each sample. - - -Happy integration :-) diff --git a/getting-started/jms/activemq-data/localhost/journal/data-1 b/getting-started/jms/activemq-data/localhost/journal/data-1 new file mode 100644 index 00000000..ee276967 Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/journal/data-1 differ diff --git a/getting-started/jms/activemq-data/localhost/journal/data-control b/getting-started/jms/activemq-data/localhost/journal/data-control new file mode 100644 index 00000000..8ddb3b47 Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/journal/data-control differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/data/data-container-roots-1 b/getting-started/jms/activemq-data/localhost/kr-store/data/data-container-roots-1 new file mode 100644 index 00000000..9a7f7a7e Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/data/data-container-roots-1 differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/data/data-queue-data-1 b/getting-started/jms/activemq-data/localhost/kr-store/data/data-queue-data-1 new file mode 100644 index 00000000..6e239cef Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/data/data-queue-data-1 differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/data/hash-index-queue-data_queue#3a#2f#2fqueue.demo b/getting-started/jms/activemq-data/localhost/kr-store/data/hash-index-queue-data_queue#3a#2f#2fqueue.demo new file mode 100644 index 00000000..a32cd6f4 Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/data/hash-index-queue-data_queue#3a#2f#2fqueue.demo differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/data/index-container-roots b/getting-started/jms/activemq-data/localhost/kr-store/data/index-container-roots new file mode 100644 index 00000000..d0c7b846 Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/data/index-container-roots differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/data/index-queue-data b/getting-started/jms/activemq-data/localhost/kr-store/data/index-queue-data new file mode 100644 index 00000000..b08363d8 Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/data/index-queue-data differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/data/lock b/getting-started/jms/activemq-data/localhost/kr-store/data/lock new file mode 100644 index 00000000..e69de29b diff --git a/getting-started/jms/activemq-data/localhost/kr-store/state/data-kaha-1 b/getting-started/jms/activemq-data/localhost/kr-store/state/data-kaha-1 new file mode 100644 index 00000000..e769fa9b Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/state/data-kaha-1 differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/state/data-store-state-1 b/getting-started/jms/activemq-data/localhost/kr-store/state/data-store-state-1 new file mode 100644 index 00000000..cdc3fa73 Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/state/data-store-state-1 differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/state/hash-index-store-state_state b/getting-started/jms/activemq-data/localhost/kr-store/state/hash-index-store-state_state new file mode 100644 index 00000000..a906d976 Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/state/hash-index-store-state_state differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/state/index-kaha b/getting-started/jms/activemq-data/localhost/kr-store/state/index-kaha new file mode 100644 index 00000000..58cd920e Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/state/index-kaha differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/state/index-store-state b/getting-started/jms/activemq-data/localhost/kr-store/state/index-store-state new file mode 100644 index 00000000..b7c6635c Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/state/index-store-state differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/state/index-transactions-state b/getting-started/jms/activemq-data/localhost/kr-store/state/index-transactions-state new file mode 100644 index 00000000..c097b35b Binary files /dev/null and b/getting-started/jms/activemq-data/localhost/kr-store/state/index-transactions-state differ diff --git a/getting-started/jms/activemq-data/localhost/kr-store/state/lock b/getting-started/jms/activemq-data/localhost/kr-store/state/lock new file mode 100644 index 00000000..e69de29b diff --git a/getting-started/jms/activemq-data/localhost/lock b/getting-started/jms/activemq-data/localhost/lock new file mode 100644 index 00000000..e69de29b diff --git a/getting-started/jms/pom.xml b/getting-started/jms/pom.xml index 790df4b4..0d15f61f 100644 --- a/getting-started/jms/pom.xml +++ b/getting-started/jms/pom.xml @@ -2,43 +2,45 @@ 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - + org.springframework.integration.samples jms + 2.0.0 Spring Integration JMS Sample + jar + + 2.0.0.M7 + 5.2.0 + org.apache.activemq activemq-core - 5.2.0 + ${activemq.version} org.springframework.integration spring-integration-jms + ${spring.integration.version} org.springframework.integration spring-integration-stream + ${spring.integration.version} - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + -Xlint:all + true + false + + + + diff --git a/getting-started/jms/readme.txt b/getting-started/jms/readme.txt new file mode 100644 index 00000000..657364b1 --- /dev/null +++ b/getting-started/jms/readme.txt @@ -0,0 +1,16 @@ +This example demonstrates the following aspects of the JMS support available with Spring Integration: +1. JMS Message-driven Channel Adapter +2. JMS Inbound Gateway +3. JMS Outbound Gateway + +as well as Poller and stdout and stdin Channel Adapters (from Stream support) which will allow you to interact with JMS via the console. +It uses ActiveMQ embedded broker + +To run samples simply execute GatewayDemo and ChannelAdapterDemo classes located in the org.springframework.integration.samples.jms package + +When running demos you will see the following prompt: +> Please type something and hit return + +GatewayDemo uses DemoBean service which will echo the response upper-casing it + +ChannelAdapterDemo will simply echo the response \ No newline at end of file diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java index b19127a7..1d9a0b95 100644 --- a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java +++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java @@ -27,7 +27,6 @@ public class DemoBean { @ServiceActivator public String upperCase(String input) { - return input.toUpperCase(); + return "JMS response: " + input.toUpperCase(); } - } diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/common.xml b/getting-started/jms/src/main/resources/META-INF/spring/integration/common.xml similarity index 100% rename from getting-started/jms/src/main/java/org/springframework/integration/samples/jms/common.xml rename to getting-started/jms/src/main/resources/META-INF/spring/integration/common.xml diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundChannelAdapter.xml b/getting-started/jms/src/main/resources/META-INF/spring/integration/inboundChannelAdapter.xml similarity index 100% rename from getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundChannelAdapter.xml rename to getting-started/jms/src/main/resources/META-INF/spring/integration/inboundChannelAdapter.xml diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundGateway.xml b/getting-started/jms/src/main/resources/META-INF/spring/integration/inboundGateway.xml similarity index 100% rename from getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundGateway.xml rename to getting-started/jms/src/main/resources/META-INF/spring/integration/inboundGateway.xml diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundChannelAdapter.xml b/getting-started/jms/src/main/resources/META-INF/spring/integration/outboundChannelAdapter.xml similarity index 100% rename from getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundChannelAdapter.xml rename to getting-started/jms/src/main/resources/META-INF/spring/integration/outboundChannelAdapter.xml diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundGateway.xml b/getting-started/jms/src/main/resources/META-INF/spring/integration/outboundGateway.xml similarity index 100% rename from getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundGateway.xml rename to getting-started/jms/src/main/resources/META-INF/spring/integration/outboundGateway.xml diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java b/getting-started/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java similarity index 86% rename from getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java rename to getting-started/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java index 589f90f4..fc19ae79 100644 --- a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java +++ b/getting-started/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java @@ -32,13 +32,16 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; public class ChannelAdapterDemo { private final static String[] configFiles = { - "common.xml", "inboundChannelAdapter.xml", "outboundChannelAdapter.xml" + "/META-INF/spring/integration/common.xml", + "/META-INF/spring/integration/inboundChannelAdapter.xml", + "/META-INF/spring/integration/outboundChannelAdapter.xml" }; public static void main(String[] args) { ActiveMqTestUtils.prepare(); new ClassPathXmlApplicationContext(configFiles, ChannelAdapterDemo.class); + System.out.println("Please type something and hit return"); } } diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java b/getting-started/jms/src/test/java/org/springframework/integration/samples/jms/GatewayDemo.java similarity index 88% rename from getting-started/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java rename to getting-started/jms/src/test/java/org/springframework/integration/samples/jms/GatewayDemo.java index 35a6022e..db443bc6 100644 --- a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java +++ b/getting-started/jms/src/test/java/org/springframework/integration/samples/jms/GatewayDemo.java @@ -35,13 +35,15 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; public class GatewayDemo { private final static String[] configFiles = { - "common.xml", "inboundGateway.xml", "outboundGateway.xml" + "/META-INF/spring/integration/common.xml", + "/META-INF/spring/integration/inboundGateway.xml", + "/META-INF/spring/integration/outboundGateway.xml" }; - public static void main(String[] args) { ActiveMqTestUtils.prepare(); new ClassPathXmlApplicationContext(configFiles, GatewayDemo.class); + System.out.println("Please type something and hit return"); } } diff --git a/getting-started/jms/src/main/java/log4j.xml b/getting-started/jms/src/test/resources/log4j.xml similarity index 90% rename from getting-started/jms/src/main/java/log4j.xml rename to getting-started/jms/src/test/resources/log4j.xml index a54abb80..5144c9ea 100644 --- a/getting-started/jms/src/main/java/log4j.xml +++ b/getting-started/jms/src/test/resources/log4j.xml @@ -15,8 +15,8 @@ - - + + diff --git a/getting-started/jms/target/classes/log4j.xml b/getting-started/jms/target/classes/log4j.xml deleted file mode 100644 index a54abb80..00000000 --- a/getting-started/jms/target/classes/log4j.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ActiveMqTestUtils.class b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ActiveMqTestUtils.class deleted file mode 100644 index d12db3d0..00000000 Binary files a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ActiveMqTestUtils.class and /dev/null differ diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ChannelAdapterDemo.class b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ChannelAdapterDemo.class deleted file mode 100644 index 6c98ce37..00000000 Binary files a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ChannelAdapterDemo.class and /dev/null differ diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/DemoBean.class b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/DemoBean.class deleted file mode 100644 index 98bc009b..00000000 Binary files a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/DemoBean.class and /dev/null differ diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/GatewayDemo.class b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/GatewayDemo.class deleted file mode 100644 index 5ba58828..00000000 Binary files a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/GatewayDemo.class and /dev/null differ diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/common.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/common.xml deleted file mode 100644 index 0d9c717f..00000000 --- a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/common.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundChannelAdapter.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundChannelAdapter.xml deleted file mode 100644 index 898441c0..00000000 --- a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundChannelAdapter.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundGateway.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundGateway.xml deleted file mode 100644 index 5fa49455..00000000 --- a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundGateway.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundChannelAdapter.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundChannelAdapter.xml deleted file mode 100644 index 33d5b920..00000000 --- a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundChannelAdapter.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundGateway.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundGateway.xml deleted file mode 100644 index 3f282ad6..00000000 --- a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundGateway.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - diff --git a/getting-started/jms/target/jms-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/jms/target/jms-2.0.0.BUILD-SNAPSHOT.jar deleted file mode 100644 index b658a362..00000000 Binary files a/getting-started/jms/target/jms-2.0.0.BUILD-SNAPSHOT.jar and /dev/null differ diff --git a/getting-started/jms/target/maven-archiver/pom.properties b/getting-started/jms/target/maven-archiver/pom.properties deleted file mode 100644 index b494df34..00000000 --- a/getting-started/jms/target/maven-archiver/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by Maven -#Sat Sep 04 08:22:08 EDT 2010 -version=2.0.0.BUILD-SNAPSHOT -groupId=org.springframework.integration.samples -artifactId=jms