From 86232ef258d834c74e5a6140505734042c3fa165 Mon Sep 17 00:00:00 2001 From: Gunnar Hillert Date: Mon, 9 Jan 2012 23:25:34 -0500 Subject: [PATCH 1/2] INTSAMPLES-48 Add SLF4J dependency Also add Spring Integration JMS dependency For reference see: https://jira.springsource.org/browse/INTSAMPLES-48 --- basic/jms/pom.xml | 41 ++++++++++++++++--- basic/jms/src/main/resources/logback.xml | 24 +++++++++++ .../samples/jms/ChannelAdapterDemo.java | 18 ++++++-- basic/jms/src/test/resources/log4j.xml | 36 ---------------- 4 files changed, 74 insertions(+), 45 deletions(-) create mode 100644 basic/jms/src/main/resources/logback.xml delete mode 100644 basic/jms/src/test/resources/log4j.xml diff --git a/basic/jms/pom.xml b/basic/jms/pom.xml index 595aedcf..452e5da1 100644 --- a/basic/jms/pom.xml +++ b/basic/jms/pom.xml @@ -11,8 +11,18 @@ UTF-8 2.1.0.RELEASE 5.5.1 + 1.6.4 + 4.10 + + + junit + junit + ${junit.version} + test + + org.apache.activemq activemq-core @@ -22,13 +32,12 @@ spring-context org.springframework + + slf4j-api + org.slf4j + - - - - - org.springframework spring-jms @@ -39,12 +48,34 @@ org.springframework.integration spring-integration-core ${spring.integration.version} + + + org.springframework.integration + spring-integration-jms + ${spring.integration.version} org.springframework.integration spring-integration-stream ${spring.integration.version} + + + ch.qos.logback + logback-classic + 1.0.0 + + + org.slf4j + log4j-over-slf4j + ${slf4j.version} + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + + diff --git a/basic/jms/src/main/resources/logback.xml b/basic/jms/src/main/resources/logback.xml new file mode 100644 index 00000000..eee6b966 --- /dev/null +++ b/basic/jms/src/main/resources/logback.xml @@ -0,0 +1,24 @@ + + + + + + + %d %5p | %t | %-55logger{55} | %m %n + + + + + + + + + + + + + + + + + diff --git a/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java b/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java index fc19ae79..0c53be59 100644 --- a/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java +++ b/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java @@ -16,7 +16,18 @@ package org.springframework.integration.samples.jms; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +import junit.framework.Assert; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.integration.MessageChannel; +import org.springframework.integration.support.MessageBuilder; /** * A simple bootstrap main() method for starting a pair of JMS Channel @@ -26,18 +37,17 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * Destination and will echo the result in the console. *

* See the configuration in the three XML files that are referenced below. - * + * * @author Mark Fisher */ public class ChannelAdapterDemo { private final static String[] configFiles = { - "/META-INF/spring/integration/common.xml", - "/META-INF/spring/integration/inboundChannelAdapter.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); diff --git a/basic/jms/src/test/resources/log4j.xml b/basic/jms/src/test/resources/log4j.xml deleted file mode 100644 index dc3bb774..00000000 --- a/basic/jms/src/test/resources/log4j.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 3577dbe1cbeb716f954db51e57d8634d5c96c7ea Mon Sep 17 00:00:00 2001 From: Gunnar Hillert Date: Tue, 17 Jan 2012 14:24:33 -0500 Subject: [PATCH 2/2] INTSAMPLES-48 Decided to continue to use Log4J --- basic/jms/pom.xml | 12 +--------- basic/jms/src/main/resources/log4j.xml | 28 ++++++++++++++++++++++++ basic/jms/src/main/resources/logback.xml | 24 -------------------- 3 files changed, 29 insertions(+), 35 deletions(-) create mode 100644 basic/jms/src/main/resources/log4j.xml delete mode 100644 basic/jms/src/main/resources/logback.xml diff --git a/basic/jms/pom.xml b/basic/jms/pom.xml index 452e5da1..cae18afb 100644 --- a/basic/jms/pom.xml +++ b/basic/jms/pom.xml @@ -60,19 +60,9 @@ ${spring.integration.version} - - ch.qos.logback - logback-classic - 1.0.0 - org.slf4j - log4j-over-slf4j - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j + slf4j-log4j12 ${slf4j.version} diff --git a/basic/jms/src/main/resources/log4j.xml b/basic/jms/src/main/resources/log4j.xml new file mode 100644 index 00000000..f391e2ed --- /dev/null +++ b/basic/jms/src/main/resources/log4j.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/basic/jms/src/main/resources/logback.xml b/basic/jms/src/main/resources/logback.xml deleted file mode 100644 index eee6b966..00000000 --- a/basic/jms/src/main/resources/logback.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - %d %5p | %t | %-55logger{55} | %m %n - - - - - - - - - - - - - - - - -