camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r908883 - in /camel/trunk/examples/camel-example-reportincident: pom.xml src/main/java/org/apache/camel/example/reportincident/ReportIncidentRoutes.java
Date Thu, 11 Feb 2010 08:56:08 GMT
Author: davsclaus
Date: Thu Feb 11 08:55:53 2010
New Revision: 908883

URL: http://svn.apache.org/viewvc?rev=908883&view=rev
Log:
CAMEL-2462: Fixed report incident example to use mocked mail server. And to log a little activity
on console. And fixed slf4j issue.

Modified:
    camel/trunk/examples/camel-example-reportincident/pom.xml
    camel/trunk/examples/camel-example-reportincident/src/main/java/org/apache/camel/example/reportincident/ReportIncidentRoutes.java

Modified: camel/trunk/examples/camel-example-reportincident/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-reportincident/pom.xml?rev=908883&r1=908882&r2=908883&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-reportincident/pom.xml (original)
+++ camel/trunk/examples/camel-example-reportincident/pom.xml Thu Feb 11 08:55:53 2010
@@ -58,6 +58,12 @@
 			<artifactId>camel-mail</artifactId>
 		</dependency>
 
+        <!-- mock mail server so we do not send an email for real -->
+        <dependency>
+            <groupId>org.apache.camel.tests</groupId>
+            <artifactId>org.apache.camel.tests.mock-javamail_1.7</artifactId>
+        </dependency>
+
 		<!-- cxf -->
 		<dependency>
 			<groupId>org.apache.cxf</groupId>
@@ -82,6 +88,10 @@
 			<groupId>log4j</groupId>
 			<artifactId>log4j</artifactId>
 		</dependency>
+        <dependency>
+           <groupId>org.slf4j</groupId>
+           <artifactId>slf4j-log4j12</artifactId>
+         </dependency>
 
 		<!-- cxf web container for unit testing -->
 		<dependency>
@@ -96,13 +106,6 @@
 			<scope>test</scope>
 		</dependency>
 
-        <!-- unit testing mail using mock -->
-		<dependency>
-		    <groupId>org.apache.camel.tests</groupId>
-		    <artifactId>org.apache.camel.tests.mock-javamail_1.7</artifactId>
-		    <scope>test</scope>
-		</dependency>
-
 	</dependencies>
 
     <build>

Modified: camel/trunk/examples/camel-example-reportincident/src/main/java/org/apache/camel/example/reportincident/ReportIncidentRoutes.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-reportincident/src/main/java/org/apache/camel/example/reportincident/ReportIncidentRoutes.java?rev=908883&r1=908882&r2=908883&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-reportincident/src/main/java/org/apache/camel/example/reportincident/ReportIncidentRoutes.java
(original)
+++ camel/trunk/examples/camel-example-reportincident/src/main/java/org/apache/camel/example/reportincident/ReportIncidentRoutes.java
Thu Feb 11 08:55:53 2010
@@ -62,6 +62,7 @@
             // and store the file
             .to("file://target/subfolder")
             // return OK as response
+            .log("Wrote ${file:name} and returning OK response")
             .transform(constant(ok));
 
         // second part from the file backup -> send email
@@ -69,8 +70,8 @@
             // set the subject of the email
             .setHeader("subject", constant("new incident reported"))
             // send the email
+            .log("Sending email to incident@mycompany.com:\n${body}")
             .to("smtp://someone@localhost?password=secret&to=incident@mycompany.com");
-        
     }
     
     public static void main(String args[]) throws Exception {



Mime
View raw message