<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>commits@camel.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/camel-commits/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/camel-commits/"/>
<id>http://mail-archives.apache.org/mod_mbox/camel-commits/</id>
<updated>2009-12-09T23:25:51Z</updated>
<entry>
<title>[CONF] Apache Camel &gt; Tutorial-Example-ReportIncident-Part1</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c101127183.272.1260391140020.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c101127183-272-1260391140020-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-09T20:39:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
    &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Tutorial-Example-ReportIncident-Part1?focusedCommentId=9371889#comment-9371889"&gt;Tutorial-Example-ReportIncident-Part1&lt;/a&gt;&lt;/h2&gt;
        &lt;h4&gt;Page
        &lt;b&gt;commented&lt;/b&gt; by              &lt;a href="http://cwiki.apache.org/confluence/display/~tranqy"&gt;Aaron
Junod&lt;/a&gt;
    &lt;/h4&gt;
    &lt;br/&gt;
    &lt;div class="notificationGreySide"&gt;
       &lt;p&gt;In Implementing the ReportIncidentEndpoint :  running mvn compile did not
create the java or package folders, or the .java file. I used the .zip as a template and created
the folders and file manually.&lt;/p&gt;

&lt;p&gt;When adding env variable had to be surrounded in quotes. added following to ~/.bash_profile
(osx)&lt;br/&gt;
export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"&lt;/p&gt;
    &lt;/div&gt;

        
    &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Tutorial-Example-ReportIncident-Part1?focusedCommentId=9371889#comment-9371889"&gt;View
Online&lt;/a&gt;
              |
       &lt;a id="reply-9371889" href="http://cwiki.apache.org/confluence/display/CAMEL/Tutorial-Example-ReportIncident-Part1?replyToComment=9371889#comment-9371889"&gt;Reply
To This&lt;/a&gt;
           &lt;/div&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888938 - /camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java</title>
<author><name>janstey@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209195228.D52F62388998@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209195228-D52F62388998@eris-apache-org%3e</id>
<updated>2009-12-09T19:52:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: janstey
Date: Wed Dec  9 19:52:28 2009
New Revision: 888938

URL: http://svn.apache.org/viewvc?rev=888938&amp;view=rev
Log:
get test passing on windows

Modified:
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java?rev=888938&amp;r1=888937&amp;r2=888938&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
Wed Dec  9 19:52:28 2009
@@ -38,7 +38,7 @@
 
     protected String getFtpUrl() {
         base = new File("target/lwd").getAbsolutePath();
-        return "ftp://admin@localhost:" + getPort() + "/lwd/?password=admin&amp;delay=5000&amp;localWorkDirectory="
+ base;
+        return "ftp://admin@localhost:" + getPort() + "/lwd/?password=admin&amp;delay=5000&amp;noop=true&amp;localWorkDirectory="
+ base;
     }
 
     @Override




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888857 - in /camel/trunk/examples/camel-example-etl/src/main/resources/META-INF: LICENSE.txt NOTICE.txt persistence.xml spring/</title>
<author><name>cmoulliard@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209162458.8219123889D2@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209162458-8219123889D2@eris-apache-org%3e</id>
<updated>2009-12-09T16:24:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: cmoulliard
Date: Wed Dec  9 16:24:58 2009
New Revision: 888857

URL: http://svn.apache.org/viewvc?rev=888857&amp;view=rev
Log:
Add new profiles -P hibernate and -P openjpa.

Removed:
    camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/LICENSE.txt
    camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/NOTICE.txt
    camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/persistence.xml
    camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/spring/



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888856 - in /camel/trunk/examples/camel-example-etl: ./ src/main/java/org/apache/camel/example/etl/ src/main/resources/ src/profiles/eclipselink/ src/profiles/eclipselink/META-INF/ src/profiles/eclipselink/META-INF/spring/ src/profiles/hib...</title>
<author><name>cmoulliard@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209162426.45D4123888FE@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209162426-45D4123888FE@eris-apache-org%3e</id>
<updated>2009-12-09T16:24:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: cmoulliard
Date: Wed Dec  9 16:24:25 2009
New Revision: 888856

URL: http://svn.apache.org/viewvc?rev=888856&amp;view=rev
Log:
Add new profiles -P hibernate and -P openjpa.

Added:
    camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/
    camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/
    camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
  (with props)
    camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/
    camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
  (with props)
    camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/log4j.properties   (with
props)
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
  (with props)
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
  (with props)
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/log4j.properties   (with
props)
    camel/trunk/examples/camel-example-etl/src/profiles/hibernate/persistence.xml   (with
props)
Modified:
    camel/trunk/examples/camel-example-etl/pom.xml
    camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
    camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
    camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
    camel/trunk/examples/camel-example-etl/src/main/resources/log4j.properties
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml

Modified: camel/trunk/examples/camel-example-etl/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/pom.xml?rev=888856&amp;r1=888855&amp;r2=888856&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/pom.xml (original)
+++ camel/trunk/examples/camel-example-etl/pom.xml Wed Dec  9 16:24:25 2009
@@ -33,16 +33,9 @@
 	&lt;description&gt;An example showing how to use Camel as an Extract Transform and Load
(ETL) tool&lt;/description&gt;
 
 	&lt;properties&gt;
-		&lt;camel.osgi.export.pkg&gt;
-			org.apache.camel.example.etl.*
-     &lt;/camel.osgi.export.pkg&gt;
-		&lt;camel.osgi.import.additional&gt;
-			org.hsqldb,org.hsqldb.util,org.hsqldb.jdbc,org.hibernate.ejb
-     &lt;/camel.osgi.import.additional&gt;
-		&lt;!-- to avoid us import bunch other package --&gt;
-		&lt;camel.osgi.dynamic&gt;
-			*
-     &lt;/camel.osgi.dynamic&gt;
+		&lt;camel.osgi.export.pkg&gt;org.apache.camel.example.etl.*&lt;/camel.osgi.export.pkg&gt;
+	 	&lt;!-- to avoid us import bunch other package --&gt;
+		&lt;camel.osgi.dynamic&gt;*&lt;/camel.osgi.dynamic&gt;
 	&lt;/properties&gt;
 
 	&lt;dependencies&gt;
@@ -137,6 +130,24 @@
 			&lt;activation&gt;
 				&lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
 			&lt;/activation&gt;
+			&lt;properties&gt;
+				&lt;camel.osgi.import.additional&gt;
+					org.hsqldb,
+					org.hsqldb.util,
+					org.hsqldb.jdbc,
+					org.hibernate.ejb
+     			&lt;/camel.osgi.import.additional&gt;
+			&lt;/properties&gt;
+			&lt;build&gt;
+				&lt;resources&gt;
+					&lt;resource&gt;
+						&lt;directory&gt;${basedir}/src/profiles/hibernate&lt;/directory&gt;
+					&lt;/resource&gt;
+					&lt;resource&gt;
+						&lt;directory&gt;${basedir}/src/main/resources&lt;/directory&gt;
+					&lt;/resource&gt;
+				&lt;/resources&gt;
+			&lt;/build&gt;
 			&lt;dependencies&gt;
 				&lt;dependency&gt;
 					&lt;groupId&gt;org.hibernate&lt;/groupId&gt;
@@ -157,10 +168,6 @@
 					&lt;/resource&gt;
 					&lt;resource&gt;
 						&lt;directory&gt;${basedir}/src/main/resources&lt;/directory&gt;
-						&lt;excludes&gt;
-							&lt;exclude&gt;**/persistence.xml&lt;/exclude&gt;
-							&lt;exclude&gt;**/camel-context.xml&lt;/exclude&gt;
-						&lt;/excludes&gt;
 					&lt;/resource&gt;
 				&lt;/resources&gt;
 				&lt;!--  Will enhance classes as we run in a non J2EE 5 env --&gt;
@@ -193,6 +200,13 @@
 					&lt;/plugin&gt;
 				&lt;/plugins&gt;
 			&lt;/build&gt;
+			&lt;properties&gt;
+				&lt;camel.osgi.import.additional&gt;
+					org.hsqldb,
+					org.hsqldb.util,
+					org.hsqldb.jdbc
+     			&lt;/camel.osgi.import.additional&gt;
+			&lt;/properties&gt;
 			&lt;dependencies&gt;
 				&lt;dependency&gt;
 					&lt;groupId&gt;org.apache.openjpa&lt;/groupId&gt;
@@ -200,6 +214,66 @@
 				&lt;/dependency&gt;
 			&lt;/dependencies&gt;
 		&lt;/profile&gt;
+
+		&lt;!-- EclipseLink - HSQLDB --&gt;
+		&lt;profile&gt;
+			&lt;id&gt;eclipselink&lt;/id&gt;
+			&lt;build&gt;
+				&lt;resources&gt;
+					&lt;resource&gt;
+						&lt;directory&gt;${basedir}/src/profiles/eclipselink&lt;/directory&gt;
+					&lt;/resource&gt;
+					&lt;resource&gt;
+						&lt;directory&gt;${basedir}/src/main/resources&lt;/directory&gt;
+					&lt;/resource&gt;
+				&lt;/resources&gt;
+			&lt;/build&gt;
+			&lt;properties&gt;
+				&lt;camel.osgi.import.additional&gt;
+					org.hsqldb,
+					org.hsqldb.util,
+					org.hsqldb.jdbc
+     			&lt;/camel.osgi.import.additional&gt;
+			&lt;/properties&gt;
+			&lt;dependencies&gt;
+				&lt;dependency&gt;
+					  &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
+					  &lt;artifactId&gt;javax.persistence&lt;/artifactId&gt;
+					  &lt;version&gt;1.2.0&lt;/version&gt;
+				&lt;/dependency&gt;
+				&lt;dependency&gt;
+  					&lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
+  					&lt;artifactId&gt;org.eclipse.persistence.antlr&lt;/artifactId&gt;
+  					&lt;version&gt;1.2.0&lt;/version&gt;
+				&lt;/dependency&gt;
+				&lt;dependency&gt;
+  					&lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
+  					&lt;artifactId&gt;org.eclipse.persistence.asm&lt;/artifactId&gt;
+  					&lt;version&gt;1.2.0&lt;/version&gt;
+				&lt;/dependency&gt;
+				&lt;dependency&gt;
+  					&lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
+  					&lt;artifactId&gt;org.eclipse.persistence.core&lt;/artifactId&gt;
+  					&lt;version&gt;1.2.0&lt;/version&gt;
+				&lt;/dependency&gt;
+				&lt;dependency&gt;
+  					&lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
+  					&lt;artifactId&gt;org.eclipse.persistence.jpa&lt;/artifactId&gt;
+  					&lt;version&gt;1.2.0&lt;/version&gt;
+				&lt;/dependency&gt;
+				&lt;dependency&gt;
+					&lt;groupId&gt;hsqldb&lt;/groupId&gt;
+					&lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
+				&lt;/dependency&gt;
+			&lt;/dependencies&gt;
+			&lt;repositories&gt;
+				&lt;repository&gt;
+					&lt;id&gt;Eclipse&lt;/id&gt;
+					&lt;url&gt;http://eclipse.ialto.org/rt/eclipselink/maven.repo&lt;/url&gt;
+				&lt;/repository&gt;
+			&lt;/repositories&gt;
+		&lt;/profile&gt;
+
 	&lt;/profiles&gt;
 	&lt;reporting&gt;
 		&lt;plugins&gt;

Modified: camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java?rev=888856&amp;r1=888855&amp;r2=888856&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
(original)
+++ camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
Wed Dec  9 16:24:25 2009
@@ -29,7 +29,7 @@
  * 
  * @version $Revision$
  */
-@Entity(name = "Customer")
+@Entity(name = "customer")
 @XmlRootElement(name = "customer")
 @XmlAccessorType(XmlAccessType.FIELD)
 public class CustomerEntity {

Modified: camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java?rev=888856&amp;r1=888855&amp;r2=888856&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
(original)
+++ camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
Wed Dec  9 16:24:25 2009
@@ -24,6 +24,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.orm.jpa.JpaTemplate;
+import org.springframework.util.ClassUtils;
 
 /**
  * A Message Transformer of an XML document to a Customer entity bean
@@ -39,28 +40,32 @@
     /**
      * A transformation method to convert a person document into a customer
      * entity
+     * @throws Exception 
      */
     @Converter
-    public CustomerEntity toCustomer(PersonDocument doc, Exchange exchange) {
+    public CustomerEntity toCustomer(PersonDocument doc, Exchange exchange) throws Exception
{
         JpaTemplate template = exchange.getIn().getHeader("CamelJpaTemplate", JpaTemplate.class);
 
+        
         String user = doc.getUser();
         CustomerEntity customer = findCustomerByName(template, user);
 
         // let's convert information from the document into the entity bean
+        customer.setUserName(user);
         customer.setFirstName(doc.getFirstName());
         customer.setSurname(doc.getLastName());
         customer.setCity(doc.getCity());
 
-        LOG.debug("Created customer: " + customer);
+        LOG.debug("Created object customer: " + customer);
         return customer;
     }
 
     /**
-     * Finds a customer for the given username, or creates and inserts a new one
+     * Finds a customer for the given username
      */
-    protected CustomerEntity findCustomerByName(JpaTemplate template, String user) {
-        List&lt;CustomerEntity&gt; list = CastUtils.cast(template.find("select x from " +
CustomerEntity.class.getName() + " x where x.userName = ?1", user));
+    protected CustomerEntity findCustomerByName(JpaTemplate template, String user) throws
Exception {
+        List&lt;CustomerEntity&gt; list = CastUtils.cast(template.find("select x from customer"
+                                                                 + " x where x.userName =
?1", user));
         if (list.isEmpty()) {
             CustomerEntity answer = new CustomerEntity();
             answer.setUserName(user);
@@ -69,5 +74,6 @@
             return list.get(0);
         }
     }
+
 }
 // END SNIPPET: example

Modified: camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java?rev=888856&amp;r1=888855&amp;r2=888856&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
(original)
+++ camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
Wed Dec  9 16:24:25 2009
@@ -18,6 +18,8 @@
 
 import org.apache.camel.Exchange;
 import org.apache.camel.spring.SpringRouteBuilder;
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.processor.interceptor.Tracer;
 import static org.apache.camel.language.juel.JuelExpression.el;
 
 /**
@@ -26,13 +28,24 @@
 // START SNIPPET: example
 public class EtlRoutes extends SpringRouteBuilder {
     public void configure() throws Exception {
-        from("file:src/data?noop=true").convertBodyTo(PersonDocument.class)
+	
+        /**
+	Tracer tracer = new Tracer();
+        tracer.setLogLevel(LoggingLevel.FATAL);
+        tracer.setLogName("org.apache.camel.example.etl");
+        tracer.setLogStackTrace(true);
+        tracer.setTraceExceptions(true);
+        **/
+	    
+        from("file:src/data?noop=true")
+            .convertBodyTo(PersonDocument.class)
             .to("jpa:org.apache.camel.example.etl.CustomerEntity");
 
         // the following will dump the database to files
         from("jpa:org.apache.camel.example.etl.CustomerEntity?consumeDelete=false&amp;delay=3000&amp;consumeLockEntity=false")
             .setHeader(Exchange.FILE_NAME, el("${in.body.userName}.xml"))
             .to("file:target/customers");
+           
     }
 }
 // END SNIPPET: example

Modified: camel/trunk/examples/camel-example-etl/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/main/resources/log4j.properties?rev=888856&amp;r1=888855&amp;r2=888856&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/main/resources/log4j.properties (original)
+++ camel/trunk/examples/camel-example-etl/src/main/resources/log4j.properties Wed Dec  9
16:24:25 2009
@@ -20,7 +20,17 @@
 #
 log4j.rootLogger=INFO, out
 
-#log4j.logger.org.apache.activemq=DEBUG
+# openjpa properties
+log4j.category.openjpa.Tool=INFO
+log4j.category.openjpa.Runtime=INFO
+log4j.category.openjpa.Remote=WARN
+log4j.category.openjpa.DataCache=WARN
+log4j.category.openjpa.MetaData=WARN
+log4j.category.openjpa.Enhance=WARN
+log4j.category.openjpa.Query=WARN
+log4j.category.openjpa.jdbc.SQL=DEBUG
+log4j.category.openjpa.jdbc.JDBC=WARN
+log4j.category.openjpa.jdbc.Schema=WARN
 
 # uncomment the next line to debug Camel
 log4j.logger.org.apache.camel=DEBUG
@@ -37,4 +47,5 @@
 log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
 #log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
 
-log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
\ No newline at end of file
+log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer
+

Added: camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml?rev=888856&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
(added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
Wed Dec  9 16:24:25 2009
@@ -0,0 +1,34 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+	&lt;!--
+		Copyright 2006 The Apache Software Foundation. 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.
+	--&gt;
+&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"&gt;
+
+	&lt;persistence-unit name="camel" transaction-type="RESOURCE_LOCAL"&gt;
+		&lt;class&gt;org.apache.camel.example.etl.CustomerEntity&lt;/class&gt;
+
+		&lt;properties&gt;
+			&lt;property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" /&gt;
+			&lt;property name="javax.persistence.jdbc.user" value="sa" /&gt;
+			&lt;property name="javax.persistence.jdbc.password" value="" /&gt;
+			&lt;property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:camel_etl" /&gt;
+            &lt;property name="eclipselink.logging.file" value="target\camel-example-etl.log"
/&gt;
+			&lt;property name="eclipselink.logging.level" value="FINE" /&gt;
+			&lt;property name="eclipselink.ddl-generation" value="drop-and-create-tables" /&gt;
+			&lt;property name="eclipselink.ddl-generation.output-mode"	value="database" /&gt;
+			&lt;!-- &lt;property name="eclipselink.logging.thread" value="false" /&gt;--&gt;
+			&lt;!-- &lt;property name="eclipselink.logging.session" value="false" /&gt;--&gt;
+			&lt;!-- &lt;property name="eclipselink.logging.exceptions" value="false" /&gt;--&gt;
+		&lt;/properties&gt;
+
+	&lt;/persistence-unit&gt;
+&lt;/persistence&gt;

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml?rev=888856&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
(added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
Wed Dec  9 16:24:25 2009
@@ -0,0 +1,77 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+	&lt;!--
+		Licensed to the Apache Software Foundation (ASF) under one or more
+		contributor license agreements. See the NOTICE file distributed with
+		this work for additional information regarding copyright ownership.
+		The ASF licenses this file to You 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.
+	--&gt;
+&lt;beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring"
+	xsi:schemaLocation="
+       http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring
+       http://camel.apache.org/schema/spring/camel-spring.xsd
+       http://camel.apache.org/schema/osgi
+	   http://camel.apache.org/schema/osgi/camel-osgi.xsd"&gt;
+
+	&lt;camel:camelContext id="camel" trace="true"
+		xmlns="http://camel.apache.org/schema/osgi"&gt;
+		&lt;camel:package&gt;org.apache.camel.example.etl&lt;/camel:package&gt;
+	&lt;/camel:camelContext&gt;
+
+	&lt;!-- Added for OSGI platform to allow --&gt;
+	&lt;bean id="jpa" class="org.apache.camel.component.jpa.JpaComponent"&gt;
+		&lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
+	&lt;/bean&gt;
+
+	&lt;bean id="transactionTemplate"
+		class="org.springframework.transaction.support.TransactionTemplate"&gt;
+		&lt;property name="transactionManager"&gt;
+			&lt;bean class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
+				&lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
+			&lt;/bean&gt;
+		&lt;/property&gt;
+	&lt;/bean&gt;
+
+	&lt;bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate"&gt;
+		&lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
+	&lt;/bean&gt;
+
+	&lt;bean id="entityManagerFactory"
+		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"&gt;
+		&lt;property name="persistenceUnitName" value="camel" /&gt;
+		&lt;property name="jpaVendorAdapter" ref="jpaAdapter" /&gt;
+	&lt;/bean&gt;
+
+	&lt;!-- EclipseLink addapter --&gt;
+	&lt;bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"&gt;
+		&lt;property name="databasePlatform" value="org.eclipse.persistence.platform.database.HSQLPlatform"
/&gt;
+		&lt;property name="database" value="HSQL" /&gt;
+	&lt;/bean&gt;
+
+
+	&lt;!-- lets show a simple UI to browse the database 
+	&lt;bean id="databaseExplorer" class="org.apache.camel.spring.util.MainRunner"
+		lazy-init="false"&gt;
+		&lt;property name="main" value="org.hsqldb.util.DatabaseManagerSwing" /&gt;
+		&lt;property name="args"&gt;
+			&lt;list&gt;
+				&lt;value&gt;url&lt;/value&gt;
+				&lt;value&gt;jdbc:hsqldb:mem:camel_etl&lt;/value&gt;
+			&lt;/list&gt;
+		&lt;/property&gt;
+		&lt;property name="delay" value="3000" /&gt;
+	&lt;/bean&gt;
+    --&gt;
+
+&lt;/beans&gt;
\ No newline at end of file

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/log4j.properties?rev=888856&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/log4j.properties (added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/log4j.properties Wed Dec
 9 16:24:25 2009
@@ -0,0 +1,36 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+## ------------------------------------------------------------------------
+
+#
+# The logging properties used for eclipse testing, We want to see INFO output on the console.
+#
+log4j.rootLogger=WARN, file
+
+# uncomment the next line to debug Camel
+log4j.logger.org.apache.camel=DEBUG
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-example-etl.log
+log4j.appender.file.append=true

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/eclipselink/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml?rev=888856&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
(added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
Wed Dec  9 16:24:25 2009
@@ -0,0 +1,26 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+	&lt;!--
+		Copyright 2006 The Apache Software Foundation. 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.
+	--&gt;
+&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"&gt;
+
+	&lt;persistence-unit name="camel" transaction-type="RESOURCE_LOCAL"&gt;
+		&lt;class&gt;org.apache.camel.example.etl.CustomerEntity&lt;/class&gt;
+		
+		&lt;!-- Hibernate --&gt;
+		&lt;properties&gt;
+			&lt;property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/&gt;
+			&lt;property name="hibernate.hbm2ddl.auto" value="create"/&gt;
+		&lt;/properties&gt;
+
+	&lt;/persistence-unit&gt;
+&lt;/persistence&gt;

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml?rev=888856&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
(added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
Wed Dec  9 16:24:25 2009
@@ -0,0 +1,85 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+--&gt;
+
+&lt;!--
+
+  The default Application Context used by the org.apache.camel.spring.Main if there
+  is no /META-INF/sprint.xml
+
+ --&gt;
+
+&lt;beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"&gt;
+
+  &lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
+    &lt;package&gt;org.apache.camel.example.etl&lt;/package&gt;
+  &lt;/camelContext&gt;
+
+   &lt;!--  Added for OSGI platform to allow --&gt;
+  &lt;bean id="jpa" class="org.apache.camel.component.jpa.JpaComponent"&gt;
+       &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
+  &lt;/bean&gt;
+
+  &lt;bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate"&gt;
+    &lt;property name="transactionManager"&gt;
+      &lt;bean class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
+        &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
+      &lt;/bean&gt;
+    &lt;/property&gt;
+  &lt;/bean&gt;
+
+  &lt;bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate"&gt;
+    &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
+  &lt;/bean&gt;
+
+   &lt;bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
+    &lt;property name="persistenceUnitName" value="camel"/&gt;
+    &lt;property name="jpaVendorAdapter" ref="jpaAdapter"/&gt;
+    &lt;property name="dataSource" ref="dataSource" /&gt;
+  &lt;/bean&gt;
+  
+  &lt;bean id="jpaAdapter"
+        class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
+        &lt;property name="databasePlatform" value="org.hibernate.dialect.HSQLDialect" /&gt;
+  &lt;/bean&gt;
+  
+  &lt;!--  DataSource Definition --&gt;
+  &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt;
+        &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver" /&gt;
+        &lt;property name="url" value="jdbc:hsqldb:mem:camel_etl" /&gt;
+        &lt;property name="username" value="sa" /&gt;
+        &lt;property name="password" value="" /&gt;
+  &lt;/bean&gt;
+
+  &lt;!-- lets show a simple UI to browse the database --&gt;
+  &lt;!-- This bean will cause OSGi server exit , so we disable it here --&gt;
+  &lt;bean id="databaseExplorer" class="org.apache.camel.spring.util.MainRunner" lazy-init="false"&gt;
+    &lt;property name="main" value="org.hsqldb.util.DatabaseManagerSwing"/&gt;
+    &lt;property name="args"&gt;
+      &lt;list&gt;
+        &lt;value&gt;--url&lt;/value&gt;
+        &lt;value&gt;jdbc:hsqldb:mem:camel_etl&lt;/value&gt;
+      &lt;/list&gt;
+    &lt;/property&gt;
+    &lt;property name="delay" value="1000"/&gt;
+  &lt;/bean&gt;
+
+&lt;/beans&gt;

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/hibernate/log4j.properties?rev=888856&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/hibernate/log4j.properties (added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/hibernate/log4j.properties Wed Dec
 9 16:24:25 2009
@@ -0,0 +1,36 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+## ------------------------------------------------------------------------
+
+#
+# The logging properties used for eclipse testing, We want to see INFO output on the console.
+#
+log4j.rootLogger=WARN, file
+
+# uncomment the next line to debug Camel
+log4j.logger.org.apache.camel=DEBUG
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-example-etl.log
+log4j.appender.file.append=true

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/hibernate/persistence.xml?rev=888856&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/hibernate/persistence.xml (added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/hibernate/persistence.xml Wed Dec
 9 16:24:25 2009
@@ -0,0 +1,30 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!--
+ Copyright 2006 The Apache Software Foundation.
+
+ 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.
+--&gt;
+&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             version="1.0"&gt;
+
+  &lt;persistence-unit name="camel" transaction-type="RESOURCE_LOCAL"&gt;
+    &lt;class&gt;org.apache.camel.example.etl.CustomerEntity&lt;/class&gt;
+
+    &lt;properties&gt;
+      &lt;property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/&gt;
+      &lt;property name="hibernate.hbm2ddl.auto" value="create"/&gt;
+    &lt;/properties&gt;
+
+  &lt;/persistence-unit&gt;
+&lt;/persistence&gt;

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/hibernate/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml?rev=888856&amp;r1=888855&amp;r2=888856&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml (original)
+++ camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml Wed
Dec  9 16:24:25 2009
@@ -1,44 +1,51 @@
 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;!--
- Copyright 2006 The Apache Software Foundation.
-
- 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.
---&gt;
+	&lt;!--
+		Copyright 2006 The Apache Software Foundation. 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.
+	--&gt;
 &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             version="1.0"&gt;
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"&gt;
+
+	&lt;persistence-unit name="camel" transaction-type="RESOURCE_LOCAL"&gt;
+		&lt;class&gt;org.apache.camel.example.etl.CustomerEntity&lt;/class&gt;
+
+		&lt;!-- Hibernate properties 
+		&lt;properties&gt;
+			&lt;property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" /&gt;
+			&lt;property name="hibernate.hbm2ddl.auto" value="create" /&gt;
+		&lt;/properties&gt;
+        --&gt;
+
+		&lt;!--  OpenJPA &amp; HSQL --&gt;
+		&lt;properties&gt;
+			&lt;property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" /&gt;
+			&lt;property name="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:camel_etl" /&gt;
+			&lt;property name="openjpa.ConnectionUserName" value="sa" /&gt;
+			&lt;property name="openjpa.ConnectionPassword" value="" /&gt;
+			&lt;property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" /&gt;
+			&lt;property name="openjpa.Log" value="commons" /&gt;
+				&lt;!--  value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE" /&gt; --&gt;
+			&lt;property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"
/&gt;
+		&lt;/properties&gt;
+
+		&lt;!-- OpenJPA &amp; Derby 
+		&lt;properties&gt;
+			&lt;property name="openjpa.ConnectionURL" value="jdbc:derby:target/derby;create=true"
/&gt;
+			&lt;property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"
/&gt;
+			&lt;property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" /&gt;
+			&lt;property name="openjpa.Log"
+				value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE" /&gt;
+			&lt;property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"
/&gt;
+		&lt;/properties&gt;
+        --&gt;
 
-  &lt;persistence-unit name="camel" transaction-type="RESOURCE_LOCAL"&gt;
-    &lt;class&gt;org.apache.camel.example.etl.CustomerEntity&lt;/class&gt;
-    &lt;properties&gt;
-      &lt;property name="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:camel_etl"/&gt;
-      &lt;property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver"/&gt;
-      &lt;property name="openjpa.ConnectionUserName" value="sa" /&gt;
-	  &lt;property name="openjpa.ConnectionPassword" value="" /&gt;
-      &lt;property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/&gt;
-      &lt;property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"
/&gt;
-    &lt;/properties&gt;
-
-	&lt;!-- properties&gt;
-		&lt;property name="openjpa.ConnectionURL" value="jdbc:derby:target/derby;create=true" /&gt;
-		&lt;property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"
/&gt;
-		&lt;property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" /&gt;
-		&lt;property name="openjpa.Log"
-			value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE" /&gt;
-		&lt;property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"
/&gt;
-	&lt;/properties--&gt;
-      
-    
 
-  &lt;/persistence-unit&gt;
+	&lt;/persistence-unit&gt;
 &lt;/persistence&gt;

Modified: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml?rev=888856&amp;r1=888855&amp;r2=888856&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
(original)
+++ camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
Wed Dec  9 16:24:25 2009
@@ -1,42 +1,36 @@
 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You 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.
---&gt;
-
-&lt;!--
-
-  The default Application Context used by the org.apache.camel.spring.Main if there
-  is no /META-INF/sprint.xml
-
- --&gt;
-
+	&lt;!--
+		Licensed to the Apache Software Foundation (ASF) under one or more
+		contributor license agreements. See the NOTICE file distributed with
+		this work for additional information regarding copyright ownership.
+		The ASF licenses this file to You 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.
+	--&gt;
 &lt;beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring"
 	xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"&gt;
+       http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring
+       http://camel.apache.org/schema/spring/camel-spring.xsd"&gt;
+
+	&lt;camel:camelContext id="camel" trace="true"
+		xmlns="http://camel.apache.org/schema/spring"&gt;
+		&lt;camel:package&gt;org.apache.camel.example.etl&lt;/camel:package&gt;
+	&lt;/camel:camelContext&gt;
 
-	&lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
-		&lt;package&gt;org.apache.camel.example.etl&lt;/package&gt;
-	&lt;/camelContext&gt;
-	
-	 &lt;!--  Added for OSGI platform to allow --&gt;
-    &lt;bean id="jpa" class="org.apache.camel.component.jpa.JpaComponent"&gt;
-       &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
-    &lt;/bean&gt;
+	&lt;!-- Added for OSGI platform to allow --&gt;
+	&lt;bean id="jpa" class="org.apache.camel.component.jpa.JpaComponent"&gt;
+		&lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
+	&lt;/bean&gt;
 
 	&lt;bean id="transactionTemplate"
 		class="org.springframework.transaction.support.TransactionTemplate"&gt;
@@ -54,18 +48,34 @@
 	&lt;bean id="entityManagerFactory"
 		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"&gt;
 		&lt;property name="persistenceUnitName" value="camel" /&gt;
+		&lt;property name="jpaVendorAdapter" ref="jpaAdapter" /&gt;
 	&lt;/bean&gt;
 
+	&lt;!--
+		Hibernate addapter &lt;bean id="jpaAdapter"
+		class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
+		&lt;property name="databasePlatform"
+		value="org.hibernate.dialect.HSQLDialect" /&gt; &lt;/bean&gt;
+	--&gt;
+
+	&lt;!-- OpenJPA addapter --&gt;
+	&lt;bean id="jpaAdapter" class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter"&gt;
+		&lt;property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.HSQLDictionary"
/&gt;
+		&lt;property name="database" value="HSQL" /&gt;
+	&lt;/bean&gt;
+
+
+	&lt;!-- lets show a simple UI to browse the database --&gt;
+	&lt;bean id="databaseExplorer" class="org.apache.camel.spring.util.MainRunner"
+		lazy-init="false"&gt;
+		&lt;property name="main" value="org.hsqldb.util.DatabaseManagerSwing" /&gt;
+		&lt;property name="args"&gt;
+			&lt;list&gt;
+				&lt;value&gt;--url&lt;/value&gt;
+				&lt;value&gt;jdbc:hsqldb:mem:camel_etl&lt;/value&gt;
+			&lt;/list&gt;
+		&lt;/property&gt;
+		&lt;property name="delay" value="3000" /&gt;
+	&lt;/bean&gt;
 
-  &lt;!-- lets show a simple UI to browse the database 
-  &lt;bean id="databaseExplorer" class="org.apache.camel.spring.util.MainRunner" lazy-init="false"&gt;
-    &lt;property name="main" value="org.hsqldb.util.DatabaseManagerSwing"/&gt;
-    &lt;property name="args"&gt;
-      &lt;list&gt;
-        &lt;value&gt;url&lt;/value&gt;
-        &lt;value&gt;jdbc:hsqldb:mem:camel_etl&lt;/value&gt;
-      &lt;/list&gt;
-    &lt;/property&gt;
-    &lt;property name="delay" value="1000"/&gt;
-  &lt;/bean--&gt;
-&lt;/beans&gt;
+&lt;/beans&gt;
\ No newline at end of file




</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Tutorial-Example-ReportIncident-Part1</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c496286008.257.1260375720023.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c496286008-257-1260375720023-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-09T16:22:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
    &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Tutorial-Example-ReportIncident-Part1?focusedCommentId=9371856#comment-9371856"&gt;Tutorial-Example-ReportIncident-Part1&lt;/a&gt;&lt;/h2&gt;
        &lt;h4&gt;Page
        &lt;b&gt;commented&lt;/b&gt; by              &lt;a href="http://cwiki.apache.org/confluence/display/~tranqy"&gt;Aaron
Junod&lt;/a&gt;
    &lt;/h4&gt;
    &lt;br/&gt;
    &lt;div class="notificationGreySide"&gt;
       &lt;p&gt;Having never seen a pom.xml file before, I had to hunt and peck to figure
out where the properties, dependencies and plugins went in the file. Would be helpful to note
in the text where they go, altho the mvn errors were very clear and it was simple to figure
out.&lt;/p&gt;
    &lt;/div&gt;

        
    &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Tutorial-Example-ReportIncident-Part1?focusedCommentId=9371856#comment-9371856"&gt;View
Online&lt;/a&gt;
              |
       &lt;a id="reply-9371856" href="http://cwiki.apache.org/confluence/display/CAMEL/Tutorial-Example-ReportIncident-Part1?replyToComment=9371856#comment-9371856"&gt;Reply
To This&lt;/a&gt;
           &lt;/div&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888843 - /camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java</title>
<author><name>cmoulliard@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209153957.7F753238889D@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209153957-7F753238889D@eris-apache-org%3e</id>
<updated>2009-12-09T15:39:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: cmoulliard
Date: Wed Dec  9 15:39:56 2009
New Revision: 888843

URL: http://svn.apache.org/viewvc?rev=888843&amp;view=rev
Log:
Remove import statement not used (Spring)

Modified:
    camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java

Modified: camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java?rev=888843&amp;r1=888842&amp;r2=888843&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
(original)
+++ camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
Wed Dec  9 15:39:56 2009
@@ -35,9 +35,7 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.springframework.orm.jpa.JpaCallback;
-import org.springframework.util.ClassUtils;
 
 /**
  * @version $Revision$
@@ -68,6 +66,7 @@
         this.template = endpoint.createTransactionStrategy();
     }
 
+    @Override
     protected void poll() throws Exception {
         template.execute(new JpaCallback() {
             public Object doInJpa(EntityManager entityManager) throws PersistenceException
{
@@ -145,6 +144,7 @@
 
     // Properties
     // -------------------------------------------------------------------------
+    @Override
     public JpaEndpoint getEndpoint() {
         return endpoint;
     }
@@ -244,7 +244,7 @@
                 // Check if we have a property name on the @Entity annotation
                 String name = getEntityName(entityType);
                 
-                if ( name != null ) {
+                if (name != null) {
                     return QueryBuilder.query("select x from " + name + " x");
                 } else {
                     // Remove package name of the entity to be conform with JPA 1.0 spec
@@ -262,7 +262,7 @@
         Entity entity = clazz.getAnnotation(Entity.class);
         
         // Check if the property name has been defined for Entity annotation
-        if ( ! entity.name().equals("") ) {
+        if (!entity.name().equals("")) {
             return entity.name();
         } else {
             return null;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888834 - /camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java</title>
<author><name>cmoulliard@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209152829.E5F45238889D@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209152829-E5F45238889D@eris-apache-org%3e</id>
<updated>2009-12-09T15:28:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: cmoulliard
Date: Wed Dec  9 15:28:29 2009
New Revision: 888834

URL: http://svn.apache.org/viewvc?rev=888834&amp;view=rev
Log:
CAMEL-2273 - do not use fully qualified class name in JPA query but simple name or entity
name

Modified:
    camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java

Modified: camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java?rev=888834&amp;r1=888833&amp;r2=888834&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
(original)
+++ camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
Wed Dec  9 15:28:29 2009
@@ -21,6 +21,7 @@
 import java.util.List;
 import java.util.Queue;
 
+import javax.persistence.Entity;
 import javax.persistence.EntityManager;
 import javax.persistence.LockModeType;
 import javax.persistence.PersistenceException;
@@ -36,6 +37,7 @@
 import org.apache.commons.logging.LogFactory;
 
 import org.springframework.orm.jpa.JpaCallback;
+import org.springframework.util.ClassUtils;
 
 /**
  * @version $Revision$
@@ -234,13 +236,39 @@
             return QueryBuilder.nativeQuery(nativeQuery);
         } else {
             Class&lt;?&gt; entityType = endpoint.getEntityType();
+            
             if (entityType == null) {
                 return null;
             } else {
-                return QueryBuilder.query("select x from " + entityType.getName() + " x");
+                
+                // Check if we have a property name on the @Entity annotation
+                String name = getEntityName(entityType);
+                
+                if ( name != null ) {
+                    return QueryBuilder.query("select x from " + name + " x");
+                } else {
+                    // Remove package name of the entity to be conform with JPA 1.0 spec
+                    return QueryBuilder.query("select x from " + entityType.getSimpleName()
+ " x");
+                }
+                    
+
+                
             }
         }
     }
+    
+    protected String getEntityName(Class&lt;?&gt; clazz) {
+        
+        Entity entity = clazz.getAnnotation(Entity.class);
+        
+        // Check if the property name has been defined for Entity annotation
+        if ( ! entity.name().equals("") ) {
+            return entity.name();
+        } else {
+            return null;
+        }
+ 
+    }
 
     protected DeleteHandler&lt;Object&gt; createDeleteHandler() {
         // look for @Consumed to allow custom callback when the Entity has been consumed




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888810 - in /camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote: FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java FtpConsumerLocalWorkDirectoryTest.java</title>
<author><name>ningjiang@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209141239.723502388A24@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209141239-723502388A24@eris-apache-org%3e</id>
<updated>2009-12-09T14:12:38Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ningjiang
Date: Wed Dec  9 14:12:37 2009
New Revision: 888810

URL: http://svn.apache.org/viewvc?rev=888810&amp;view=rev
Log:
Try to fix the ftp error on windows

Modified:
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java?rev=888810&amp;r1=888809&amp;r2=888810&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
Wed Dec  9 14:12:37 2009
@@ -72,7 +72,7 @@
         assertMockEndpointsSatisfied();
 
         // give test some time to close file resources
-        Thread.sleep(2000);
+        Thread.sleep(6000);
 
         // now the lwd file should be deleted
         File local = new File("target/lwd/hello.txt").getAbsoluteFile();

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java?rev=888810&amp;r1=888809&amp;r2=888810&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
Wed Dec  9 14:12:37 2009
@@ -35,7 +35,8 @@
 public class FtpConsumerLocalWorkDirectoryTest extends FtpServerTestSupport {
 
     protected String getFtpUrl() {
-        return "ftp://admin@localhost:" + getPort() + "/lwd/?password=admin&amp;delay=5000&amp;localWorkDirectory=target/lwd";
+        return "ftp://admin@localhost:" + getPort()
+               + "/lwd/?password=admin&amp;delay=5000&amp;localWorkDirectory=target/lwd&amp;noop=true";
     }
 
     @Override
@@ -48,7 +49,8 @@
     }
 
     private void prepareFtpServer() throws Exception {
-        // prepares the FTP Server by creating a file on the server that we want to unit
+        // prepares the FTP Server by creating a file on the server that we want
+        // to unit
         // test that we can pool
         Endpoint endpoint = context.getEndpoint(getFtpUrl());
         Exchange exchange = endpoint.createExchange();
@@ -69,16 +71,16 @@
         assertMockEndpointsSatisfied();
 
         // give test some time to close file resources
-        Thread.sleep(2000);
-
-        // now the lwd file should be deleted
-        File local = new File("target/lwd/hello.txt").getAbsoluteFile();
-        assertFalse("Local work file should have been deleted", local.exists());
+        Thread.sleep(6000);
 
         // and the out file should exists
         File out = new File("target/out/hello.txt").getAbsoluteFile();
         assertTrue("file should exists", out.exists());
         assertEquals("Hello World", IOConverter.toString(out, null));
+
+        // now the lwd file should be deleted
+        File local = new File("target/lwd/hello.txt").getAbsoluteFile();
+        assertFalse("Local work file should have been deleted", local.exists());
     }
 
     protected RouteBuilder createRouteBuilder() throws Exception {
@@ -88,7 +90,7 @@
                     public void process(Exchange exchange) throws Exception {
                         File body = exchange.getIn().getBody(File.class);
                         assertNotNull(body);
-                        assertTrue("Local work file should exists", body.exists());     
                  
+                        assertTrue("Local work file should exists", body.exists());
                         assertEquals(FileUtil.normalizePath("target/lwd/hello.txt"), body.getPath());
                     }
                 }).to("mock:result", "file://target/out");
@@ -96,4 +98,4 @@
         };
     }
 
-}
\ No newline at end of file
+}




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888798 - /camel/trunk/camel-core/pom.xml</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209132936.0F84C23888E9@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209132936-0F84C23888E9@eris-apache-org%3e</id>
<updated>2009-12-09T13:29:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Wed Dec  9 13:29:35 2009
New Revision: 888798

URL: http://svn.apache.org/viewvc?rev=888798&amp;view=rev
Log:
Added missing mandatory id in default profile for jdk1.5 activation

Modified:
    camel/trunk/camel-core/pom.xml

Modified: camel/trunk/camel-core/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/pom.xml?rev=888798&amp;r1=888797&amp;r2=888798&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/pom.xml (original)
+++ camel/trunk/camel-core/pom.xml Wed Dec  9 13:29:35 2009
@@ -231,7 +231,8 @@
 
   &lt;profiles&gt;
     &lt;profile&gt;
-      &lt;activation&gt;
+        &lt;id&gt;jdk1.5&lt;/id&gt;
+        &lt;activation&gt;
         &lt;jdk&gt;1.5&lt;/jdk&gt;
       &lt;/activation&gt;
       &lt;dependencies&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888797 - /camel/trunk/camel-core/src/test/java/org/apache/camel/issues/CBRContainsIssueTest.java</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209132837.186CC23888E9@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209132837-186CC23888E9@eris-apache-org%3e</id>
<updated>2009-12-09T13:28:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Wed Dec  9 13:28:36 2009
New Revision: 888797

URL: http://svn.apache.org/viewvc?rev=888797&amp;view=rev
Log:
Added base on user forum issue

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/CBRContainsIssueTest.java
  (with props)

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/CBRContainsIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/CBRContainsIssueTest.java?rev=888797&amp;view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/CBRContainsIssueTest.java
(added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/CBRContainsIssueTest.java
Wed Dec  9 13:28:36 2009
@@ -0,0 +1,95 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.issues;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ * @version $Revision$
+ */
+public class CBRContainsIssueTest extends ContextTestSupport {
+
+    public void testNot13() throws Exception {
+        getMockEndpoint("mock:13").expectedMessageCount(0);
+        getMockEndpoint("mock:other").expectedMessageCount(1);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testIs13() throws Exception {
+        getMockEndpoint("mock:13").expectedMessageCount(1);
+        getMockEndpoint("mock:other").expectedMessageCount(0);
+
+        template.sendBody("direct:start", "13");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testIs13Number() throws Exception {
+        getMockEndpoint("mock:13").expectedMessageCount(1);
+        getMockEndpoint("mock:other").expectedMessageCount(0);
+
+        template.sendBody("direct:start", 13);
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testContains13() throws Exception {
+        getMockEndpoint("mock:13").expectedMessageCount(1);
+        getMockEndpoint("mock:other").expectedMessageCount(0);
+
+        template.sendBody("direct:start", "Hi 13 how are you?");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testContains13Number() throws Exception {
+        getMockEndpoint("mock:13").expectedMessageCount(1);
+        getMockEndpoint("mock:other").expectedMessageCount(0);
+
+        template.sendBody("direct:start", 221344);
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testContainsNot13Number() throws Exception {
+        getMockEndpoint("mock:13").expectedMessageCount(0);
+        getMockEndpoint("mock:other").expectedMessageCount(1);
+
+        template.sendBody("direct:start", 22);
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start")
+                    .choice()
+                        .when(body().convertToString().contains("13"))
+                            .to("mock:13")
+                        .otherwise()
+                            .to("mock:other");
+            }
+        };
+    }
+}

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/CBRContainsIssueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/CBRContainsIssueTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888774 - /camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteEndpointTest.java</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209115628.AB67323888E9@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209115628-AB67323888E9@eris-apache-org%3e</id>
<updated>2009-12-09T11:56:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Wed Dec  9 11:56:28 2009
New Revision: 888774

URL: http://svn.apache.org/viewvc?rev=888774&amp;view=rev
Log:
Removed problematic test

Removed:
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteEndpointTest.java



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888734 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/management/ components/camel-atom/src/test/java/org/apache/camel/component/atom/ components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/ components/camel-...</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209084552.ED54F23889B3@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209084552-ED54F23889B3@eris-apache-org%3e</id>
<updated>2009-12-09T08:45:52Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Wed Dec  9 08:45:51 2009
New Revision: 888734

URL: http://svn.apache.org/viewvc?rev=888734&amp;view=rev
Log:
Fixed unit tests reported by TC.

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java
    camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingLowDelayTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConvertersTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMultipleRecipientsTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProducerUnsupportedCharsetTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeWithLongerFilenameTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/management/ManagedRoutePerformanceCounterTest.java
Wed Dec  9 08:45:51 2009
@@ -47,14 +47,14 @@
 
         template.asyncSendBody("direct:start", "Hello World");
 
-        Thread.sleep(500);
+        Thread.sleep(1000);
 
         Integer inFlight = (Integer) mbeanServer.getAttribute(on, "InflightExchanges");
         assertEquals(1, inFlight.longValue());
 
         assertMockEndpointsSatisfied();
 
-        Thread.sleep(500);
+        Thread.sleep(1000);
 
         Long completed = (Long) mbeanServer.getAttribute(on, "ExchangesCompleted");
         assertEquals(1, completed.longValue());

Modified: camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingLowDelayTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingLowDelayTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingLowDelayTest.java
(original)
+++ camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomPollingLowDelayTest.java
Wed Dec  9 08:45:51 2009
@@ -30,7 +30,7 @@
     public void testLowDelay() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(7);
-        mock.setResultWaitTime(1000L);
+        mock.setResultWaitTime(3000L);
         mock.assertIsSatisfied();
     }
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
Wed Dec  9 08:45:51 2009
@@ -62,8 +62,14 @@
 
         try {
             assertEquals(200, httpclient.executeMethod(get));
-            assertEquals("&lt;Customers&gt;&lt;Customer&gt;&lt;id&gt;123&lt;/id&gt;&lt;name&gt;John&lt;/name&gt;&lt;/Customer&gt;&lt;Customer&gt;&lt;id&gt;113&lt;/id&gt;&lt;name&gt;Dan&lt;/name&gt;&lt;/Customer&gt;&lt;/Customers&gt;",

-                         get.getResponseBodyAsString());
+            // order returned can differ on OS so match for both orders
+            String s = get.getResponseBodyAsString();
+            boolean m1 = "&lt;Customers&gt;&lt;Customer&gt;&lt;id&gt;123&lt;/id&gt;&lt;name&gt;John&lt;/name&gt;&lt;/Customer&gt;&lt;Customer&gt;&lt;id&gt;113&lt;/id&gt;&lt;name&gt;Dan&lt;/name&gt;&lt;/Customer&gt;&lt;/Customers&gt;".equals(s);
+            boolean m2 = "&lt;Customers&gt;&lt;Customer&gt;&lt;id&gt;113&lt;/id&gt;&lt;name&gt;Dan&lt;/name&gt;&lt;/Customer&gt;&lt;Customer&gt;&lt;id&gt;123&lt;/id&gt;&lt;name&gt;John&lt;/name&gt;&lt;/Customer&gt;&lt;/Customers&gt;".equals(s);
+
+            if (!m1 &amp;&amp; !m2) {
+                fail("Not expected body returned: " + s);
+            }
         } finally {
             get.releaseConnection();
         }

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConvertersTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConvertersTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConvertersTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailConvertersTest.java
Wed Dec  9 08:45:51 2009
@@ -26,12 +26,19 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
+import org.jvnet.mock_javamail.Mailbox;
 
 /**
  * @version $Revision$
  */
 public class MailConvertersTest extends CamelTestSupport {
 
+    @Override
+    public void setUp() throws Exception {
+        Mailbox.clearAll();
+        super.setUp();
+    }
+
     @Test
     public void testMailMessageToString() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java
Wed Dec  9 08:45:51 2009
@@ -32,6 +32,7 @@
 import org.apache.camel.util.ObjectHelper;
 import org.junit.Before;
 import org.junit.Test;
+import org.jvnet.mock_javamail.Mailbox;
 
 /**
  * @version $Revision$
@@ -84,6 +85,7 @@
     @Before
     public void setUp() throws Exception {
         super.setUp();
+        Mailbox.clearAll();
 
         endpoint = resolveMandatoryEndpoint("pop3://someone@myhost:30/subject");
 

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMultipleRecipientsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMultipleRecipientsTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMultipleRecipientsTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMultipleRecipientsTest.java
Wed Dec  9 08:45:51 2009
@@ -58,8 +58,8 @@
         assertMailbox("willem");
 
         // START SNIPPET: e2
-        // here we have preconfigued the to recievs to claus and willem. Notice we use comma
to seperate
-        // the two recipeients. Camel also support using colon as seperator char
+        // here we have pre configured the to receivers to claus and willem. Notice we use
comma to separate
+        // the two recipients. Camel also support using colon as separator char
         template.sendBody("smtp://localhost?To=claus@localhost,willem@localhost&amp;CC=james@localhost",
"Hello World");
         // END SNIPPET: e2
 

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProducerUnsupportedCharsetTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProducerUnsupportedCharsetTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProducerUnsupportedCharsetTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProducerUnsupportedCharsetTest.java
Wed Dec  9 08:45:51 2009
@@ -25,6 +25,7 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
+import org.jvnet.mock_javamail.Mailbox;
 import org.springframework.mail.MailPreparationException;
 
 /**
@@ -40,6 +41,8 @@
     @Test
     @SuppressWarnings("unchecked")
     public void testSencUnsupportedCharset() throws Exception {
+        Mailbox.clearAll();
+
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
@@ -68,6 +71,8 @@
     @Test
     @SuppressWarnings("unchecked")
     public void testSencUnsupportedCharsetDisabledOption() throws Exception {
+        Mailbox.clearAll();
+
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java
Wed Dec  9 08:45:51 2009
@@ -40,6 +40,7 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
+import org.jvnet.mock_javamail.Mailbox;
 
 /**
  * @version $Revision$
@@ -49,6 +50,8 @@
 
     @Test
     public void testSendAndReceiveMails() throws Exception {
+        Mailbox.clearAll();
+
         MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
         resultEndpoint.expectedMinimumMessageCount(1);
 

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeTest.java
Wed Dec  9 08:45:51 2009
@@ -18,7 +18,6 @@
 
 import java.io.ByteArrayOutputStream;
 import java.util.Map;
-
 import javax.activation.DataHandler;
 import javax.activation.FileDataSource;
 import javax.mail.internet.MimeMultipart;
@@ -29,6 +28,8 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
+import org.jvnet.mock_javamail.Mailbox;
+
 import static org.apache.camel.component.mail.MailConstants.MAIL_ALTERNATIVE_BODY;
 
 public class MimeMultipartAlternativeTest extends CamelTestSupport {
@@ -36,6 +37,8 @@
     private String htmlBody = "&lt;html&gt;&lt;body&gt;&lt;h1&gt;Hello&lt;/h1&gt;World&lt;img
src=\"cid:0001\"&gt;&lt;/body&gt;&lt;/html&gt;";
 
     private void sendMultipartEmail(boolean useInlineattachments) throws Exception {
+        Mailbox.clearAll();
+
         // create an exchange with a normal body and attachment to be produced as email
         MailEndpoint endpoint = context.getEndpoint("smtp://ryan@mymailserver.com?password=secret",
MailEndpoint.class);
         endpoint.getConfiguration().setUseInlineAttachments(useInlineattachments);

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeWithLongerFilenameTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeWithLongerFilenameTest.java?rev=888734&amp;r1=888733&amp;r2=888734&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeWithLongerFilenameTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMultipartAlternativeWithLongerFilenameTest.java
Wed Dec  9 08:45:51 2009
@@ -28,6 +28,8 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
+import org.jvnet.mock_javamail.Mailbox;
+
 import static org.apache.camel.component.mail.MailConstants.MAIL_ALTERNATIVE_BODY;
 
 public class MimeMultipartAlternativeWithLongerFilenameTest extends CamelTestSupport {
@@ -35,6 +37,8 @@
     private String htmlBody = "&lt;html&gt;&lt;body&gt;&lt;h1&gt;Hello&lt;/h1&gt;World&lt;img
src=\"cid:myCoolLogo.jpeg\"&gt;&lt;/body&gt;&lt;/html&gt;";
 
     private void sendMultipartEmail(boolean useInlineattachments) throws Exception {
+        Mailbox.clearAll();
+
         // create an exchange with a normal body and attachment to be produced as email
         MailEndpoint endpoint = context.getEndpoint("smtp://ryan@mymailserver.com?password=secret",
MailEndpoint.class);
         endpoint.getConfiguration().setUseInlineAttachments(useInlineattachments);




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888729 - in /camel/trunk: parent/ tests/camel-itest-karaf/ tests/camel-itest-osgi/ tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/ tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/ tests/camel-itest-o...</title>
<author><name>ningjiang@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209082022.D50E2238899B@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209082022-D50E2238899B@eris-apache-org%3e</id>
<updated>2009-12-09T08:20:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ningjiang
Date: Wed Dec  9 08:20:20 2009
New Revision: 888729

URL: http://svn.apache.org/viewvc?rev=888729&amp;view=rev
Log:
CAMEL-2270 upgraded the PaxExam version to 1.2.0

Modified:
    camel/trunk/parent/pom.xml
    camel/trunk/tests/camel-itest-karaf/pom.xml
    camel/trunk/tests/camel-itest-osgi/pom.xml
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=888729&amp;r1=888728&amp;r2=888729&amp;view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Wed Dec  9 08:20:20 2009
@@ -85,8 +85,8 @@
     &lt;!-- spring 2.5.x is only compatible with junit 4.4 or lower - see SPR-5145 --&gt;
     &lt;junit-version&gt;4.4&lt;/junit-version&gt;
     &lt;ognl-version&gt;2.7.3_1&lt;/ognl-version&gt;
-    &lt;pax-exam-version&gt;1.0.0&lt;/pax-exam-version&gt;
-    &lt;pax-tiny-bundle-version&gt;1.0.0&lt;/pax-tiny-bundle-version&gt;
+    &lt;pax-exam-version&gt;1.2.0&lt;/pax-exam-version&gt;
+    &lt;pax-tiny-bundle-version&gt;1.2.0&lt;/pax-tiny-bundle-version&gt;
     &lt;qpid-version&gt;0.5.0&lt;/qpid-version&gt;
     &lt;restlet-version&gt;1.1.5&lt;/restlet-version&gt;
     &lt;saxon-version&gt;9.1.0.1&lt;/saxon-version&gt;

Modified: camel/trunk/tests/camel-itest-karaf/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-karaf/pom.xml?rev=888729&amp;r1=888728&amp;r2=888729&amp;view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-karaf/pom.xml (original)
+++ camel/trunk/tests/camel-itest-karaf/pom.xml Wed Dec  9 08:20:20 2009
@@ -31,11 +31,6 @@
   &lt;name&gt;Camel :: Karaf Integration Tests&lt;/name&gt;
   &lt;description&gt;Performs Karaf compliance integration tests&lt;/description&gt;
 
-  &lt;properties&gt;
-    &lt;pax-exam-version&gt;1.0.0&lt;/pax-exam-version&gt;
-    &lt;pax-tiny-bundle-version&gt;1.0.0&lt;/pax-tiny-bundle-version&gt;  
-  &lt;/properties&gt;
-
   &lt;repositories&gt;
     &lt;repository&gt;
       &lt;id&gt;biz.aQute&lt;/id&gt;

Modified: camel/trunk/tests/camel-itest-osgi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/pom.xml?rev=888729&amp;r1=888728&amp;r2=888729&amp;view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/pom.xml (original)
+++ camel/trunk/tests/camel-itest-osgi/pom.xml Wed Dec  9 08:20:20 2009
@@ -31,11 +31,6 @@
   &lt;name&gt;Camel :: OSGi Integration Tests&lt;/name&gt;
   &lt;description&gt;Performs OSGi compliance integration tests&lt;/description&gt;
 
-  &lt;properties&gt;
-    &lt;pax-exam-version&gt;1.0.0&lt;/pax-exam-version&gt;
-    &lt;pax-tiny-bundle-version&gt;1.0.0&lt;/pax-tiny-bundle-version&gt;  
-  &lt;/properties&gt;
-
   &lt;repositories&gt;
     &lt;repository&gt;
       &lt;id&gt;biz.aQute&lt;/id&gt;
@@ -142,35 +137,20 @@
 
   &lt;/dependencies&gt;
 
-  &lt;build&gt;
-    &lt;plugins&gt;
-      &lt;!-- generate dependencies versions --&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.servicemix.tooling&lt;/groupId&gt;
-        &lt;artifactId&gt;depends-maven-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;id&gt;generate-depends-file&lt;/id&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;generate-depends-file&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-
-      &lt;plugin&gt;
-          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
-          &lt;configuration&gt;
-              &lt;includes&gt;
-                  &lt;include&gt;**/*Test.*&lt;/include&gt;
-              &lt;/includes&gt;
-              &lt;excludes&gt;
-                  &lt;exclude&gt;**/XXXTest.*&lt;/exclude&gt;
-              &lt;/excludes&gt;               
-          &lt;/configuration&gt;
-      &lt;/plugin&gt;
-
-    &lt;/plugins&gt;
+	&lt;build&gt;
+		&lt;plugins&gt;
+			&lt;plugin&gt;
+				&lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
+				&lt;configuration&gt;
+					&lt;includes&gt;
+						&lt;include&gt;**/*Test.*&lt;/include&gt;
+					&lt;/includes&gt;
+					&lt;excludes&gt;
+						&lt;exclude&gt;**/XXXTest.*&lt;/exclude&gt;
+					&lt;/excludes&gt;
+				&lt;/configuration&gt;
+			&lt;/plugin&gt;
+		&lt;/plugins&gt;
   &lt;/build&gt;
 
   &lt;profiles&gt;

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java?rev=888729&amp;r1=888728&amp;r2=888729&amp;view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
Wed Dec  9 08:20:20 2009
@@ -18,7 +18,7 @@
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.osgi.CamelContextFactory;
-import org.apache.camel.test.CamelTestSupport;
+import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.junit.After;

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java?rev=888729&amp;r1=888728&amp;r2=888729&amp;view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jaxb/JaxbFallbackConverterTest.java
Wed Dec  9 08:20:20 2009
@@ -28,6 +28,7 @@
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 
+import static org.ops4j.pax.exam.CoreOptions.equinox;
 import static org.ops4j.pax.exam.CoreOptions.felix;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
@@ -74,9 +75,9 @@
             // using the features to install the camel components             
             scanFeatures(mavenBundle().groupId("org.apache.camel.karaf").
                          artifactId("features").versionAsInProject().type("xml/features"),
                        
-                          "camel-core", "camel-osgi", "camel-spring", "camel-test", "camel-jaxb"),
+                          "camel-core", "camel-spring-osgi", "camel-test", "camel-jaxb"),
             
-            felix());
+            equinox().version("3.5.1"));
         
         return options;
     }

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java?rev=888729&amp;r1=888728&amp;r2=888729&amp;view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jpa/JpaRouteTest.java
Wed Dec  9 08:20:20 2009
@@ -135,7 +135,7 @@
             // using the features to install the camel components             
             scanFeatures(mavenBundle().groupId("org.apache.camel.karaf").
                          artifactId("features").versionAsInProject().type("xml/features"),
                        
-                          "camel-core", "camel-osgi", "camel-spring", "camel-test", "camel-jpa"),
+                          "camel-core", "camel-spring-osgi", "camel-test", "camel-jpa"),
             
             /* This the camel-jpa needed bundles 
             mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.java-persistence-api-1.1.1").version("1.4-SNAPSHOT"),

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java?rev=888729&amp;r1=888728&amp;r2=888729&amp;view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/ServletComponentTest.java
Wed Dec  9 08:20:20 2009
@@ -28,17 +28,19 @@
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.ops4j.pax.exam.options.SystemPropertyOption;
+import org.ops4j.pax.swissbox.tinybundles.core.metadata.BndBuilder;
 import org.ops4j.pax.swissbox.tinybundles.dp.Constants;
+import org.osgi.service.http.HttpService;
 import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
 
-import static org.ops4j.pax.exam.CoreOptions.bundle;
+
 import static org.ops4j.pax.exam.CoreOptions.felix;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.provision;
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.logProfile;
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.asURL;
 import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
 import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd;
 
@@ -55,27 +57,23 @@
     @Configuration
     public static Option[] configure() {
         Option[] options = options(
-           
+            
             // install the spring dm profile            
             profile("spring.dm").version("1.2.0"),
+            profile("compendium"),
+            profile("web"),
             // set the system property for pax web
             org.ops4j.pax.exam.CoreOptions.systemProperty("org.osgi.service.http.port").value("9080"),
             
-            // install the profile for OSGi web
-            mavenBundle().groupId("org.ops4j.pax.web").artifactId("pax-web-service").version("0.6.0"),
-            
             // this is how you set the default log level when using pax logging (logProfile)
             org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
             
             // using the features to install the camel components             
             scanFeatures(mavenBundle().groupId("org.apache.camel.karaf").
                          artifactId("features").versionAsInProject().type("xml/features"),
                        
-                          "camel-core", "camel-osgi", "camel-spring", "camel-test", "camel-http",
"camel-servlet"),
-            
-            // create a customer bundle start up the CamelHttpTransportServlet
-            bundle(newBundle().addClass(ServletActivator.class)
-                .prepare(withBnd().set(Constants.BUNDLE_SYMBOLICNAME, "CamelServletTinyBundle")
-                                  .set(Constants.BUNDLE_ACTIVATOR, ServletActivator.class.getName())).build(asURL()).toString()),
+                          "camel-core", "camel-spring-osgi", "camel-test", "camel-http",
"camel-servlet"),
+          
+                
             felix());
         
         return options;
@@ -83,7 +81,8 @@
     
     @Override
     protected OsgiBundleXmlApplicationContext createApplicationContext() {
-        return new OsgiBundleXmlApplicationContext(new String[]{"org/apache/camel/itest/osgi/servlet/CamelServletContext.xml"});
+        return new OsgiBundleXmlApplicationContext(new String[]{"org/apache/camel/itest/osgi/servlet/ServletService.xml",
+                                                                "org/apache/camel/itest/osgi/servlet/CamelServletContext.xml"});
     }
    
 

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java?rev=888729&amp;r1=888728&amp;r2=888729&amp;view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/servlet/support/ServletActivator.java
Wed Dec  9 08:20:20 2009
@@ -22,27 +22,47 @@
 import javax.servlet.Servlet;
 
 import org.apache.camel.component.servlet.CamelHttpTransportServlet;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.http.HttpContext;
 import org.osgi.service.http.HttpService;
+import org.springframework.osgi.context.BundleContextAware;
 
-public final class ServletActivator implements BundleActivator {
+public final class ServletActivator implements BundleActivator, BundleContextAware {
+    private static final transient Log LOG = LogFactory.getLog(ServletActivator.class);
+    private static boolean registerService;
     
     /**
      * HttpService reference.
      */
     private ServiceReference httpServiceRef;
-
+    
     /**
      * Called when the OSGi framework starts our bundle
      */
-    @SuppressWarnings("unchecked")
     public void start(BundleContext bc) throws Exception {
-        httpServiceRef = bc.getServiceReference(HttpService.class.getName());
+        registerServlet(bc);
+    }
+
+    /**
+     * Called when the OSGi framework stops our bundle
+     */
+    public void stop(BundleContext bc) throws Exception {
         if (httpServiceRef != null) {
-            final HttpService httpService = (HttpService)bc.getService(httpServiceRef);
+            bc.ungetService(httpServiceRef);
+            httpServiceRef = null;
+        }
+    }
+    
+    protected void registerServlet(BundleContext bundleContext) throws Exception {
+        httpServiceRef = bundleContext.getServiceReference(HttpService.class.getName());
+        
+        if (httpServiceRef != null &amp;&amp; !registerService) {
+            LOG.info("Regist the servlet service");
+            final HttpService httpService = (HttpService)bundleContext.getService(httpServiceRef);
             if (httpService != null) {
                 // create a default context to share between registrations
                 final HttpContext httpContext = httpService.createDefaultHttpContext();
@@ -55,18 +75,16 @@
                     initParams, // init params
                     httpContext // http context
                 );
-
+                registerService = true;
             }
         }
     }
 
-    /**
-     * Called when the OSGi framework stops our bundle
-     */
-    public void stop(BundleContext bc) throws Exception {
-        if (httpServiceRef != null) {
-            bc.ungetService(httpServiceRef);
-            httpServiceRef = null;
+    public void setBundleContext(BundleContext bc) {
+        try {
+            registerServlet(bc);
+        } catch (Exception e) {
+            LOG.error("Can't register the servlet, the reason is " + e);
         }
     }
 




</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Articles</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c599599510.203.1260344640022.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c599599510-203-1260344640022-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-09T07:44:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Articles"&gt;Articles&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;div class='panelMacro'&gt;&lt;table class='tipMacro'&gt;&lt;colgroup&gt;&lt;col
width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/check.gif"
width="16" height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;See
also&lt;/b&gt;&lt;br /&gt;&lt;p&gt;See also &lt;a href="http://camel.apache.org/user-stories.html"
rel="nofollow"&gt;Camel User Stories&lt;/a&gt;.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Articles-ArticlesonApacheCamel"&gt;&lt;/a&gt;Articles on Apache Camel&lt;/h2&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://mikemclean.ca/muse/2009/05/a-bit-more-meat-camel-applied-jms-to-file/"
rel="nofollow"&gt;A bit more meat: Camel applied : JMS to File&lt;/a&gt; by Mike McLean&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blogs.averconsulting.com/" rel="nofollow"&gt;Mathew Thomas&lt;/a&gt;
posted &lt;a href="http://blogs.averconsulting.com/2009/03/24/apache-camel.aspx?ref=rss" rel="nofollow"&gt;his
thoughts on Apache Camel&lt;/a&gt; including a sample project&lt;/li&gt;
	&lt;li&gt;Matteo wrote a blog entry about &lt;a href="http://matteoredaelli.wordpress.com/2008/10/08/using-apache-camel-with-ibatis/"
rel="nofollow"&gt;using Camel with iBatis&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://pipoltek.blogspot.com/2008/10/knowledgetree-integration-using-apache.html"
rel="nofollow"&gt;Knowledge Tree integration&lt;/a&gt; using Apache Camel&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://ankiewsky.blogspot.com/2008/10/integrating-apache-camel-with-jboss-esb.html"
rel="nofollow"&gt;Integrating Apache Camel with JBoss ESB&lt;/a&gt; by &lt;a href="http://ankiewsky.blogspot.com/"
rel="nofollow"&gt;Edgar Ankiewsky&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.andrejkoelewijn.com/wp/2008/10/19/simple-camel-dsl-osgi-bundle-example/"
rel="nofollow"&gt;Simple DSL OSGi bundle example&lt;/a&gt; by &lt;a href="http://www.andrejkoelewijn.com/"
rel="nofollow"&gt;Andrej Koelewijn&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://elib.uni-stuttgart.de/opus/volltexte/2008/3520/pdf/STUD_2127.pdf"
rel="nofollow"&gt;Realization of EAI Patterns with Apache Camel&lt;/a&gt; by Pascal Kolb at
the Universität Stuttgart&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.jroller.com/gmazza/entry/using_camel_with_maven_to" rel="nofollow"&gt;Using
Camel with Maven to access web services and message queues&lt;/a&gt; by &lt;a href="http://www.jroller.com/gmazza/"
rel="nofollow"&gt;Glen Mazza&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://aminsblog.wordpress.com/2008/05/06/15/" rel="nofollow"&gt;Spring
Remoting with JMS Example&lt;/a&gt; on &lt;a href="http://aminsblog.wordpress.com/" rel="nofollow"&gt;Amin
Abbaspour's Weblog&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://family-hildebrandt.com/eduard/eip_with_apache_camel/" rel="nofollow"&gt;Implementing
Enterprise Integration Patterns with Apache Camel&lt;/a&gt; presentation by Eduard Hildebrandt.
Very nice power point presentation.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blogs.sun.com/polyblog/entry/camel_fuji" rel="nofollow"&gt;Implementing
Fuji integration scenario using Camel SE&lt;/a&gt; by Louis Polycarpou on using Camel with
Open ESB&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://tmielke.blogspot.com/2009/01/using-camel-aggregator-correctly.html"
rel="nofollow"&gt;Using the Camel aggregator correctly&lt;/a&gt; by Torsten Mielke, a great
blog entry how to use the Camel aggregator.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://searjeant.blogspot.com/2009/02/camel-routes-and-hl7.html" rel="nofollow"&gt;Camel
routes and HL7&lt;/a&gt; by Roger Searjeant on using Camel and its HL7 support in the health
care space.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://ankiewsky.blogspot.com/2009/02/combining-apachecamelbsf-to-make-jboss.html"
rel="nofollow"&gt;Combining ApacheCamel+BSF to make JBoss ESB polyglot&lt;/a&gt; by Edgard
Ankiewsky Silva, a JBoss employeer.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.andrejkoelewijn.com/wp/2009/02/28/groovy-and-grape-easiest-way-to-send-gtalk-message-with-apache-camel/"
rel="nofollow"&gt;Groovy and Grape - easiest way to send gtalk message with Apache Camel&lt;/a&gt;
by Andrej Koelewijn how easy it is to use Groovy and Grape to quickly try out new frameworks
such as &lt;a href="http://camel.apache.org/" rel="nofollow"&gt;Apache Camel&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.tecsisa.com/index.igw?item=1628" rel="nofollow"&gt;Domain-Specific
Languages (DSLs) in Apache Camel (Spanish)&lt;/a&gt; by Gema Perdiguero, Tecsisa.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.tecsisa.com/index.igw?item=1629" rel="nofollow"&gt;Apache
Camel integration in ServiceMix (Spanish)&lt;/a&gt; by Sebastián Gómez, Tecsisa.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://architects.dzone.com/articles/apache-camel-integration" rel="nofollow"&gt;Apache
Camel: Integration Nirvana&lt;/a&gt; by Jonathan Anstey &lt;b&gt;Great for learning what Camel
is and what it can do&lt;/b&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blog.brunoborges.com.br/2009/03/leverage-eip-with-apache-camel-and.html"
rel="nofollow"&gt;Leverage EIP with Apache Camel and Twitter&lt;/a&gt; by Bruno Borges&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://refcardz.dzone.com/refcardz/enterprise-integration" rel="nofollow"&gt;Apache
Camel Reference Card at DZone&lt;/a&gt; (the first card out of two) by Claus Ibsen&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blog.jeroenreijn.com/2009/03/apache-camel-open-source-integration.html"
rel="nofollow"&gt;Using RSS with Apache Camel&lt;/a&gt; by Jeroen Reijn&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://mrhaki.blogspot.com/2009/04/handle-google-analytics-scheduled-e.html"
rel="nofollow"&gt;Using Groovy and Camel to pool Google Analyst email reports&lt;/a&gt; by
Mr. Haki&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://mrhaki.blogspot.com/2009/04/use-apache-camel-plugin-in-grails.html"
rel="nofollow"&gt;Using grails-camel plugin to work with Camel in Grails land&lt;/a&gt; by
Mr. Haki&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://mrhaki.blogspot.com/2009/04/send-mail-with-apache-camel-from-grails.html"
rel="nofollow"&gt;Send mail with Apache Camel from Gails&lt;/a&gt; by Mr. Haki&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://java.dzone.com/articles/interview-claus-ibsen-about" rel="nofollow"&gt;Navigating
the Integration Landscape - Claus Ibsen on Apache Camel&lt;/a&gt; Claus Ibsen was interviewed
at DZone discussing the integration landscape&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blog.finalist.com/2009/03/30/apache-camel-enterprise-integration-met-scripttalen-en-dsls/"
rel="nofollow"&gt;Apache Camel: Enterprise Integration met scripttalen en DSLs (Dutch)&lt;/a&gt;
by Peter Maas, Finalist IT Group.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://ssagara.blogspot.com/2009/04/axis2-ride-with-camel.html" rel="nofollow"&gt;Axis
2 ride with Camel&lt;/a&gt; how to use Axis 2 with the Camel &lt;a href="/confluence/display/CAMEL/Tutorial-Example-ReportIncident"
title="Tutorial-Example-ReportIncident"&gt;report incident tutorial&lt;/a&gt; by Sagara&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://architects.dzone.com/articles/introduction-open-ehealth" rel="nofollow"&gt;Introduction
to the Open eHealth Integration Platform (based on top of Apache Camel)&lt;/a&gt; Excellent
DZone article by Martin Krasser&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://coderthoughts.blogspot.com/2009/07/irc-alerter-written-using-apache-camel.html"
rel="nofollow"&gt;An IRC alerter written using Apache Camel and Java&lt;/a&gt; how to easily
integrate IRC with Camel to monitor and do alerts.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://onjavahell.blogspot.com/2009/05/taking-apache-camel-for-ride.html"
rel="nofollow"&gt;Entreprise Integration Pattern with Apache Camel 2.0&lt;/a&gt; by Julien
Dechmann, how to use Camel to split and transform CSV files to POJO and XML and sending to
a JMS destination&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://christopherhunt-software.blogspot.com/2009/07/camel-based-xml-payload-http-polling.html"
rel="nofollow"&gt;A Camel based XML payload HTTP polling provider&lt;/a&gt; by Christopher
Hunt to use Camel with AJAX. Interesting read.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://trenaman.blogspot.com/2009/08/camel-vs-jbi.html" rel="nofollow"&gt;Camel
vs. JBI&lt;/a&gt; by Adrian Trenaman.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://opensourceknowledge.blogspot.com/2009/07/things-to-consider-when-selecting.html"
rel="nofollow"&gt;Things to consider when selecting between Apache Camel and Apache Servicemix&lt;/a&gt;
by Ashwin Karpe&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.chariotsolutions.com/slides/pdfs/ete2009-camel-for-ete-2009.pdf"
rel="nofollow"&gt;Dead Simple Integration with Apache Camel&lt;/a&gt; presentation by Aaron
Mulder from &lt;a href="http://www.chariotsolutions.com/" rel="nofollow"&gt;Chariot Solutions&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://erichauser.net/2009/08/27/groovy-and-camel-for-monitoring-activemq/"
rel="nofollow"&gt;Groovy and Camel for monitoring ActiveMQ&lt;/a&gt; by Eric Hauser how to
monitor AMQ Advisory queues from a single groovy file.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://hillert.blogspot.com/2009/09/camellos-discovering-apache-camel-i.html"
rel="nofollow"&gt;Camellos - Discovering Apache Camel&lt;/a&gt; by Gunnar Hillert. A very
nice and short blog series about Camel showing its powers in a simple and intuitive way. &lt;b&gt;Highly
recommended for new users&lt;/b&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://hillert.blogspot.com/2009/10/apache-camel-alternatives.html"
rel="nofollow"&gt;Apache Camel alternatives&lt;/a&gt; by Gunnar Hillert. He presents a brief
overview of other projects in the integration space.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://krasserm.blogspot.com/2009/10/first-steps-with-apache-camel-on-google.html"
rel="nofollow"&gt;First steps with Apache Camel on Google App Engine&lt;/a&gt; by Martin Krasser
posts his findings to get Camel running on the GAE.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://gnodet.blogspot.com/2009/10/jira-notification-system-for-irc-using.html"
rel="nofollow"&gt;A jira notification system for irc using Camel&lt;/a&gt; by Guillaume Nodet
- all code is in a single XML hot deployed in &lt;a href="http://felix.apache.org/site/index.html"
rel="nofollow"&gt;Apache Karaf&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://blog.software-art.nl/2009/11/15/camel-cxf-and-jms-by-example/"
rel="nofollow"&gt;Camel, CXF and JMS by Example&lt;/a&gt; by Silvester van der Bijl. Good
blog entry how to use CXF and Camel together.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.andrejkoelewijn.com/wp/2009/10/27/simple-log-console-with-camel-and-cometd/"
rel="nofollow"&gt;A simple file monitoring console with camel, cometd and jquery&lt;/a&gt;
by Andrej Koelewijn. Shows how to use Camel to monitor log files and push lines changed using
cometd to a webpage. All in a few files using Groovy.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://groovy.dzone.com/articles/groovy-ride-camel" rel="nofollow"&gt;A
Groovy ride on Camel&lt;/a&gt; by Jack Hung. Shows how to use Groovy with Camel to do a great
content based route and transformation.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;&lt;a name="Articles-WebinarorVideopresentationsonCamel"&gt;&lt;/a&gt;Webinar or
Video presentations on Camel&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://macstrac.blogspot.com/" rel="nofollow"&gt;James Strachan's&lt;/a&gt;
&lt;a href="http://beta.parleys.com/#sl=1&amp;amp;st=5&amp;amp;id=1577" rel="nofollow"&gt;Devoxx
2009 talk&lt;/a&gt; is mostly about Camel and ActiveMQ&lt;/li&gt;
	&lt;li&gt;ScreenCast: an introduction to &lt;a href="http://activemq.apache.org/camel/" rel="nofollow"&gt;Apache
Camel&lt;/a&gt; and the use of &lt;a href="http://activemq.apache.org/camel/enterprise-integration-patterns.html"
rel="nofollow"&gt;Enterprise Integration Patterns&lt;/a&gt; in &lt;a href="http://open.iona.com/resources/video-archived-webinars/camel-screencast-1-medium-resolution/"
rel="nofollow"&gt;Medium Resolution&lt;/a&gt; or &lt;a href="http://open.iona.com/resources/video-archived-webinars/camel-screencast-1-high-resolution/"
rel="nofollow"&gt;High Resolution&lt;/a&gt; by &lt;a href="http://macstrac.blogspot.com/"
rel="nofollow"&gt;James Strachan&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://bsnyderblog.blogspot.com/2008/05/activemq-and-servicemix-at-apachecon-us.html"
rel="nofollow"&gt;Taking Camel for a ride&lt;/a&gt; presentation by Bruce Snyder at ApacheCon
US 2008 (Click on link to the presentation in his blog).&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www4.java.no/incogito/session/Taking+Apache+Camel+for+a+Ride.html#"
rel="nofollow"&gt;JavaZone Conference - Taking Apache Camel for a Rider&lt;/a&gt; - Video
presentation by Bruce Snyder at JavaZone September 2008 in Oslo, Norway (Click on link to
the presentation to show the video).&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.java-tv.com/2009/07/24/introduction-to-messaging-with-apache-activemq/"
rel="nofollow"&gt;Introduction to messaging with ActiveMQ&lt;/a&gt; at &lt;a href="http://www.oredev.com/"
rel="nofollow"&gt;Øredev 2008 conference&lt;/a&gt; presented by &lt;a href="http://bsnyderblog.blogspot.com/"
rel="nofollow"&gt;Bruce Snyder&lt;/a&gt; (with Camel in the end).&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.springhispano.org/?q=node/564" rel="nofollow"&gt;Videos
de las charlas de la 9a reunión de JavaMexico (&lt;b&gt;Spanish&lt;/b&gt;)&lt;/a&gt; by Domingo
Suarez who did a 1 hour presentation. This is a video recording of his presentation.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://fusesource.com/resources/video-archived-webinars/" rel="nofollow"&gt;FuseSource
webinars&lt;/a&gt; - Upcoming and archived webinars on Apache Camel and other related Apache
products.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;&lt;a name="Articles-PodcastswhereCamelistakingpart"&gt;&lt;/a&gt;Podcasts where
Camel is taking part&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://macstrac.blogspot.com/" rel="nofollow"&gt;James Strachan&lt;/a&gt;
was &lt;a href="http://briefingsdirect.blogspot.com/2007/08/apache-camel-addresses-need-for.html"
rel="nofollow"&gt;interviewed&lt;/a&gt; by &lt;a href="http://www.zoominfo.com/Search/PersonDetail.aspx?PersonID=338181&amp;amp;QueryID=0b37845a-9e13-492a-92e6-7ac8ac9707b7"
rel="nofollow"&gt;Dana Gardner&lt;/a&gt; on &lt;a href="/confluence/display/CAMEL/Index" title="Index"&gt;Apache
Camel&lt;/a&gt; and its &lt;a href="/confluence/display/CAMEL/DSL" title="DSL"&gt;DSL&lt;/a&gt;
and support for &lt;a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise
Integration Patterns"&gt;Enterprise Integration Patterns&lt;/a&gt;. Read the &lt;a href="http://briefingsdirect.blogspot.com/2007/08/apache-camel-addresses-need-for.html"
rel="nofollow"&gt;transcript&lt;/a&gt; or check out the &lt;a href="http://interarbor.libsyn.com/index.php?post_id=245998"
rel="nofollow"&gt;podcast&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://techcast.chariotsolutions.com/index.php?post_id=503319" rel="nofollow"&gt;Episode
35 - A few beers with Chariot's Open Source Integration Experts&lt;/a&gt; - Chariot TechCast
Episode 35 where they talk about: ServiceMix, Camel, FUSE, Mule, Spring Integration, EIP,
ESB etc.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;&lt;a name="Articles-BooksonApacheCamel"&gt;&lt;/a&gt;Books on Apache Camel&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.manning.com/rademakers/" rel="nofollow"&gt;Open Source ESBs
in Action&lt;/a&gt; a practical book which investigates various OS ESB products. Among others
Apache Camel is shown when investigating Apache ServiceMix.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.manning.com/ibsen/" rel="nofollow"&gt;Camel in Action&lt;/a&gt;
The Apache Camel bible.&lt;/li&gt;
&lt;/ul&gt;



&lt;h2&gt;&lt;a name="Articles-Camelbloggers"&gt;&lt;/a&gt;Camel bloggers&lt;/h2&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://fusesource.com/resources/fuse-open-source-blogs/" rel="nofollow"&gt;FuseSource
Blogs&lt;/a&gt; - a combined blog feed of many committers on Camel, ActiveMQ, ServiceMix and
CXF&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://davsclaus.blogspot.com/" rel="nofollow"&gt;Claus Ibsen's Blog&lt;/a&gt;
- Claus is a Camel committer since March 2008, and writes a lot about Camel.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://janstey.blogspot.com" rel="nofollow"&gt;Jon Anstey's Blog&lt;/a&gt;
- Jon occasionally blogs about Camel&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://macstrac.blogspot.com/" rel="nofollow"&gt;James Strachan's Blog&lt;/a&gt;
- James blogs about Camel sometimes too &lt;img class="emoticon" src="/confluence/images/icons/emoticons/smile.gif"
height="20" width="20" align="absmiddle" alt="" border="0"/&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://willemjiang.blogspot.com/" rel="nofollow"&gt;Willem Jiang's
Blog&lt;/a&gt; - Willem also writes about Camel in English and Chinese.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://cmoulliard.blogspot.com/" rel="nofollow"&gt;Charles Moulliard's
Blog&lt;/a&gt; - Charles occasionally blogs about Camel and OSGi&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Articles"&gt;View Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=113355&amp;revisedVersion=35&amp;originalVersion=34"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Articles?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888719 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/model/CatchDefinition.java test/java/org/apache/camel/processor/TryCatchMustHaveExceptionConfiguredTest.java</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209073950.D44D523888C5@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209073950-D44D523888C5@eris-apache-org%3e</id>
<updated>2009-12-09T07:39:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Wed Dec  9 07:39:50 2009
New Revision: 888719

URL: http://svn.apache.org/viewvc?rev=888719&amp;view=rev
Log:
CAMEL-2269: doCatch should validate at least one exception configured to catch.

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchMustHaveExceptionConfiguredTest.java
      - copied, changed from r888706, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java?rev=888719&amp;r1=888718&amp;r2=888719&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java Wed Dec
 9 07:39:50 2009
@@ -87,6 +87,11 @@
 
     @Override
     public CatchProcessor createProcessor(RouteContext routeContext) throws Exception {
+        // must have at least one exception
+        if (getExceptionClasses().isEmpty()) {
+            throw new IllegalArgumentException("At least one Exception must be configured
to catch");
+        }
+
         Processor childProcessor = routeContext.createProcessor(this);
 
         Predicate when = null;

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchMustHaveExceptionConfiguredTest.java
(from r888706, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchMustHaveExceptionConfiguredTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchMustHaveExceptionConfiguredTest.java&amp;p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java&amp;r1=888706&amp;r2=888719&amp;rev=888719&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchMustHaveExceptionConfiguredTest.java
Wed Dec  9 07:39:50 2009
@@ -17,48 +17,39 @@
 package org.apache.camel.processor;
 
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
+import org.apache.camel.FailedToCreateRouteException;
 import org.apache.camel.builder.RouteBuilder;
 
 /**
  * @version $Revision$
  */
-public class TryCatchContinueToRouteTest extends ContextTestSupport {
+public class TryCatchMustHaveExceptionConfiguredTest extends ContextTestSupport {
 
-    public void testTryCatchContinueToRoute() throws Exception {
-        getMockEndpoint("mock:a").expectedBodiesReceived("Hello World");
-        getMockEndpoint("mock:b").expectedBodiesReceived("Hello World");
-        getMockEndpoint("mock:catch").expectedBodiesReceived("Hello World");
-        getMockEndpoint("mock:catch").message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
-        getMockEndpoint("mock:c").expectedBodiesReceived("Hello World");
-        getMockEndpoint("mock:c").message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
-
-        template.sendBody("direct:a", "Hello World");
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
+    public void testTryCatchMustHaveExceptionConfigured() throws Exception {
+        context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
                 from("direct:a")
-                    .to("mock:a")
-                    .to("direct:b")
-                    .to("direct:c");
-
-                from("direct:b")
                     .doTry()
                         .to("mock:b")
                         .throwException(new IllegalArgumentException("Damn"))
-                    .doCatch(Exception.class)
+                    .doCatch()
                         .to("mock:catch")
                     .end();
-
-                from("direct:c")
-                    .to("mock:c");
             }
-        };
+        });
+
+        try {
+            context.start();
+            fail("Should throw exception");
+        } catch (FailedToCreateRouteException e) {
+            assertIsInstanceOf(IllegalArgumentException.class, e.getCause());
+            assertEquals("At least one Exception must be configured to catch", e.getCause().getMessage());
+        }
+    }
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
     }
-}
+}
\ No newline at end of file




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888709 - in /camel/trunk/components/camel-ftp/src: main/java/org/apache/camel/component/file/remote/ test/java/org/apache/camel/component/file/remote/</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209063132.066C323889B3@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209063132-066C323889B3@eris-apache-org%3e</id>
<updated>2009-12-09T06:31:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Wed Dec  9 06:31:29 2009
New Revision: 888709

URL: http://svn.apache.org/viewvc?rev=888709&amp;view=rev
Log:
Fixed CS.

Modified:
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java
    camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
(original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
Wed Dec  9 06:31:29 2009
@@ -47,7 +47,7 @@
  */
 public class FtpOperations implements RemoteFileOperations&lt;FTPFile&gt; {
     
-    protected final transient Log LOG = LogFactory.getLog(getClass());
+    protected final transient Log log = LogFactory.getLog(getClass());
     protected final FTPClient client;
     protected final FTPClientConfig clientConfig;
     protected RemoteFileEndpoint&lt;FTPFile&gt; endpoint;
@@ -62,8 +62,8 @@
     }
 
     public boolean connect(RemoteFileConfiguration configuration) throws GenericFileOperationFailedException
{
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Connecting using FTPClient: " + client);
+        if (log.isTraceEnabled()) {
+            log.trace("Connecting using FTPClient: " + client);
         }
 
         String host = configuration.getHost();
@@ -71,12 +71,12 @@
         String username = configuration.getUsername();
 
         if (clientConfig != null) {
-            LOG.trace("Configuring FTPClient with config: " + clientConfig);
+            log.trace("Configuring FTPClient with config: " + clientConfig);
             client.configure(clientConfig);
         }
 
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Connecting to " + configuration.remoteServerInformation());
+        if (log.isTraceEnabled()) {
+            log.trace("Connecting to " + configuration.remoteServerInformation());
         }
 
         boolean connected = false;
@@ -84,8 +84,8 @@
 
         while (!connected) {
             try {
-                if (LOG.isTraceEnabled() &amp;&amp; attempt &gt; 0) {
-                    LOG.trace("Reconnect attempt #" + attempt + " connecting to + " + configuration.remoteServerInformation());
+                if (log.isTraceEnabled() &amp;&amp; attempt &gt; 0) {
+                    log.trace("Reconnect attempt #" + attempt + " connecting to + " + configuration.remoteServerInformation());
                 }
                 client.connect(host, port);
                 // must check reply code if we are connected
@@ -106,8 +106,8 @@
                     failed = new GenericFileOperationFailedException(client.getReplyCode(),
client.getReplyString(), e.getMessage(), e);
                 }
 
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Cannot connect due: " + failed.getMessage());
+                if (log.isTraceEnabled()) {
+                    log.trace("Cannot connect due: " + failed.getMessage());
                 }
                 attempt++;
                 if (attempt &gt; endpoint.getMaximumReconnectAttempts()) {
@@ -125,23 +125,23 @@
 
         // must enter passive mode directly after connect
         if (configuration.isPassiveMode()) {
-            LOG.trace("Using passive mode connections");
+            log.trace("Using passive mode connections");
             client.enterLocalPassiveMode();
         }
 
         try {
             boolean login;
             if (username != null) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Attempting to login user: " + username + " using password:
" + configuration.getPassword());
+                if (log.isTraceEnabled()) {
+                    log.trace("Attempting to login user: " + username + " using password:
" + configuration.getPassword());
                 }
                 login = client.login(username, configuration.getPassword());
             } else {
-                LOG.trace("Attempting to login anonymous");
+                log.trace("Attempting to login anonymous");
                 login = client.login("anonymous", null);
             }
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("User " + (username != null ? username : "anonymous") + " logged
in: " + login);
+            if (log.isTraceEnabled()) {
+                log.trace("User " + (username != null ? username : "anonymous") + " logged
in: " + login);
             }
             if (!login) {
                 throw new GenericFileOperationFailedException(client.getReplyCode(), client.getReplyString());
@@ -174,8 +174,8 @@
     }
 
     public boolean deleteFile(String name) throws GenericFileOperationFailedException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Deleting file: " + name);
+        if (log.isDebugEnabled()) {
+            log.debug("Deleting file: " + name);
         }
         try {
             return this.client.deleteFile(name);
@@ -185,8 +185,8 @@
     }
 
     public boolean renameFile(String from, String to) throws GenericFileOperationFailedException
{
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Renaming file: " + from + " to: " + to);
+        if (log.isDebugEnabled()) {
+            log.debug("Renaming file: " + from + " to: " + to);
         }
         try {
             return client.rename(from, to);
@@ -196,8 +196,8 @@
     }
 
     public boolean buildDirectory(String directory, boolean absolute) throws GenericFileOperationFailedException
{
-        if (LOG.isTraceEnabled()) {
-            LOG.trace("Building directory: " + directory);
+        if (log.isTraceEnabled()) {
+            log.trace("Building directory: " + directory);
         }
         try {
             String originalDirectory = client.printWorkingDirectory();
@@ -207,8 +207,8 @@
                 // maybe the full directory already exists
                 success = client.changeWorkingDirectory(directory);
                 if (!success) {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Trying to build remote directory: " + directory);
+                    if (log.isTraceEnabled()) {
+                        log.trace("Trying to build remote directory: " + directory);
                     }
                     success = client.makeDirectory(directory);
                     if (!success) {
@@ -251,7 +251,7 @@
         } catch (IOException e) {
             throw new GenericFileOperationFailedException(client.getReplyCode(), client.getReplyString(),
e.getMessage(), e);
         } finally {
-            ObjectHelper.close(os, "retrieve: " + name, LOG);
+            ObjectHelper.close(os, "retrieve: " + name, log);
         }
     }
 
@@ -308,18 +308,18 @@
             
         } catch (IOException e) {
             throw new GenericFileOperationFailedException(client.getReplyCode(), client.getReplyString(),
e.getMessage(), e);
-        }  finally {
+        } finally {
             // need to close the stream before rename it
-            ObjectHelper.close(os, "retrieve: " + name, LOG);
+            ObjectHelper.close(os, "retrieve: " + name, log);
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Retrieve file to local work file result: " + result);
+        if (log.isDebugEnabled()) {
+            log.debug("Retrieve file to local work file result: " + result);
         }
 
         if (result) {
-            if (LOG.isTraceEnabled()) {
-                LOG.trace("Renaming local in progress file from: " + temp + " to: " + local);
+            if (log.isTraceEnabled()) {
+                log.trace("Renaming local in progress file from: " + temp + " to: " + local);
             }
             // operation went okay so rename temp to local after we have retrieved the data
             if (!FileUtil.renameFile(temp, local)) {
@@ -337,8 +337,8 @@
             boolean existFile = existsFile(name);
             if (existFile &amp;&amp; endpoint.getFileExist() == GenericFileExist.Ignore)
{
                 // ignore but indicate that the file was written
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("An existing file already exists: " + name + ". Ignore and
do not override it.");
+                if (log.isTraceEnabled()) {
+                    log.trace("An existing file already exists: " + name + ". Ignore and
do not override it.");
                 }
                 return true;
             } else if (existFile &amp;&amp; endpoint.getFileExist() == GenericFileExist.Fail)
{
@@ -359,7 +359,7 @@
         } catch (InvalidPayloadException e) {
             throw new GenericFileOperationFailedException("Cannot store file: " + name, e);
         } finally {
-            ObjectHelper.close(is, "store: " + name, LOG);
+            ObjectHelper.close(is, "store: " + name, log);
         }
     }
 
@@ -446,8 +446,8 @@
 
             // do not try to build root / folder
             if (!directory.equals("/")) {
-                if (LOG.isTraceEnabled()) {
-                    LOG.trace("Trying to build remote directory by chunk: " + directory);
+                if (log.isTraceEnabled()) {
+                    log.trace("Trying to build remote directory by chunk: " + directory);
                 }
 
                 success = client.makeDirectory(directory);

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java
(original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java
Wed Dec  9 06:31:29 2009
@@ -27,7 +27,7 @@
 public class FtpsConfiguration extends FtpConfiguration {
 
     private String securityProtocol = "TLS";
-    private boolean isImplicit = false;
+    private boolean isImplicit;
 
     public FtpsConfiguration() {
         setProtocol("ftps");
@@ -57,17 +57,15 @@
     }
 
     /**
-     * Returns the secutiry mode(Implicit/Explicit).
+     * Returns the security mode(Implicit/Explicit).
      * true - Implicit Mode / False - Explicit Mode
-     * 
-     * @return isImplicit
      */
     public boolean isImplicit() {
         return isImplicit;
     }
 
     /**
-     * Set the secutiry mode(Implicit/Explicit).
+     * Set the security mode(Implicit/Explicit).
      * true - Implicit Mode / False - Explicit Mode
      */
     public void setIsImplicit(boolean isImplicit) {

Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
(original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
Wed Dec  9 06:31:29 2009
@@ -24,6 +24,7 @@
 import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.TrustManagerFactory;
 
+import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPFile;
 import org.apache.commons.net.ftp.FTPSClient;
@@ -52,30 +53,29 @@
     }
     
     /**
-     * create the FTPS client.
-     * 
-     * @throws Exception 
+     * Create the FTPS client.
      */
     protected FTPClient createFtpClient() throws Exception {
-        FTPSClient client = new FTPSClient(
-                getFtpsConfiguration().getSecurityProtocol(),
-                getFtpsConfiguration().isImplicit());
+        FTPSClient client = new FTPSClient(getFtpsConfiguration().getSecurityProtocol(),
+                                           getFtpsConfiguration().isImplicit());
         
         if (ftpClientKeyStoreParameters != null) {
-            String type = (ftpClientKeyStoreParameters.containsKey("type")) ? 
-                    (String) ftpClientKeyStoreParameters.get("type") : 
-                        KeyStore.getDefaultType();
+            String type = (ftpClientKeyStoreParameters.containsKey("type"))
+                    ? (String) ftpClientKeyStoreParameters.get("type") : KeyStore.getDefaultType();
             String file = (String) ftpClientKeyStoreParameters.get("file");
             String password = (String) ftpClientKeyStoreParameters.get("password");
-            String algorithm = (ftpClientKeyStoreParameters.containsKey("algorithm")) ? 
-                    (String) ftpClientKeyStoreParameters.get("algorithm") : 
-                        KeyManagerFactory.getDefaultAlgorithm();
+            String algorithm = (ftpClientKeyStoreParameters.containsKey("algorithm"))
+                    ? (String) ftpClientKeyStoreParameters.get("algorithm")
+                    : KeyManagerFactory.getDefaultAlgorithm();
             String keyPassword = (String) ftpClientKeyStoreParameters.get("keyPassword");
             
             KeyStore keyStore = KeyStore.getInstance(type);
             FileInputStream keyStoreFileInputStream = new FileInputStream(new File(file));
-            keyStore.load(keyStoreFileInputStream, password.toCharArray());
-            keyStoreFileInputStream.close();
+            try {
+                keyStore.load(keyStoreFileInputStream, password.toCharArray());
+            } finally {
+                ObjectHelper.close(keyStoreFileInputStream, "keyStore", log);
+            }
 
             KeyManagerFactory keyMgrFactory = KeyManagerFactory.getInstance(algorithm);
             keyMgrFactory.init(keyStore, keyPassword.toCharArray());
@@ -84,20 +84,22 @@
         }
 
         if (ftpClientTrustStoreParameters != null) {
-            String type = (ftpClientTrustStoreParameters.containsKey("type")) ? 
-                    (String) ftpClientTrustStoreParameters.get("type") : 
-                        KeyStore.getDefaultType();
+            String type = (ftpClientTrustStoreParameters.containsKey("type"))
+                    ? (String) ftpClientTrustStoreParameters.get("type") : KeyStore.getDefaultType();
             String file = (String) ftpClientTrustStoreParameters.get("file");
             String password = (String) ftpClientTrustStoreParameters.get("password");
-            String algorithm = (ftpClientTrustStoreParameters.containsKey("algorithm")) ?

-                    (String) ftpClientTrustStoreParameters.get("algorithm") : 
-                        TrustManagerFactory.getDefaultAlgorithm();
+            String algorithm = (ftpClientTrustStoreParameters.containsKey("algorithm"))
+                    ? (String) ftpClientTrustStoreParameters.get("algorithm")
+                    : TrustManagerFactory.getDefaultAlgorithm();
                     
             KeyStore trustStore = KeyStore.getInstance(type);
             FileInputStream trustStoreFileInputStream = new FileInputStream(new File(file));
-            trustStore.load(trustStoreFileInputStream, password.toCharArray());
-            trustStoreFileInputStream.close();
-            
+            try {
+                trustStore.load(trustStoreFileInputStream, password.toCharArray());
+            } finally {
+                ObjectHelper.close(trustStoreFileInputStream, "trustStore", log);
+            }
+
             TrustManagerFactory trustMgrFactory = TrustManagerFactory.getInstance(algorithm);
             trustMgrFactory.init(trustStore);
             
@@ -126,14 +128,14 @@
     }
 
     /**
-     * Set the key store parameter
+     * Set the key store parameters
      */
     public void setFtpClientKeyStoreParameters(Map&lt;String, Object&gt; param) {
         this.ftpClientKeyStoreParameters = param;
     }
 
     /**
-     * Set the trust store parameter
+     * Set the trust store parameters
      */
     public void setFtpClientTrustStoreParameters(Map&lt;String, Object&gt; param) {
         this.ftpClientTrustStoreParameters = param;

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java
Wed Dec  9 06:31:29 2009
@@ -29,9 +29,9 @@
 public class FileToFtpsExplicitSSLWithClientAuthTest extends FtpsServerExplicitSSLWithClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-        		"&amp;securityProtocol=SSL&amp;isImplicit=false&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+
-        		"&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=SSL&amp;isImplicit=false&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+                + "&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java
Wed Dec  9 06:31:29 2009
@@ -29,8 +29,8 @@
 public class FileToFtpsExplicitSSLWithoutClientAuthTest extends FtpsServerExplicitSSLWithoutClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-        		"&amp;securityProtocol=SSL&amp;isImplicit=false";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=SSL&amp;isImplicit=false";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java
Wed Dec  9 06:31:29 2009
@@ -29,9 +29,9 @@
 public class FileToFtpsExplicitTLSWithClientAuthTest extends FtpsServerExplicitTLSWithClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-            "&amp;securityProtocol=TLS&amp;isImplicit=false&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+
-            "&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=TLS&amp;isImplicit=false&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+                + "&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java
Wed Dec  9 06:31:29 2009
@@ -29,8 +29,8 @@
 public class FileToFtpsExplicitTLSWithoutClientAuthTest extends FtpsServerExplicitTLSWithoutClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-            "&amp;securityProtocol=TLS&amp;isImplicit=false";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=TLS&amp;isImplicit=false";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java
Wed Dec  9 06:31:29 2009
@@ -29,9 +29,9 @@
 public class FileToFtpsImplicitSSLWithClientAuthTest extends FtpsServerImplicitSSLWithClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-        		"&amp;securityProtocol=SSL&amp;isImplicit=true&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+
-        		"&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=SSL&amp;isImplicit=true&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+                + "&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java
Wed Dec  9 06:31:29 2009
@@ -29,8 +29,8 @@
 public class FileToFtpsImplicitSSLWithoutClientAuthTest extends FtpsServerImplicitSSLWithoutClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-        		"&amp;securityProtocol=SSL&amp;isImplicit=true";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=SSL&amp;isImplicit=true";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java
Wed Dec  9 06:31:29 2009
@@ -29,9 +29,9 @@
 public class FileToFtpsImplicitTLSWithClientAuthTest extends FtpsServerImplicitTLSWithClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-            "&amp;securityProtocol=TLS&amp;isImplicit=true&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+
-            "&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=TLS&amp;isImplicit=true&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+                + "&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java
Wed Dec  9 06:31:29 2009
@@ -29,8 +29,8 @@
 public class FileToFtpsImplicitTLSWithoutClientAuthTest extends FtpsServerImplicitTLSWithoutClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-            "&amp;securityProtocol=TLS&amp;isImplicit=true";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=TLS&amp;isImplicit=true";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java
Wed Dec  9 06:31:29 2009
@@ -29,11 +29,11 @@
 public class FileToFtpsWithCustomKeyAndTrustStorePropertiesTest extends FtpsServerExplicitSSLWithClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-            "&amp;securityProtocol=SSL&amp;isImplicit=false&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+
-            "&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password"
+
-            "&amp;ftpClient.trustStore.file=./src/test/resources/server.jks&amp;ftpClient.trustStore.type=JKS"
+
-            "&amp;ftpClient.trustStore.algorithm=SunX509&amp;ftpClient.trustStore.password=password";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=SSL&amp;isImplicit=false&amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;ftpClient.keyStore.type=JKS"
+                + "&amp;ftpClient.keyStore.algorithm=SunX509&amp;ftpClient.keyStore.password=password&amp;ftpClient.keyStore.keyPassword=password"
+                + "&amp;ftpClient.trustStore.file=./src/test/resources/server.jks&amp;ftpClient.trustStore.type=JKS"
+                + "&amp;ftpClient.trustStore.algorithm=SunX509&amp;ftpClient.trustStore.password=password";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java
Wed Dec  9 06:31:29 2009
@@ -29,9 +29,9 @@
 public class FileToFtpsWithCustomTrustStorePropertiesTest extends FtpsServerExplicitSSLWithoutClientAuthTestSupport
{
     
     private String getFtpUrl() {
-        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+
-            "&amp;securityProtocol=SSL&amp;isImplicit=false&amp;ftpClient.trustStore.file=./src/test/resources/server.jks&amp;ftpClient.trustStore.type=JKS"
+
-            "&amp;ftpClient.trustStore.algorithm=SunX509&amp;ftpClient.trustStore.password=password";
+        return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&amp;consumer.initialDelay=5000"
+                + "&amp;securityProtocol=SSL&amp;isImplicit=false&amp;ftpClient.trustStore.file=./src/test/resources/server.jks&amp;ftpClient.trustStore.type=JKS"
+                + "&amp;ftpClient.trustStore.algorithm=SunX509&amp;ftpClient.trustStore.password=password";
     }
     
     @Test

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java?rev=888709&amp;r1=888708&amp;r2=888709&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java
Wed Dec  9 06:31:29 2009
@@ -65,7 +65,7 @@
         
         sslConfigFactory.setClientAuthentication(getClientAuth());
         
-        if (Boolean.valueOf(getClientAuth()).booleanValue() == true) {
+        if (Boolean.valueOf(getClientAuth())) {
             sslConfigFactory.setTruststoreFile(FTPSERVER_KEYSTORE);
             sslConfigFactory.setTruststoreType("JKS");
             sslConfigFactory.setTruststoreAlgorithm("SunX509");




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888706 - /camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091209054225.CD80E238888C@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091209054225-CD80E238888C@eris-apache-org%3e</id>
<updated>2009-12-09T05:42:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Wed Dec  9 05:42:25 2009
New Revision: 888706

URL: http://svn.apache.org/viewvc?rev=888706&amp;view=rev
Log:
Added unit test based on user forum issue

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
  (with props)

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java?rev=888706&amp;view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
(added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
Wed Dec  9 05:42:25 2009
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.processor;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ * @version $Revision$
+ */
+public class TryCatchContinueToRouteTest extends ContextTestSupport {
+
+    public void testTryCatchContinueToRoute() throws Exception {
+        getMockEndpoint("mock:a").expectedBodiesReceived("Hello World");
+        getMockEndpoint("mock:b").expectedBodiesReceived("Hello World");
+        getMockEndpoint("mock:catch").expectedBodiesReceived("Hello World");
+        getMockEndpoint("mock:catch").message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
+        getMockEndpoint("mock:c").expectedBodiesReceived("Hello World");
+        getMockEndpoint("mock:c").message(0).property(Exchange.EXCEPTION_CAUGHT).isInstanceOf(IllegalArgumentException.class);
+
+        template.sendBody("direct:a", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:a")
+                    .to("mock:a")
+                    .to("direct:b")
+                    .to("direct:c");
+
+                from("direct:b")
+                    .doTry()
+                        .to("mock:b")
+                        .throwException(new IllegalArgumentException("Damn"))
+                    .doCatch(Exception.class)
+                        .to("mock:catch")
+                    .end();
+
+                from("direct:c")
+                    .to("mock:c");
+            }
+        };
+    }
+}

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryCatchContinueToRouteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date




</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Camel 2.2.0 Release</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c1439029245.25.1260291420017.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c1439029245-25-1260291420017-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T16:57:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;Camel
2.2.0 Release&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~muellerc"&gt;Christian
Mueller&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h1&gt;&lt;a name="Camel2.2.0Release-Camel2.2.0release%28currentlyinprogress%29"&gt;&lt;/a&gt;Camel
2.2.0 release (currently in progress)&lt;/h1&gt;

&lt;div style="padding-right:20px;float:left;margin-left:-20px;"&gt;&lt;p&gt;&lt;img src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"
align="absmiddle" border="0" /&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div style="min-height:200px"&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-NewandNoteworthy"&gt;&lt;/a&gt;New and Noteworthy&lt;/h2&gt;

&lt;p&gt;Welcome to the 2.2.0 release which approx XXX issues resolved (new features, improvements
and bug fixes such as...)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Routing+Slip" title="Routing Slip"&gt;Routing
Slip&lt;/a&gt; now breaks when an exception occurred&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;MINA&lt;/a&gt; now
supports easier configuration of multiple custom codecs, which is needed when working with
SSL.&lt;/li&gt;
	&lt;li&gt;Improved &lt;a href="/confluence/display/CAMEL/TransactionErrorHandler" title="TransactionErrorHandler"&gt;TransactionErrorHandler&lt;/a&gt;
two fold by reducing complexity of internal logic in Camel when working with transactions.
And added better support for using multiple transactions in multiple routes. See more at section
&lt;em&gt;Using multiple routes with different propagation behaviors&lt;/em&gt; at &lt;a href="/confluence/display/CAMEL/Transactional+Client"
title="Transactional Client"&gt;Transactional Client&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Recipient+List" title="Recipient List"&gt;Recipient
List&lt;/a&gt; now supports &lt;tt&gt;parallelProcessing&lt;/tt&gt;, &lt;tt&gt;stopOnException&lt;/tt&gt;
and references for &lt;tt&gt;AggregationStrategy&lt;/tt&gt; and thread pools. This applies
to the &lt;tt&gt;@RecipientList&lt;/tt&gt; annotation as well.&lt;/li&gt;
	&lt;li&gt;Cleanup of spring jar dependencies.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File
Language&lt;/a&gt; is now merged directly into &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language which among others makes &lt;a href="/confluence/display/CAMEL/Content+Based+Router"
title="Content Based Router"&gt;Content Based Router&lt;/a&gt; in Spring XML using file language
syntax easier.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewEnterpriseIntegrationPatterns"&gt;&lt;/a&gt;New
&lt;a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration
Patterns"&gt;Enterprise Integration Patterns&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewComponents"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Components"
title="Components"&gt;Components&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;camel-ftp&lt;/a&gt;
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/SMPP" title="SMPP"&gt;camel-smpp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDSL"&gt;&lt;/a&gt;New DSL&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;markRollbackOnlyLast&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewAnnotations"&gt;&lt;/a&gt;New Annotations&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDataFormatsDataFormat"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Data+Format"
title="Data Format"&gt;Data Formats&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewLanguages"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Languages"
title="Languages"&gt;Languages&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewExamples"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Examples"
title="Examples"&gt;Examples&lt;/a&gt;&lt;/h3&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-APIbreaking"&gt;&lt;/a&gt;API breaking&lt;/h2&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-KnownIssues"&gt;&lt;/a&gt;Known Issues&lt;/h2&gt;

&lt;p&gt;See known issues from previous releases.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Importantchangestoconsiderwhenupgrading"&gt;&lt;/a&gt;Important
changes to consider when upgrading&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-Springjardependencieshavebeencutdownincamelcore."&gt;&lt;/a&gt;Spring
jar dependencies have been cut down in camel-core.&lt;/h3&gt;
&lt;p&gt;The &lt;tt&gt;pom.xml&lt;/tt&gt; file for &lt;b&gt;camel-core&lt;/b&gt; have cut
down number of spring jar dependencies to allow Camel to easily run without any Spring .jars
at all. However this affects you if you use maven and use camel-core without camel-spring
or spring at all. If you want to use JMX with Camel then you need to add the following 4 spring
jars required: &lt;tt&gt;spring-core.jar, spring-beans.jar, spring-context.jar, spring-aop.jar&lt;/tt&gt;.
With maven you only need to depend on &lt;tt&gt;spring-context&lt;/tt&gt; and &lt;tt&gt;spring-aop&lt;/tt&gt;
as they will bring in the other two jars.&lt;/p&gt;

&lt;p&gt;See also &lt;a href="/confluence/display/CAMEL/Camel+jar+dependencies" title="Camel
jar dependencies"&gt;Camel jar dependencies&lt;/a&gt; and &lt;a href="/confluence/display/CAMEL/Camel+JMX"
title="Camel JMX"&gt;Camel JMX&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-GettingtheDistributions"&gt;&lt;/a&gt;Getting the
Distributions&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-BinaryDistributions"&gt;&lt;/a&gt;Binary Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Windows Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip"
rel="nofollow"&gt;apache-camel-2.2.0.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Unix/Linux/Cygwin Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;The above
URLs use redirection&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The above URLs use the Apache Mirror system
to redirect you to a suitable mirror for your download. Some users have experienced issues
with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to
work for you from the above URL then try using &lt;a href="http://www.mozilla.com/en-US/firefox/"
rel="nofollow"&gt;FireFox&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SourceDistributions"&gt;&lt;/a&gt;Source Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Windows &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Unix/Linux/Cygwin &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-GettingtheBinariesusingMaven2"&gt;&lt;/a&gt;Getting
the Binaries using Maven 2&lt;/h3&gt;

&lt;p&gt;To use this release in your maven project, the proper dependency configuration that
you should use in your &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html"
rel="nofollow"&gt;Maven POM&lt;/a&gt; is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
&lt;span class="code-tag"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span
class="code-tag"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-core&lt;span class="code-tag"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class="code-tag"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SVNTagCheckout"&gt;&lt;/a&gt;SVN Tag Checkout&lt;/h3&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
svn co http:&lt;span class="code-comment"&gt;//svn.apache.org/repos/asf/camel/tags/camel-2.2.0&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Changelog"&gt;&lt;/a&gt;Changelog&lt;/h2&gt;

&lt;p&gt;For a more detailed view of new features and bug fixes, see the:&lt;br/&gt;
TODO: Fix for 2.2.0&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://issues.apache.org/activemq/secure/ReleaseNote.jspa?projectId=11020&amp;amp;styleName=Html&amp;amp;version=11900"
rel="nofollow"&gt;release notes for 2.2.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9011430&amp;revisedVersion=11&amp;originalVersion=10"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Camel 2.2.0 Release</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c977345000.19.1260291300018.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c977345000-19-1260291300018-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T16:55:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;Camel
2.2.0 Release&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~muellerc"&gt;Christian
Mueller&lt;/a&gt;
    &lt;/h4&gt;
     added the camel-smpp component
          &lt;div id="versionComment" class="noteMacro" style="display:none; padding: 5px;"&gt;
     added the camel-smpp component&lt;br /&gt;
     &lt;/div&gt;
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h1&gt;&lt;a name="Camel2.2.0Release-Camel2.2.0release%28currentlyinprogress%29"&gt;&lt;/a&gt;Camel
2.2.0 release (currently in progress)&lt;/h1&gt;

&lt;div style="padding-right:20px;float:left;margin-left:-20px;"&gt;&lt;p&gt;&lt;img src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"
align="absmiddle" border="0" /&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div style="min-height:200px"&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-NewandNoteworthy"&gt;&lt;/a&gt;New and Noteworthy&lt;/h2&gt;

&lt;p&gt;Welcome to the 2.2.0 release which approx XXX issues resolved (new features, improvements
and bug fixes such as...)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Routing+Slip" title="Routing Slip"&gt;Routing
Slip&lt;/a&gt; now breaks when an exception occurred&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;MINA&lt;/a&gt; now
supports easier configuration of multiple custom codecs, which is needed when working with
SSL.&lt;/li&gt;
	&lt;li&gt;Improved &lt;a href="/confluence/display/CAMEL/TransactionErrorHandler" title="TransactionErrorHandler"&gt;TransactionErrorHandler&lt;/a&gt;
two fold by reducing complexity of internal logic in Camel when working with transactions.
And added better support for using multiple transactions in multiple routes. See more at section
&lt;em&gt;Using multiple routes with different propagation behaviors&lt;/em&gt; at &lt;a href="/confluence/display/CAMEL/Transactional+Client"
title="Transactional Client"&gt;Transactional Client&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Recipient+List" title="Recipient List"&gt;Recipient
List&lt;/a&gt; now supports &lt;tt&gt;parallelProcessing&lt;/tt&gt;, &lt;tt&gt;stopOnException&lt;/tt&gt;
and references for &lt;tt&gt;AggregationStrategy&lt;/tt&gt; and thread pools. This applies
to the &lt;tt&gt;@RecipientList&lt;/tt&gt; annotation as well.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
	&lt;li&gt;Cleanup of spring jar dependencies.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File
Language&lt;/a&gt; is now merged directly into &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language which among others makes &lt;a href="/confluence/display/CAMEL/Content+Based+Router"
title="Content Based Router"&gt;Content Based Router&lt;/a&gt; in Spring XML using file language
syntax easier.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewEnterpriseIntegrationPatterns"&gt;&lt;/a&gt;New
&lt;a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration
Patterns"&gt;Enterprise Integration Patterns&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewComponents"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Components"
title="Components"&gt;Components&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/SMPP" title="SMPP"&gt;camel-smpp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDSL"&gt;&lt;/a&gt;New DSL&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;markRollbackOnlyLast&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewAnnotations"&gt;&lt;/a&gt;New Annotations&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDataFormatsDataFormat"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Data+Format"
title="Data Format"&gt;Data Formats&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewLanguages"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Languages"
title="Languages"&gt;Languages&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewExamples"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Examples"
title="Examples"&gt;Examples&lt;/a&gt;&lt;/h3&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-APIbreaking"&gt;&lt;/a&gt;API breaking&lt;/h2&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-KnownIssues"&gt;&lt;/a&gt;Known Issues&lt;/h2&gt;

&lt;p&gt;See known issues from previous releases.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Importantchangestoconsiderwhenupgrading"&gt;&lt;/a&gt;Important
changes to consider when upgrading&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-Springjardependencieshavebeencutdownincamelcore."&gt;&lt;/a&gt;Spring
jar dependencies have been cut down in camel-core.&lt;/h3&gt;
&lt;p&gt;The &lt;tt&gt;pom.xml&lt;/tt&gt; file for &lt;b&gt;camel-core&lt;/b&gt; have cut
down number of spring jar dependencies to allow Camel to easily run without any Spring .jars
at all. However this affects you if you use maven and use camel-core without camel-spring
or spring at all. If you want to use JMX with Camel then you need to add the following 4 spring
jars required: &lt;tt&gt;spring-core.jar, spring-beans.jar, spring-context.jar, spring-aop.jar&lt;/tt&gt;.
With maven you only need to depend on &lt;tt&gt;spring-context&lt;/tt&gt; and &lt;tt&gt;spring-aop&lt;/tt&gt;
as they will bring in the other two jars.&lt;/p&gt;

&lt;p&gt;See also &lt;a href="/confluence/display/CAMEL/Camel+jar+dependencies" title="Camel
jar dependencies"&gt;Camel jar dependencies&lt;/a&gt; and &lt;a href="/confluence/display/CAMEL/Camel+JMX"
title="Camel JMX"&gt;Camel JMX&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-GettingtheDistributions"&gt;&lt;/a&gt;Getting the
Distributions&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-BinaryDistributions"&gt;&lt;/a&gt;Binary Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Windows Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip"
rel="nofollow"&gt;apache-camel-2.2.0.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Unix/Linux/Cygwin Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;The above
URLs use redirection&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The above URLs use the Apache Mirror system
to redirect you to a suitable mirror for your download. Some users have experienced issues
with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to
work for you from the above URL then try using &lt;a href="http://www.mozilla.com/en-US/firefox/"
rel="nofollow"&gt;FireFox&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SourceDistributions"&gt;&lt;/a&gt;Source Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Windows &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Unix/Linux/Cygwin &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-GettingtheBinariesusingMaven2"&gt;&lt;/a&gt;Getting
the Binaries using Maven 2&lt;/h3&gt;

&lt;p&gt;To use this release in your maven project, the proper dependency configuration that
you should use in your &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html"
rel="nofollow"&gt;Maven POM&lt;/a&gt; is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
&lt;span class="code-tag"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span
class="code-tag"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-core&lt;span class="code-tag"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class="code-tag"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SVNTagCheckout"&gt;&lt;/a&gt;SVN Tag Checkout&lt;/h3&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
svn co http:&lt;span class="code-comment"&gt;//svn.apache.org/repos/asf/camel/tags/camel-2.2.0&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Changelog"&gt;&lt;/a&gt;Changelog&lt;/h2&gt;

&lt;p&gt;For a more detailed view of new features and bug fixes, see the:&lt;br/&gt;
TODO: Fix for 2.2.0&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://issues.apache.org/activemq/secure/ReleaseNote.jspa?projectId=11020&amp;amp;styleName=Html&amp;amp;version=11900"
rel="nofollow"&gt;release notes for 2.2.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9011430&amp;revisedVersion=10&amp;originalVersion=9"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888432 - in /camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote: FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java FtpConsumerLocalWorkDirectoryTest.java</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091208151457.067352388998@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091208151457-067352388998@eris-apache-org%3e</id>
<updated>2009-12-08T15:14:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Tue Dec  8 15:14:56 2009
New Revision: 888432

URL: http://svn.apache.org/viewvc?rev=888432&amp;view=rev
Log:
Fixing tests on Windows which needs time to clean resources before deleting files.

Modified:
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java?rev=888432&amp;r1=888431&amp;r2=888432&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
Tue Dec  8 15:14:56 2009
@@ -71,7 +71,8 @@
 
         assertMockEndpointsSatisfied();
 
-        Thread.sleep(200);
+        // give test some time to close file resources
+        Thread.sleep(2000);
 
         // now the lwd file should be deleted
         File local = new File("target/lwd/hello.txt").getAbsoluteFile();
@@ -80,7 +81,7 @@
         // and the out file should exists
         File out = new File("target/out/hello.txt").getAbsoluteFile();
         assertTrue("file should exists", out.exists());
-        assertEquals("Hello World", IOConverter.toString(out));
+        assertEquals("Hello World", IOConverter.toString(out, null));
     }
 
     protected RouteBuilder createRouteBuilder() throws Exception {

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java?rev=888432&amp;r1=888431&amp;r2=888432&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
Tue Dec  8 15:14:56 2009
@@ -68,7 +68,8 @@
 
         assertMockEndpointsSatisfied();
 
-        Thread.sleep(200);
+        // give test some time to close file resources
+        Thread.sleep(2000);
 
         // now the lwd file should be deleted
         File local = new File("target/lwd/hello.txt").getAbsoluteFile();
@@ -77,7 +78,7 @@
         // and the out file should exists
         File out = new File("target/out/hello.txt").getAbsoluteFile();
         assertTrue("file should exists", out.exists());
-        assertEquals("Hello World", IOConverter.toString(out));
+        assertEquals("Hello World", IOConverter.toString(out, null));
     }
 
     protected RouteBuilder createRouteBuilder() throws Exception {




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888416 - in /camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr: JcrAuthTestBase.java JcrNodePathCreationTest.java JcrRouteTest.java</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091208144902.C9913238888C@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091208144902-C9913238888C@eris-apache-org%3e</id>
<updated>2009-12-08T14:49:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Tue Dec  8 14:49:01 2009
New Revision: 888416

URL: http://svn.apache.org/viewvc?rev=888416&amp;view=rev
Log:
Fixed unit test having problem on Windows deleting files for cleanup.

Modified:
    camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
    camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrNodePathCreationTest.java
    camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java

Modified: camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java?rev=888416&amp;r1=888415&amp;r2=888416&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
(original)
+++ camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
Tue Dec  8 14:49:01 2009
@@ -17,8 +17,6 @@
 package org.apache.camel.component.jcr;
 
 import java.io.File;
-import java.io.IOException;
-
 import javax.jcr.Repository;
 import javax.jcr.SimpleCredentials;
 import javax.naming.Context;
@@ -30,7 +28,6 @@
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.TransientRepository;
-import org.apache.jackrabbit.core.fs.local.FileUtil;
 import org.apache.jackrabbit.core.security.authorization.JackrabbitAccessControlList;
 import org.junit.Before;
 
@@ -49,14 +46,11 @@
 
     private Repository repository;
 
-    private void clean() throws IOException {
-        File[] files = {new File("target/repository_with_auth"),
-                        new File("derby.log") };
-        for (File file : files) {
-            if (file.exists()) {
-                FileUtil.delete(file);
-            }
-        }
+    @Override
+    @Before
+    public void setUp() throws Exception {
+        deleteDirectory("target/repository");
+        super.setUp();
     }
 
     @Override
@@ -106,11 +100,4 @@
         return repository;
     }
 
-    @Override
-    @Before
-    public void setUp() throws Exception {
-        clean();
-        super.setUp();
-    }
-
 }
\ No newline at end of file

Modified: camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrNodePathCreationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrNodePathCreationTest.java?rev=888416&amp;r1=888415&amp;r2=888416&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrNodePathCreationTest.java
(original)
+++ camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrNodePathCreationTest.java
Tue Dec  8 14:49:01 2009
@@ -16,9 +16,6 @@
  */
 package org.apache.camel.component.jcr;
 
-import java.io.File;
-import java.io.IOException;
-
 import javax.jcr.Node;
 import javax.jcr.Repository;
 import javax.jcr.Session;
@@ -29,7 +26,6 @@
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.jackrabbit.core.TransientRepository;
-import org.apache.jackrabbit.core.fs.local.FileUtil;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -40,20 +36,10 @@
     @Override
     @Before
     public void setUp() throws Exception {
-        clean();
+        deleteDirectory("target/repository");
         super.setUp();
     }
 
-    private void clean() throws IOException {
-        File[] files = {new File("target/repository"), new File("target/repository.xml"),
-                        new File("derby.log")};
-        for (File file : files) {
-            if (file.exists()) {
-                FileUtil.delete(file);
-            }
-        }
-    }
-    
     @Test
     public void testJcrNodePathCreation() throws Exception {
         Exchange exchange = createExchangeWithBody("&lt;body/&gt;");

Modified: camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java?rev=888416&amp;r1=888415&amp;r2=888416&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java
(original)
+++ camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java
Tue Dec  8 14:49:01 2009
@@ -16,9 +16,6 @@
  */
 package org.apache.camel.component.jcr;
 
-import java.io.File;
-import java.io.IOException;
-
 import javax.jcr.Node;
 import javax.jcr.Repository;
 import javax.jcr.Session;
@@ -29,7 +26,6 @@
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.jackrabbit.core.TransientRepository;
-import org.apache.jackrabbit.core.fs.local.FileUtil;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -40,20 +36,10 @@
     @Override
     @Before
     public void setUp() throws Exception {
-        clean();
+        deleteDirectory("target/repository");
         super.setUp();
     }
 
-    private void clean() throws IOException {
-        File[] files = {new File("target/repository"), new File("target/repository.xml"),
-                        new File("derby.log")};
-        for (File file : files) {
-            if (file.exists()) {
-                FileUtil.delete(file);
-            }
-        }
-    }
-
     @Test
     public void testJcrRoute() throws Exception {
         Exchange exchange = createExchangeWithBody("&lt;hello&gt;world!&lt;/hello&gt;");




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888384 - in /camel/trunk/examples/camel-example-etl: ./ src/main/java/org/apache/camel/example/etl/ src/main/resources/META-INF/ src/main/resources/META-INF/spring/ src/profiles/ src/profiles/openjpa/ src/profiles/openjpa/META-INF/ src/pro...</title>
<author><name>ningjiang@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091208130248.4B357238888C@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091208130248-4B357238888C@eris-apache-org%3e</id>
<updated>2009-12-08T13:02:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ningjiang
Date: Tue Dec  8 13:02:47 2009
New Revision: 888384

URL: http://svn.apache.org/viewvc?rev=888384&amp;view=rev
Log:
CAMEL-2267 Get camel-example-etl to work with OSGi 

Added:
    camel/trunk/examples/camel-example-etl/src/profiles/
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml 
 (with props)
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/
    camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
  (with props)
Modified:
    camel/trunk/examples/camel-example-etl/pom.xml
    camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
    camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/persistence.xml
    camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/spring/camel-context.xml

Modified: camel/trunk/examples/camel-example-etl/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/pom.xml?rev=888384&amp;r1=888383&amp;r2=888384&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/pom.xml (original)
+++ camel/trunk/examples/camel-example-etl/pom.xml Tue Dec  8 13:02:47 2009
@@ -1,139 +1,214 @@
 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
 
-&lt;!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
---&gt;
-
-&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
-
-  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
-
-  &lt;parent&gt;
-    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-    &lt;artifactId&gt;examples&lt;/artifactId&gt;
-    &lt;version&gt;2.2-SNAPSHOT&lt;/version&gt;
-  &lt;/parent&gt;
-
-  &lt;artifactId&gt;camel-example-etl&lt;/artifactId&gt;
-  &lt;packaging&gt;bundle&lt;/packaging&gt;
-  &lt;name&gt;Camel :: Example :: ETL&lt;/name&gt;
-  &lt;description&gt;An example showing how to use Camel as an Extract Transform and Load
(ETL) tool&lt;/description&gt;
-
-  &lt;properties&gt;
-     &lt;camel.osgi.export.pkg&gt;
-     	org.apache.camel.example.etl.*
+	&lt;!--
+		Licensed to the Apache Software Foundation (ASF) under one or more
+		contributor license agreements. See the NOTICE file distributed with
+		this work for additional information regarding copyright ownership.
+		The ASF licenses this file to You 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.
+	--&gt;
+
+&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
+
+	&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
+
+	&lt;parent&gt;
+		&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+		&lt;artifactId&gt;examples&lt;/artifactId&gt;
+		&lt;version&gt;2.2-SNAPSHOT&lt;/version&gt;
+	&lt;/parent&gt;
+
+	&lt;artifactId&gt;camel-example-etl&lt;/artifactId&gt;
+	&lt;packaging&gt;bundle&lt;/packaging&gt;
+	&lt;name&gt;Camel :: Example :: ETL&lt;/name&gt;
+	&lt;description&gt;An example showing how to use Camel as an Extract Transform and Load
(ETL) tool&lt;/description&gt;
+
+	&lt;properties&gt;
+		&lt;camel.osgi.export.pkg&gt;
+			org.apache.camel.example.etl.*
      &lt;/camel.osgi.export.pkg&gt;
-  &lt;/properties&gt;
-
-  &lt;dependencies&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-      &lt;artifactId&gt;camel-spring&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-      &lt;artifactId&gt;camel-jpa&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-      &lt;artifactId&gt;camel-jaxb&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-      &lt;artifactId&gt;camel-juel&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-
-    &lt;!-- lets use log4j --&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;commons-logging&lt;/groupId&gt;
-      &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;log4j&lt;/groupId&gt;
-      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-
-    &lt;!-- lets use hibernate by default --&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
-      &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
-      &lt;artifactId&gt;hibernate&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;hsqldb&lt;/groupId&gt;
-      &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
-      &lt;artifactId&gt;geronimo-jta_1.1_spec&lt;/artifactId&gt;
-    &lt;/dependency&gt;
-
-    &lt;!-- testing --&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;junit&lt;/groupId&gt;
-      &lt;artifactId&gt;junit&lt;/artifactId&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-  &lt;/dependencies&gt;
-
-  &lt;build&gt;
-    &lt;plugins&gt;
-
-      &lt;!-- Allows the example to be run via 'mvn camel:run' --&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-        &lt;artifactId&gt;camel-maven-plugin&lt;/artifactId&gt;
-        &lt;version&gt;${project.version}&lt;/version&gt;
-      &lt;/plugin&gt;
-
-      &lt;!-- Allows the example to be run via 'mvn compile exec:java' --&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
-        &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
-        &lt;configuration&gt;
-          &lt;mainClass&gt;org.apache.camel.example.etl.Main&lt;/mainClass&gt;
-          &lt;includePluginDependencies&gt;false&lt;/includePluginDependencies&gt;
-        &lt;/configuration&gt;
-      &lt;/plugin&gt;
-
-      &lt;plugin&gt;
-        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
-        &lt;configuration&gt;
-          &lt;childDelegation&gt;false&lt;/childDelegation&gt;
-          &lt;useFile&gt;true&lt;/useFile&gt;
-          &lt;excludes&gt;
-            &lt;exclude&gt;**/RunTest.*&lt;/exclude&gt;
-          &lt;/excludes&gt;
-        &lt;/configuration&gt;
-      &lt;/plugin&gt;
-
-    &lt;/plugins&gt;
-  &lt;/build&gt;
-  
-  &lt;reporting&gt;
-    &lt;plugins&gt;
-      &lt;!-- let's generate nice PNG / SVG diagrams from our routes --&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-        &lt;artifactId&gt;camel-maven-plugin&lt;/artifactId&gt;
-        &lt;version&gt;${project.version}&lt;/version&gt;
-      &lt;/plugin&gt;
-    &lt;/plugins&gt;
-  &lt;/reporting&gt;
+		&lt;camel.osgi.import.additional&gt;
+			org.hsqldb,org.hsqldb.util,org.hsqldb.jdbc,org.hibernate.ejb
+     &lt;/camel.osgi.import.additional&gt;
+		&lt;!-- to avoid us import bunch other package --&gt;
+		&lt;camel.osgi.dynamic&gt;
+			*
+     &lt;/camel.osgi.dynamic&gt;
+	&lt;/properties&gt;
+
+	&lt;dependencies&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+			&lt;artifactId&gt;camel-spring&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+			&lt;artifactId&gt;camel-jpa&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+			&lt;artifactId&gt;camel-jaxb&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+			&lt;artifactId&gt;camel-juel&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;org.springframework&lt;/groupId&gt;
+			&lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+
+		&lt;!-- lets use log4j --&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;commons-logging&lt;/groupId&gt;
+			&lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;log4j&lt;/groupId&gt;
+			&lt;artifactId&gt;log4j&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;hsqldb&lt;/groupId&gt;
+			&lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
+			&lt;artifactId&gt;geronimo-jta_1.1_spec&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;commons-dbcp&lt;/groupId&gt;
+			&lt;artifactId&gt;commons-dbcp&lt;/artifactId&gt;
+		&lt;/dependency&gt;
+
+		&lt;!-- testing --&gt;
+		&lt;dependency&gt;
+			&lt;groupId&gt;junit&lt;/groupId&gt;
+			&lt;artifactId&gt;junit&lt;/artifactId&gt;
+			&lt;scope&gt;test&lt;/scope&gt;
+		&lt;/dependency&gt;
+
+	&lt;/dependencies&gt;
+
+	&lt;build&gt;
+		&lt;plugins&gt;
+			&lt;!-- Allows the example to be run via 'mvn camel:run' --&gt;
+			&lt;plugin&gt;
+				&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+				&lt;artifactId&gt;camel-maven-plugin&lt;/artifactId&gt;
+				&lt;version&gt;${project.version}&lt;/version&gt;
+			&lt;/plugin&gt;
+
+			&lt;!-- Allows the example to be run via 'mvn compile exec:java' --&gt;
+			&lt;plugin&gt;
+				&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
+				&lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
+				&lt;configuration&gt;
+					&lt;mainClass&gt;org.apache.camel.example.etl.Main&lt;/mainClass&gt;
+					&lt;includePluginDependencies&gt;false&lt;/includePluginDependencies&gt;
+				&lt;/configuration&gt;
+			&lt;/plugin&gt;
+
+			&lt;plugin&gt;
+				&lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
+				&lt;configuration&gt;
+					&lt;childDelegation&gt;false&lt;/childDelegation&gt;
+					&lt;useFile&gt;true&lt;/useFile&gt;
+					&lt;excludes&gt;
+						&lt;exclude&gt;**/RunTest.*&lt;/exclude&gt;
+					&lt;/excludes&gt;
+				&lt;/configuration&gt;
+			&lt;/plugin&gt;
+
+		&lt;/plugins&gt;
+	&lt;/build&gt;
+
+	&lt;profiles&gt;
+		&lt;profile&gt;
+			&lt;id&gt;hibernate&lt;/id&gt;
+			&lt;activation&gt;
+				&lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
+			&lt;/activation&gt;
+			&lt;dependencies&gt;
+				&lt;dependency&gt;
+					&lt;groupId&gt;org.hibernate&lt;/groupId&gt;
+					&lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
+				&lt;/dependency&gt;
+				&lt;dependency&gt;
+					&lt;groupId&gt;org.hibernate&lt;/groupId&gt;
+					&lt;artifactId&gt;hibernate&lt;/artifactId&gt;
+				&lt;/dependency&gt;
+			&lt;/dependencies&gt;
+		&lt;/profile&gt;
+		&lt;profile&gt;
+			&lt;id&gt;openjpa&lt;/id&gt;
+			&lt;build&gt;
+				&lt;resources&gt;
+					&lt;resource&gt;
+						&lt;directory&gt;${basedir}/src/profiles/openjpa&lt;/directory&gt;
+					&lt;/resource&gt;
+					&lt;resource&gt;
+						&lt;directory&gt;${basedir}/src/main/resources&lt;/directory&gt;
+						&lt;excludes&gt;
+							&lt;exclude&gt;**/persistence.xml&lt;/exclude&gt;
+							&lt;exclude&gt;**/camel-context.xml&lt;/exclude&gt;
+						&lt;/excludes&gt;
+					&lt;/resource&gt;
+				&lt;/resources&gt;
+				&lt;!--  Will enhance classes as we run in a non J2EE 5 env --&gt;
+				&lt;plugins&gt;
+					&lt;plugin&gt;
+						&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
+						&lt;artifactId&gt;openjpa-maven-plugin&lt;/artifactId&gt;
+						&lt;executions&gt;
+							&lt;execution&gt;
+								&lt;id&gt;JPA Enhance&lt;/id&gt;
+								&lt;phase&gt;process-classes&lt;/phase&gt;
+								&lt;goals&gt;
+									&lt;goal&gt;enhance&lt;/goal&gt;
+								&lt;/goals&gt;
+							&lt;/execution&gt;
+						&lt;/executions&gt;
+						&lt;configuration&gt;
+							&lt;includes&gt;org/apache/camel/example/etl/*Entity.class&lt;/includes&gt;
+							&lt;toolProperties&gt;
+								&lt;property&gt;
+									&lt;name&gt;addDefaultConstructor&lt;/name&gt;
+									&lt;value&gt;true&lt;/value&gt;
+								&lt;/property&gt;
+								&lt;property&gt;
+									&lt;name&gt;enforcePropertyRestrictions&lt;/name&gt;
+									&lt;value&gt;true&lt;/value&gt;
+								&lt;/property&gt;
+							&lt;/toolProperties&gt;
+						&lt;/configuration&gt;
+					&lt;/plugin&gt;
+				&lt;/plugins&gt;
+			&lt;/build&gt;
+			&lt;dependencies&gt;
+				&lt;dependency&gt;
+					&lt;groupId&gt;org.apache.openjpa&lt;/groupId&gt;
+					&lt;artifactId&gt;openjpa-persistence-jdbc&lt;/artifactId&gt;
+				&lt;/dependency&gt;
+			&lt;/dependencies&gt;
+		&lt;/profile&gt;
+	&lt;/profiles&gt;
+	&lt;reporting&gt;
+		&lt;plugins&gt;
+			&lt;!-- let's generate nice PNG / SVG diagrams from our routes --&gt;
+			&lt;plugin&gt;
+				&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+				&lt;artifactId&gt;camel-maven-plugin&lt;/artifactId&gt;
+				&lt;version&gt;${project.version}&lt;/version&gt;
+			&lt;/plugin&gt;
+		&lt;/plugins&gt;
+	&lt;/reporting&gt;
 &lt;/project&gt;

Modified: camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java?rev=888384&amp;r1=888383&amp;r2=888384&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
(original)
+++ camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
Tue Dec  8 13:02:47 2009
@@ -64,7 +64,6 @@
         if (list.isEmpty()) {
             CustomerEntity answer = new CustomerEntity();
             answer.setUserName(user);
-            template.persist(answer);
             return answer;
         } else {
             return list.get(0);

Modified: camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/persistence.xml?rev=888384&amp;r1=888383&amp;r2=888384&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/persistence.xml (original)
+++ camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/persistence.xml Tue
Dec  8 13:02:47 2009
@@ -23,10 +23,6 @@
 
     &lt;properties&gt;
       &lt;property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/&gt;
-      &lt;property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/&gt;
-      &lt;property name="hibernate.connection.username" value="sa"/&gt;
-      &lt;property name="hibernate.connection.password" value=""/&gt;
-      &lt;property name="hibernate.connection.url" value="jdbc:hsqldb:mem:camel_etl"/&gt;
       &lt;property name="hibernate.hbm2ddl.auto" value="create"/&gt;
     &lt;/properties&gt;
 

Modified: camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/spring/camel-context.xml?rev=888384&amp;r1=888383&amp;r2=888384&amp;view=diff
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/spring/camel-context.xml
(original)
+++ camel/trunk/examples/camel-example-etl/src/main/resources/META-INF/spring/camel-context.xml
Tue Dec  8 13:02:47 2009
@@ -33,6 +33,10 @@
     &lt;package&gt;org.apache.camel.example.etl&lt;/package&gt;
   &lt;/camelContext&gt;
 
+   &lt;!--  Added for OSGI platform to allow --&gt;
+  &lt;bean id="jpa" class="org.apache.camel.component.jpa.JpaComponent"&gt;
+       &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
+  &lt;/bean&gt;
 
   &lt;bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate"&gt;
     &lt;property name="transactionManager"&gt;
@@ -46,19 +50,36 @@
     &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
   &lt;/bean&gt;
 
-  &lt;bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"&gt;
+   &lt;bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
     &lt;property name="persistenceUnitName" value="camel"/&gt;
+    &lt;property name="jpaVendorAdapter" ref="jpaAdapter"/&gt;
+    &lt;property name="dataSource" ref="dataSource" /&gt;
+  &lt;/bean&gt;
+  
+  &lt;bean id="jpaAdapter"
+        class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
+        &lt;property name="databasePlatform" value="org.hibernate.dialect.HSQLDialect" /&gt;
+  &lt;/bean&gt;
+  
+  &lt;!--  DataSource Definition --&gt;
+  &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt;
+        &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver" /&gt;
+        &lt;property name="url" value="jdbc:hsqldb:mem:camel_etl" /&gt;
+        &lt;property name="username" value="sa" /&gt;
+        &lt;property name="password" value="" /&gt;
   &lt;/bean&gt;
 
   &lt;!-- lets show a simple UI to browse the database --&gt;
+  &lt;!-- This bean will cause OSGi server exit , so we disable it here
   &lt;bean id="databaseExplorer" class="org.apache.camel.spring.util.MainRunner" lazy-init="false"&gt;
     &lt;property name="main" value="org.hsqldb.util.DatabaseManagerSwing"/&gt;
     &lt;property name="args"&gt;
       &lt;list&gt;
-        &lt;value&gt;--url&lt;/value&gt;
+        &lt;value&gt;url&lt;/value&gt;
         &lt;value&gt;jdbc:hsqldb:mem:camel_etl&lt;/value&gt;
       &lt;/list&gt;
     &lt;/property&gt;
     &lt;property name="delay" value="1000"/&gt;
   &lt;/bean&gt;
+   --&gt;
 &lt;/beans&gt;

Added: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml?rev=888384&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml (added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml Tue
Dec  8 13:02:47 2009
@@ -0,0 +1,44 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!--
+ Copyright 2006 The Apache Software Foundation.
+
+ 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.
+--&gt;
+&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             version="1.0"&gt;
+
+  &lt;persistence-unit name="camel" transaction-type="RESOURCE_LOCAL"&gt;
+    &lt;class&gt;org.apache.camel.example.etl.CustomerEntity&lt;/class&gt;
+    &lt;properties&gt;
+      &lt;property name="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:camel_etl"/&gt;
+      &lt;property name="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver"/&gt;
+      &lt;property name="openjpa.ConnectionUserName" value="sa" /&gt;
+	  &lt;property name="openjpa.ConnectionPassword" value="" /&gt;
+      &lt;property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/&gt;
+      &lt;property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"
/&gt;
+    &lt;/properties&gt;
+
+	&lt;!-- properties&gt;
+		&lt;property name="openjpa.ConnectionURL" value="jdbc:derby:target/derby;create=true" /&gt;
+		&lt;property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"
/&gt;
+		&lt;property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" /&gt;
+		&lt;property name="openjpa.Log"
+			value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE" /&gt;
+		&lt;property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"
/&gt;
+	&lt;/properties--&gt;
+      
+    
+
+  &lt;/persistence-unit&gt;
+&lt;/persistence&gt;

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml?rev=888384&amp;view=auto
==============================================================================
--- camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
(added)
+++ camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
Tue Dec  8 13:02:47 2009
@@ -0,0 +1,71 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+--&gt;
+
+&lt;!--
+
+  The default Application Context used by the org.apache.camel.spring.Main if there
+  is no /META-INF/sprint.xml
+
+ --&gt;
+
+&lt;beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"&gt;
+
+	&lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
+		&lt;package&gt;org.apache.camel.example.etl&lt;/package&gt;
+	&lt;/camelContext&gt;
+	
+	 &lt;!--  Added for OSGI platform to allow --&gt;
+    &lt;bean id="jpa" class="org.apache.camel.component.jpa.JpaComponent"&gt;
+       &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
+    &lt;/bean&gt;
+
+	&lt;bean id="transactionTemplate"
+		class="org.springframework.transaction.support.TransactionTemplate"&gt;
+		&lt;property name="transactionManager"&gt;
+			&lt;bean class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
+				&lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
+			&lt;/bean&gt;
+		&lt;/property&gt;
+	&lt;/bean&gt;
+
+	&lt;bean id="jpaTemplate" class="org.springframework.orm.jpa.JpaTemplate"&gt;
+		&lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
+	&lt;/bean&gt;
+
+	&lt;bean id="entityManagerFactory"
+		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"&gt;
+		&lt;property name="persistenceUnitName" value="camel" /&gt;
+	&lt;/bean&gt;
+
+
+  &lt;!-- lets show a simple UI to browse the database 
+  &lt;bean id="databaseExplorer" class="org.apache.camel.spring.util.MainRunner" lazy-init="false"&gt;
+    &lt;property name="main" value="org.hsqldb.util.DatabaseManagerSwing"/&gt;
+    &lt;property name="args"&gt;
+      &lt;list&gt;
+        &lt;value&gt;url&lt;/value&gt;
+        &lt;value&gt;jdbc:hsqldb:mem:camel_etl&lt;/value&gt;
+      &lt;/list&gt;
+    &lt;/property&gt;
+    &lt;property name="delay" value="1000"/&gt;
+  &lt;/bean--&gt;
+&lt;/beans&gt;

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/examples/camel-example-etl/src/profiles/openjpa/META-INF/spring/camel-context.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml




</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; SMPP</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c1702878779.1412.1260265380014.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c1702878779-1412-1260265380014-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T09:43:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/SMPP"&gt;SMPP&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h2&gt;&lt;a name="SMPP-SMPPComponent"&gt;&lt;/a&gt;SMPP Component&lt;/h2&gt;

&lt;p&gt;This component provides access to an SMSC (Short Message Service Center) over the
&lt;a href="http://smsforum.net/SMPP_v3_4_Issue1_2.zip" rel="nofollow"&gt;SMPP&lt;/a&gt; protocol
to send and receive SMS. The &lt;a href="http://code.google.com/p/jsmpp/" rel="nofollow"&gt;JSMPP&lt;/a&gt;
is used.&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Using Camel
2.2 onwards&lt;/b&gt;&lt;br /&gt;&lt;p&gt;This component is only available for Camel 2.2 or
newer.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="SMPP-URIformat"&gt;&lt;/a&gt;URI format&lt;/h3&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
smpp:&lt;span class="code-comment"&gt;//[username@]hostname[:port][?options]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If no &lt;b&gt;username&lt;/b&gt; is provided, then Camel will provide the default
value &lt;tt&gt;smppclient&lt;/tt&gt;.&lt;br/&gt;
If no &lt;b&gt;port&lt;/b&gt; number is provided, then Camel will provide the default value
&lt;tt&gt;2775&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;You can append query options to the URI in the following format, &lt;tt&gt;?option=value&amp;amp;option=value&amp;amp;...&lt;/tt&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a name="SMPP-URIOptions"&gt;&lt;/a&gt;URI Options&lt;/h3&gt;

&lt;div class="confluenceTableSmall"&gt;&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Name &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Default Value &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;password&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;password&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Specifies the password to use to log in to the SMSC. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;systemType&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;cp&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; This parameter is used to categorize the type of ESME (External
Short Message Entity) that is binding to the SMSC (max. 13 characters). &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;encoding&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ISO-8859-1&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the encoding scheme of the short message user data.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;enquireLinkTimer&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;5000&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the interval in milliseconds between the confidence
checks. The confidence check is used to test the communication path between an ESME and an
SMSC. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;transactionTimer&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;10000&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the maximum period of inactivity allowed after a transaction,
after which an SMPP entity may assume that the session is no longer active. This timer may
be active on either communicating SMPP entity (i.e. SMSC or ESME). &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;registeredDelivery&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;1&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Is used to request an SMSC delivery receipt and/or SME originated
acknowledgements. The following values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: No SMSC delivery receipt requested.&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: SMSC delivery receipt requested where final delivery outcome is success
or failure.&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: SMSC delivery receipt requested where the final delivery outcome is
delivery failure. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;serviceType&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CMT&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The service type parameter can be used to indicate the SMS
Application service associated with the message. The following generic service_types are defined:&lt;br
clear="all" /&gt;
&lt;tt&gt;CMT&lt;/tt&gt;: Cellular Messaging&lt;br clear="all" /&gt;
&lt;tt&gt;CPT&lt;/tt&gt;: Cellular Paging&lt;br clear="all" /&gt;
&lt;tt&gt;VMN&lt;/tt&gt;: Voice Mail Notification&lt;br clear="all" /&gt;
&lt;tt&gt;VMA&lt;/tt&gt;: Voice Mail Alerting&lt;br clear="all" /&gt;
&lt;tt&gt;WAP&lt;/tt&gt;: Wireless Application Protocol&lt;br clear="all" /&gt;
&lt;tt&gt;USSD&lt;/tt&gt;: Unstructured Supplementary Services Data &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;sourceAddr&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;1616&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the address of SME (Short Message Entity) which originated
this message. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;destAddr&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;1717&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the destination SME address. For mobile terminated
messages, this is the directory number of the recipient MS. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;sourceAddrTon&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;0&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the type of number (TON) to be used in the SME originator
address parameters. The following TON values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: International&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Network Specific&lt;br clear="all" /&gt;
&lt;tt&gt;4&lt;/tt&gt;: Subscriber Number&lt;br clear="all" /&gt;
&lt;tt&gt;5&lt;/tt&gt;: Alphanumeric&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Abbreviated &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;destAddrTon&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;0&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the type of number (TON) to be used in the SME destination
address parameters. The following TON values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: International&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Network Specific&lt;br clear="all" /&gt;
&lt;tt&gt;4&lt;/tt&gt;: Subscriber Number&lt;br clear="all" /&gt;
&lt;tt&gt;5&lt;/tt&gt;: Alphanumeric&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Abbreviated &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;sourceAddrNpi&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;0&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the numeric plan indicator (NPI) to be used in the
SME originator address parameters. The following NPI values are defined: &lt;br clear="all"
/&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: ISDN (E163/E164)&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Data (X.121)&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Telex (F.69)&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Land Mobile (E.212)&lt;br clear="all" /&gt;
&lt;tt&gt;8&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;9&lt;/tt&gt;: Private&lt;br clear="all" /&gt;
&lt;tt&gt;10&lt;/tt&gt;: ERMES&lt;br clear="all" /&gt;
&lt;tt&gt;13&lt;/tt&gt;: Internet (IP)&lt;br clear="all" /&gt;
&lt;tt&gt;18&lt;/tt&gt;: WAP Client Id (to be defined by WAP Forum) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;destAddrNpi&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;0&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the numeric plan indicator (NPI) to be used in the
SME destination address parameters. The following NPI values are defined: &lt;br clear="all"
/&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: ISDN (E163/E164)&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Data (X.121)&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Telex (F.69)&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Land Mobile (E.212)&lt;br clear="all" /&gt;
&lt;tt&gt;8&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;9&lt;/tt&gt;: Private&lt;br clear="all" /&gt;
&lt;tt&gt;10&lt;/tt&gt;: ERMES&lt;br clear="all" /&gt;
&lt;tt&gt;13&lt;/tt&gt;: Internet (IP)&lt;br clear="all" /&gt;
&lt;tt&gt;18&lt;/tt&gt;: WAP Client Id (to be defined by WAP Forum) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;priorityFlag&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;1&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Allows the originating SME to assign a priority level to the
short message. Four Priority Levels are supported:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Level 0 (lowest) priority&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: Level 1 priority&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Level 2 priority&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Level 3 (highest) priority &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;replaceIfPresentFlag&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;0&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Used to request the SMSC to replace a previously submitted
message, that is still pending delivery. The SMSC will replace an existing message provided
that the source address, destination address and service type match the same fields in the
new message. The following replace if present flag values are defined: &lt;br clear="all"
/&gt;
&lt;tt&gt;0&lt;/tt&gt;: Don't replace&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: Replace &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;typeOfNumber&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;0&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the type of number (TON) to be used in the SME. The
following TON values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: International&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Network Specific&lt;br clear="all" /&gt;
&lt;tt&gt;4&lt;/tt&gt;: Subscriber Number&lt;br clear="all" /&gt;
&lt;tt&gt;5&lt;/tt&gt;: Alphanumeric&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Abbreviated &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;numberingPlanIndicator&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;0&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the numeric plan indicator (NPI) to be used in the
SME. The following NPI values are defined: &lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: ISDN (E163/E164)&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Data (X.121)&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Telex (F.69)&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Land Mobile (E.212)&lt;br clear="all" /&gt;
&lt;tt&gt;8&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;9&lt;/tt&gt;: Private&lt;br clear="all" /&gt;
&lt;tt&gt;10&lt;/tt&gt;: ERMES&lt;br clear="all" /&gt;
&lt;tt&gt;13&lt;/tt&gt;: Internet (IP)&lt;br clear="all" /&gt;
&lt;tt&gt;18&lt;/tt&gt;: WAP Client Id (to be defined by WAP Forum) &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;You can have as many of these options as you like.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
smpp:&lt;span class="code-comment"&gt;//smppclient@localhost:2775?password=password&amp;amp;enquireLinkTimer=3000&amp;amp;transactionTimer=5000&amp;amp;systemType=consumer&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;h3&gt;&lt;a name="SMPP-MessageHeaders"&gt;&lt;/a&gt;Message Headers&lt;/h3&gt;

&lt;p&gt;The following message headers can be used to affect the behavior of the SMPP producer&lt;/p&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Header &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppDestAddr&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the destination SME address. For mobile terminated
messages, this is the directory number of the recipient MS. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppDestAddrTon&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the type of number (TON) to be used in the SME destination
address parameters. The following TON values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: International&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Network Specific&lt;br clear="all" /&gt;
&lt;tt&gt;4&lt;/tt&gt;: Subscriber Number&lt;br clear="all" /&gt;
&lt;tt&gt;5&lt;/tt&gt;: Alphanumeric&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Abbreviated &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppDestAddrNpi&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the numeric plan indicator (NPI) to be used in the
SME destination address parameters. The following NPI values are defined: &lt;br clear="all"
/&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: ISDN (E163/E164)&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Data (X.121)&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Telex (F.69)&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Land Mobile (E.212)&lt;br clear="all" /&gt;
&lt;tt&gt;8&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;9&lt;/tt&gt;: Private&lt;br clear="all" /&gt;
&lt;tt&gt;10&lt;/tt&gt;: ERMES&lt;br clear="all" /&gt;
&lt;tt&gt;13&lt;/tt&gt;: Internet (IP)&lt;br clear="all" /&gt;
&lt;tt&gt;18&lt;/tt&gt;: WAP Client Id (to be defined by WAP Forum) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSourceAddr&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the address of SME (Short Message Entity) which originated
this message. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSourceAddrTon&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the type of number (TON) to be used in the SME originator
address parameters. The following TON values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: International&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Network Specific&lt;br clear="all" /&gt;
&lt;tt&gt;4&lt;/tt&gt;: Subscriber Number&lt;br clear="all" /&gt;
&lt;tt&gt;5&lt;/tt&gt;: Alphanumeric&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Abbreviated &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSourceAddrNpi&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Defines the numeric plan indicator (NPI) to be used in the
SME originator address parameters. The following NPI values are defined: &lt;br clear="all"
/&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: ISDN (E163/E164)&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Data (X.121)&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Telex (F.69)&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Land Mobile (E.212)&lt;br clear="all" /&gt;
&lt;tt&gt;8&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;9&lt;/tt&gt;: Private&lt;br clear="all" /&gt;
&lt;tt&gt;10&lt;/tt&gt;: ERMES&lt;br clear="all" /&gt;
&lt;tt&gt;13&lt;/tt&gt;: Internet (IP)&lt;br clear="all" /&gt;
&lt;tt&gt;18&lt;/tt&gt;: WAP Client Id (to be defined by WAP Forum) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppServiceType&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The service type parameter can be used to indicate the SMS
Application service associated with the message. The following generic service_types are defined:&lt;br
clear="all" /&gt;
&lt;tt&gt;CMT&lt;/tt&gt;: Cellular Messaging&lt;br clear="all" /&gt;
&lt;tt&gt;CPT&lt;/tt&gt;: Cellular Paging&lt;br clear="all" /&gt;
&lt;tt&gt;VMN&lt;/tt&gt;: Voice Mail Notification&lt;br clear="all" /&gt;
&lt;tt&gt;VMA&lt;/tt&gt;: Voice Mail Alerting&lt;br clear="all" /&gt;
&lt;tt&gt;WAP&lt;/tt&gt;: Wireless Application Protocol&lt;br clear="all" /&gt;
&lt;tt&gt;USSD&lt;/tt&gt;: Unstructured Supplementary Services Data &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppRegisteredDelivery&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Is used to request an SMSC delivery receipt and/or SME originated
acknowledgements. The following values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: No SMSC delivery receipt requested.&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: SMSC delivery receipt requested where final delivery outcome is success
or failure.&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: SMSC delivery receipt requested where the final delivery outcome is
delivery failure. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppPriorityFlag&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Allows the originating SME to assign a priority level to the
short message. Four Priority Levels are supported:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Level 0 (lowest) priority&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: Level 1 priority&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Level 2 priority&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Level 3 (highest) priority &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppScheduleDeliveryTime&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; This parameter specifies the scheduled time at which the message
delivery should be first attempted. It defines either the absolute date and time or relative
time from the current SMSC time at which delivery of this message will be attempted by the
SMSC. It can be specified in either absolute time format or relative time format. The encoding
of a time	format is specified in chapter 7.1.1. in the smpp specification v3.4. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppValidityPeriod&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The validity period parameter indicates the SMSC expiration
time, after which the message should be discarded if not delivered to the destination. It
can be defined in absolute time format or relative time format. The encoding of absolute and
relative time format is specified in chapter 7.1.1 in the smpp specification v3.4. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppReplaceIfPresentFlag&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The replace if present flag parameter is used to request the
SMSC to replace a previously submitted message, that is still pending delivery. The SMSC will
replace an existing message provided that the source address, destination address and service
type match the same fields in the new message. The following values are defined: &lt;br clear="all"
/&gt;
&lt;tt&gt;0&lt;/tt&gt;: Don't replace&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: Replace &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;The following message headers are used by the SMPP producer to set the response from
the SMSC in the message header&lt;/p&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Header &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppId&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; the id to identify the submitted short message for later use
(delivery receipt, query sm, cancel sm, replace sm). &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;The following message headers are used by the SMPP consumer to set the request data
from the SMSC in the message header&lt;/p&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Header &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSequenceNumber&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for alert notification and deliver sm&lt;/b&gt;:
A sequence number allows a response PDU to be correlated with a request PDU. The associated
SMPP response PDU must preserve this field. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppCommandId&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for alert notification and deliver sm&lt;/b&gt;:
The command id field identifies the particular SMPP PDU. For the complete list of defined
values see chapter 5.1.2.1 in the smpp specification v3.4. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSourceAddr&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for alert notification and deliver sm&lt;/b&gt;:
Defines the address of SME (Short Message Entity) which originated this message. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSourceAddrNpi&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for alert notification&lt;/b&gt;: Defines the
numeric plan indicator (NPI) to be used in the SME originator address parameters. The following
NPI values are defined: &lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: ISDN (E163/E164)&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Data (X.121)&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Telex (F.69)&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Land Mobile (E.212)&lt;br clear="all" /&gt;
&lt;tt&gt;8&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;9&lt;/tt&gt;: Private&lt;br clear="all" /&gt;
&lt;tt&gt;10&lt;/tt&gt;: ERMES&lt;br clear="all" /&gt;
&lt;tt&gt;13&lt;/tt&gt;: Internet (IP)&lt;br clear="all" /&gt;
&lt;tt&gt;18&lt;/tt&gt;: WAP Client Id (to be defined by WAP Forum) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSourceAddrTon&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for alert notification&lt;/b&gt;: Defines the
type of number (TON) to be used in the SME originator address parameters. The following TON
values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: International&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Network Specific&lt;br clear="all" /&gt;
&lt;tt&gt;4&lt;/tt&gt;: Subscriber Number&lt;br clear="all" /&gt;
&lt;tt&gt;5&lt;/tt&gt;: Alphanumeric&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Abbreviated &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppEsmeAddr&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for alert notification&lt;/b&gt;: Defines the
destination ESME address. For mobile terminated messages, this is the directory number of
the recipient MS. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppEsmeAddrNpi&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for alert notification&lt;/b&gt;: Defines the
numeric plan indicator (NPI) to be used in the ESME originator address parameters. The following
NPI values are defined: &lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: ISDN (E163/E164)&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: Data (X.121)&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Telex (F.69)&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Land Mobile (E.212)&lt;br clear="all" /&gt;
&lt;tt&gt;8&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;9&lt;/tt&gt;: Private&lt;br clear="all" /&gt;
&lt;tt&gt;10&lt;/tt&gt;: ERMES&lt;br clear="all" /&gt;
&lt;tt&gt;13&lt;/tt&gt;: Internet (IP)&lt;br clear="all" /&gt;
&lt;tt&gt;18&lt;/tt&gt;: WAP Client Id (to be defined by WAP Forum) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppEsmeAddrTon&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for alert notification&lt;/b&gt;: Defines the
type of number (TON) to be used in the ESME originator address parameters. The following TON
values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;0&lt;/tt&gt;: Unknown&lt;br clear="all" /&gt;
&lt;tt&gt;1&lt;/tt&gt;: International&lt;br clear="all" /&gt;
&lt;tt&gt;2&lt;/tt&gt;: National&lt;br clear="all" /&gt;
&lt;tt&gt;3&lt;/tt&gt;: Network Specific&lt;br clear="all" /&gt;
&lt;tt&gt;4&lt;/tt&gt;: Subscriber Number&lt;br clear="all" /&gt;
&lt;tt&gt;5&lt;/tt&gt;: Alphanumeric&lt;br clear="all" /&gt;
&lt;tt&gt;6&lt;/tt&gt;: Abbreviated &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppId&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for smsc delivery receipt&lt;/b&gt;: The message
ID allocated to the message by the SMSC when originally submitted. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppDelivered&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for smsc delivery receipt&lt;/b&gt;: Number
of short messages delivered. This is only relevant where the original message was submitted
to a distribution list.The value is padded with leading zeros if necessary. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppDoneDate&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for smsc delivery receipt&lt;/b&gt;: The time
and date at which the short message reached it's final state. The format is as follows: YYMMDDhhmm.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppStatus&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for smsc delivery receipt&lt;/b&gt;: The final
status of the message. The following values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;DELIVRD&lt;/tt&gt;: Message is delivered to destination&lt;br clear="all" /&gt;
&lt;tt&gt;EXPIRED&lt;/tt&gt;: Message validity period has expired.&lt;br clear="all" /&gt;
&lt;tt&gt;DELETED&lt;/tt&gt;: Message has been deleted.&lt;br clear="all" /&gt;
&lt;tt&gt;UNDELIV&lt;/tt&gt;: Message is undeliverable&lt;br clear="all" /&gt;
&lt;tt&gt;ACCEPTD&lt;/tt&gt;: Message is in accepted state (i.e. has been manually read on
behalf of the subscriber by customer service)&lt;br clear="all" /&gt;
&lt;tt&gt;UNKNOWN&lt;/tt&gt;: Message is in invalid state&lt;br clear="all" /&gt;
&lt;tt&gt;REJECTD&lt;/tt&gt;: Message is in a rejected state &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppError&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for smsc delivery receipt&lt;/b&gt;: Where appropriate
this may hold a Network specific error code or an SMSC error code for the attempted delivery
of the message. These errors are Network or SMSC specific and are not included here. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSubmitDate&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for smsc delivery receipt&lt;/b&gt;: The time
and date at which the short message was submitted. In the case of a message which has been
replaced, this is the date that the original message was replaced. The format is as follows:
YYMMDDhhmm. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppSubmitted&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for smsc delivery receipt&lt;/b&gt;: Number
of short messages originally submitted. This is only relevant when the original message was
submitted to a distribution list.The value is padded with leading zeros if necessary. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppDestAddr&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for deliver sm&lt;/b&gt;: Defines the destination
SME address. For mobile terminated messages, this is the directory number of the recipient
MS. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppScheduleDeliveryTime&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for deliver sm&lt;/b&gt;: This parameter specifies
the scheduled time at which the message delivery should be first attempted. It defines either
the absolute date and time or relative time from the current SMSC time at which delivery of
this message will be attempted by the SMSC. It can be specified in either absolute time format
or relative time format. The encoding of a time	format is specified in Section 7.1.1. in the
smpp specification v3.4. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelSmppValidityPeriod&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;only for deliver sm&lt;/b&gt;: The validity period
parameter indicates the SMSC expiration time, after which the message should be discarded
if not delivered to the destination. It can be defined in absolute time format or relative
time format. The encoding of absolute and relative time format is specified in Section 7.1.1
in the smpp specification v3.4. &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;


&lt;div class='panelMacro'&gt;&lt;table class='tipMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/check.gif" width="16" height="16"
align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;JSMPP library&lt;/b&gt;&lt;br
/&gt;&lt;p&gt;See the documentation of the &lt;a href="http://code.google.com/p/jsmpp/" rel="nofollow"&gt;JSMPP
Library&lt;/a&gt; for more details about the underlying library.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;


&lt;h3&gt;&lt;a name="SMPP-Samples"&gt;&lt;/a&gt;Samples&lt;/h3&gt;

&lt;p&gt;A route which sends an SMS using the Java DSL:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"direct:start"&lt;/span&gt;)
  .to(&lt;span class="code-quote"&gt;"smpp:&lt;span class="code-comment"&gt;//smppclient@localhost:2775?password=password&amp;amp;enquireLinkTimer=3000&amp;amp;transactionTimer=5000&amp;amp;systemType=producer"&lt;/span&gt;);&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A route which sends an SMS using the Spring XML DSL:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
&lt;span class="code-tag"&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"direct:start"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"smpp://smppclient@localhost:2775?password=password&amp;amp;amp;enquireLinkTimer=3000&amp;amp;amp;transactionTimer=5000&amp;amp;amp;systemType=producer"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A route which receives an SMS using the Java DSL:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"smpp:&lt;span class="code-comment"&gt;//smppclient@localhost:2775?password=password&amp;amp;enquireLinkTimer=3000&amp;amp;transactionTimer=5000&amp;amp;systemType=consumer"&lt;/span&gt;)
&lt;/span&gt;  .to(&lt;span class="code-quote"&gt;"bean:foo"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A route which receives an SMS using the Spring XML DSL:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
  &lt;span class="code-tag"&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
     &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"smpp://smppclient@localhost:2775?password=password&amp;amp;amp;enquireLinkTimer=3000&amp;amp;amp;transactionTimer=5000&amp;amp;amp;systemType=consumer"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"bean:foo"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class='panelMacro'&gt;&lt;table class='tipMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/check.gif" width="16" height="16"
align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;SMSC simulator&lt;/b&gt;&lt;br
/&gt;&lt;p&gt;If you need an SMSC simulator for your test, you can use the simulator provided
by &lt;a href="http://opensmpp.logica.com/CommonPart/Download/download2.html#simulator" rel="nofollow"&gt;Logica&lt;/a&gt;.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="SMPP-Debuglogging"&gt;&lt;/a&gt;Debug logging&lt;/h3&gt;

&lt;p&gt;This component has log level &lt;b&gt;DEBUG&lt;/b&gt;, which can be helpful in debugging
problems. If you use log4j, you can add the following line to your configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
log4j.logger.org.apache.camel.component.smpp=DEBUG
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;h3&gt;&lt;a name="SMPP-SeeAlso"&gt;&lt;/a&gt;See Also&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel"&gt;Configuring
Camel&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Component" title="Component"&gt;Component&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Endpoint" title="Endpoint"&gt;Endpoint&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started"&gt;Getting
Started&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/SMPP"&gt;View Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9012014&amp;revisedVersion=3&amp;originalVersion=2"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/SMPP?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Component List</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c208484727.1410.1260265320017.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c208484727-1410-1260265320017-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T09:42:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Component+List"&gt;Component
List&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Component / ArtifactId / URI &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/ActiveMQ" title="ActiveMQ"&gt;ActiveMQ&lt;/a&gt;
/ activemq-camel
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
activemq:[topic:]destinationName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For JMS Messaging with &lt;a href="http://activemq.apache.org/"
title="The most popular and powerful open source message broker" rel="nofollow"&gt;Apache
ActiveMQ&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/ActiveMQ+Journal" title="ActiveMQ
Journal"&gt;ActiveMQ Journal&lt;/a&gt; / activemq-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
activemq.journal:directory-on-filesystem
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Uses ActiveMQ's fast disk journaling implementation to store
message bodies in a rolling log file &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/AMQP" title="AMQP"&gt;AMQP&lt;/a&gt;
/ camel-amqp
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
amqp:[topic:]destinationName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For Messaging with &lt;a href="http://www.amqp.org/" rel="nofollow"&gt;AMQP
protocol&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Atom" title="Atom"&gt;Atom&lt;/a&gt;
/ camel-atom
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
atom:uri
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with &lt;a href="http://incubator.apache.org/abdera/"
rel="nofollow"&gt;Apache Abdera&lt;/a&gt; for atom integration, such as consuming an atom
feed. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Bean" title="Bean"&gt;Bean&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
bean:beanName[?method=someMethod]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Uses the &lt;a href="/confluence/display/CAMEL/Bean+Binding"
title="Bean Binding"&gt;Bean Binding&lt;/a&gt; to bind message exchanges to beans in the &lt;a
href="/confluence/display/CAMEL/Registry" title="Registry"&gt;Registry&lt;/a&gt;. Is also
used for exposing and invoking POJO (Plain Old Java Objects). &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Browse" title="Browse"&gt;Browse&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
browse:someName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Provdes a simple &lt;a href="/confluence/display/CAMEL/BrowsableEndpoint"
title="BrowsableEndpoint"&gt;BrowsableEndpoint&lt;/a&gt; which can be useful for testing,
visualisation tools or debugging. The exchanges sent to the endpoint are all available to
be browsed. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Cache" title="Cache"&gt;Cache&lt;/a&gt;
/ camel-cache
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
cache://cachename[?options]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The cache component facilitates creation of caching endpoints
and processors using &lt;a href="http://ehcache.org/" rel="nofollow"&gt;EHCache&lt;/a&gt;
as the cache implementation. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Cometd" title="Cometd"&gt;Cometd&lt;/a&gt;
/ camel-cometd
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
cometd://host:port/channelname
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Used to deliver messages using the &lt;a href="http://docs.codehaus.org/display/JETTY/Cometd+(aka+Bayeux)"
rel="nofollow"&gt;jetty cometd implementation&lt;/a&gt; of the &lt;a href="http://svn.xantus.org/shortbus/trunk/bayeux/bayeux.html"
rel="nofollow"&gt;bayeux protocol&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/CXF" title="CXF"&gt;CXF&lt;/a&gt;
/ camel-cxf
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
cxf:address[?serviceClass=...]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with &lt;a href="http://apache.org/cxf/" rel="nofollow"&gt;Apache
CXF&lt;/a&gt; for web services integration &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/CXFRS" title="CXFRS"&gt;CXFRS&lt;/a&gt;
/ camel-cxf
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
cxfrs:address[?resourcesClasses=...]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with &lt;a href="http://apache.org/cxf/" rel="nofollow"&gt;Apache
CXF&lt;/a&gt; for REST services integration &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/DataSet" title="DataSet"&gt;DataSet&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
dataset:name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For load &amp;amp; soak testing the &lt;a href="http://camel.apache.org/maven/camel-core/apidocs/org/apache/camel/component/dataset/DataSet.html"
rel="nofollow"&gt;DataSet&lt;/a&gt; provides a way to create huge numbers of messages for
sending to &lt;a href="/confluence/display/CAMEL/Components" title="Components"&gt;Components&lt;/a&gt;
or asserting that they are consumed correctly &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Direct" title="Direct"&gt;Direct&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
direct:name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Synchronous call to another endpoint &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Esper" title="Esper"&gt;Esper&lt;/a&gt;
/ camel-esper in &lt;a href="http://code.google.com/p/camel-extra/" rel="nofollow"&gt;camel-extra&lt;/a&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
esper:name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with the &lt;a href="http://esper.codehaus.org" rel="nofollow"&gt;Esper
Library&lt;/a&gt; for Event Stream Processing &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Event" title="Event"&gt;Event&lt;/a&gt;
/ camel-spring
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
event://default
spring-event://default
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with Spring ApplicationEvents &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/File2" title="File2"&gt;File&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
file://nameOfFileOrDirectory
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Sending messages to a file or polling a file or directory.
&lt;b&gt;Camel 1.x use this link &lt;a href="/confluence/display/CAMEL/File" title="File"&gt;File&lt;/a&gt;&lt;/b&gt;.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Flatpack" title="Flatpack"&gt;Flatpack&lt;/a&gt;
/ camel-flatpack
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
flatpack:[fixed|delim]:configFile
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Processing fixed width or delimited files or messages using
the &lt;a href="http://flatpack.sourceforge.net" rel="nofollow"&gt;FlatPack library&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Freemarker" title="Freemarker"&gt;Freemarker&lt;/a&gt;
/ camel-freemarker
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
freemarker:someTemplateResource
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Generates a response using a &lt;a href="http://freemarker.org/"
rel="nofollow"&gt;Freemarker&lt;/a&gt; template &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP&lt;/a&gt;
/ camel-ftp
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
ftp://host[:port]/fileName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Sending and receiving files over FTP. &lt;b&gt;Camel 1.x use
this link &lt;a href="/confluence/display/CAMEL/FTP" title="FTP"&gt;FTP&lt;/a&gt;&lt;/b&gt;.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTPS&lt;/a&gt;
/ camel-ftp
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
ftps://host[:port]/fileName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Sending and receiving files over FTP Secure (TLS and SSL).
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt;&lt;a href="/confluence/display/CAMEL/ghttp" title="ghttp"&gt;GHttp&lt;/a&gt;
/ &lt;a href="/confluence/display/CAMEL/GAE" title="GAE"&gt;camel-gae&lt;/a&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
ghttp://hostname[:port][/path][?options]
ghttp:///path[?options]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class='confluenceTd'&gt; Provides connectivity to the &lt;a href="http://code.google.com/appengine/docs/java/urlfetch/"
rel="nofollow"&gt;URL fetch service&lt;/a&gt; of Google App Engine but can also be used to
receive messages from servlets. See also &lt;a href="/confluence/display/CAMEL/GAE" title="GAE"&gt;Camel
Components for Google App Engine&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt;&lt;a href="/confluence/display/CAMEL/gtask" title="gtask"&gt;GTask&lt;/a&gt;
/ &lt;a href="/confluence/display/CAMEL/GAE" title="GAE"&gt;camel-gae&lt;/a&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
gtask://queue-name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class='confluenceTd'&gt; supports asynchronous message processing on Google App Engine
by using the &lt;a href="http://code.google.com/appengine/docs/java/taskqueue/" rel="nofollow"&gt;task
queueing service&lt;/a&gt; as message queue. See also &lt;a href="/confluence/display/CAMEL/GAE"
title="GAE"&gt;Camel Components for Google App Engine&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt;&lt;a href="/confluence/display/CAMEL/gmail" title="gmail"&gt;GMail&lt;/a&gt;
/ &lt;a href="/confluence/display/CAMEL/GAE" title="GAE"&gt;camel-gae&lt;/a&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
gmail://user@gmail.com[?options]
gmail://user@googlemail.com[?options]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;
&lt;td class='confluenceTd'&gt; Supports sending of emails via the &lt;a href="http://code.google.com/appengine/docs/java/mail/"
rel="nofollow"&gt;mail service&lt;/a&gt; of Google App Engine. See also &lt;a href="/confluence/display/CAMEL/GAE"
title="GAE"&gt;Camel Components for Google App Engine&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Hibernate" title="Hibernate"&gt;Hibernate&lt;/a&gt;
/ camel-hibernate in &lt;a href="http://code.google.com/p/camel-extra/" rel="nofollow"&gt;camel-extra&lt;/a&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
hibernate://entityName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For using a database as a queue via the &lt;a href="http://www.hibernate.org/"
rel="nofollow"&gt;Hibernate&lt;/a&gt; library &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/HL7" title="HL7"&gt;HL7&lt;/a&gt;
/ camel-hl7
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
mina:tcp://hostname[:port]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For working with the HL7 MLLP protocol and the HL7 model using
the &lt;a href="http://hl7api.sourceforge.net" rel="nofollow"&gt;HAPI library&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/HTTP" title="HTTP"&gt;HTTP&lt;/a&gt;
/ camel-http
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
http://hostname[:port]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For calling out to external HTTP servers &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/iBATIS" title="iBATIS"&gt;iBATIS&lt;/a&gt;
/ camel-ibatis
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
ibatis://sqlOperationName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Performs a query, poll, insert, update or delete in a relational
database using &lt;a href="http://ibatis.apache.org/" rel="nofollow"&gt;Apache iBATIS&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Mail" title="Mail"&gt;IMap&lt;/a&gt;
/ camel-mail
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
imap://hostname[:port]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Receiving email using IMap &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/IRC" title="IRC"&gt;IRC&lt;/a&gt;
/ camel-irc
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
irc:host[:port]/#room
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For IRC communication &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/JavaSpace" title="JavaSpace"&gt;JavaSpace&lt;/a&gt;
/ camel-javaspace
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
javaspace:jini://host?spaceName=mySpace?...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Sending and receiving messages through &lt;a href="http://java.sun.com/products/jini/2.1/doc/specs/html/js-spec.html"
rel="nofollow"&gt;JavaSpace&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/JBI" title="JBI"&gt;JBI&lt;/a&gt;
/ servicemix-camel
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
jbi:serviceName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For JBI integration such as working with &lt;a href="http://servicemix.apache.org"
rel="nofollow"&gt;Apache ServiceMix&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/JCR" title="JCR"&gt;JCR&lt;/a&gt;
/ camel-jcr
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
jcr://user:password@repository/path/to/node
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Storing a message in a JCR (JSR-170) compliant repository
like &lt;a href="http://jackrabbit.apache.org" rel="nofollow"&gt;Apache Jackrabbit &lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/JDBC" title="JDBC"&gt;JDBC&lt;/a&gt;
/ camel-jdbc
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
jdbc:dataSourceName?options
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For performing JDBC queries and operations &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Jetty" title="Jetty"&gt;Jetty&lt;/a&gt;
/ camel-jetty
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
jetty:url
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For exposing services over HTTP &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/JMS" title="JMS"&gt;JMS&lt;/a&gt;
/ camel-jms
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
jms:[topic:]destinationName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with JMS providers &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/JPA" title="JPA"&gt;JPA&lt;/a&gt;
/ camel-jpa
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
jpa://entityName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For using a database as a queue via the JPA specification
for working with &lt;a href="http://openjpa.apache.org/" rel="nofollow"&gt;OpenJPA&lt;/a&gt;,
&lt;a href="http://www.hibernate.org/" rel="nofollow"&gt;Hibernate&lt;/a&gt; or TopLink &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/JT400" title="JT400"&gt;JT/400
&lt;/a&gt; / camel-jt400
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
jt400://user:pwd@system/&lt;span class="code-tag"&gt;&amp;lt;path_to_dtaq&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For integrating with data queues on an AS/400 (aka System
i, IBM i, i5, ...) system &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/LDAP" title="LDAP"&gt;LDAP&lt;/a&gt;
/ camel-ldap
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
ldap:host[:port]?base=...[&amp;amp;scope=&lt;span class="code-tag"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Performing searches on LDAP servers (&amp;lt;scope&amp;gt;
must be one of object&amp;#124;onelevel&amp;#124;subtree) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Log" title="Log"&gt;Log&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
log:loggingCategory[?level=ERROR]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Uses Jakarta Commons Logging to log the message exchange to
some underlying logging system like log4j &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Mail" title="Mail"&gt;Mail&lt;/a&gt;
/ camel-mail
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
mail://user-info@host:port
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Sending and receiving email &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;MINA&lt;/a&gt;
/ camel-mina
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
[tcp|udp|multicast]:host[:port]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with &lt;a href="http://mina.apache.org/" rel="nofollow"&gt;Apache
MINA&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Mock" title="Mock"&gt;Mock&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
mock:name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For testing routes and mediation rules using mocks &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/MSV" title="MSV"&gt;MSV&lt;/a&gt;
/ camel-msv
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
msv:someLocalOrRemoteResource
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Validates the payload of a message using the &lt;a href="https://msv.dev.java.net/"
rel="nofollow"&gt;MSV Library&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;Multicast&lt;/a&gt;
/ camel-mina
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
multicast://host:port
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with TCP protocols using &lt;a href="http://mina.apache.org/"
rel="nofollow"&gt;Apache MINA&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/NMR" title="NMR"&gt;NMR&lt;/a&gt;
/ servicemix-nmr
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
nmr://serviceName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Integration with the Normalized Message Router BUS in &lt;a
href="http://servicemix.apache.org/SMX4NMR/index.html" rel="nofollow"&gt;ServiceMix 4.x&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Mail" title="Mail"&gt;POP&lt;/a&gt;
/ camel-mail
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
pop3://user-info@host:port
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Receiving email using POP3 and JavaMail &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Printer" title="Printer"&gt;Printer&lt;/a&gt;
/ camel-printer
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
lpr://host:port/path/to/printer[?options]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The printer component facilitates creation of printer endpoints
to local, remote and wireless printers. The endpoints provide the ability to print camel directed
payloads when utilized on camel routes. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Quartz" title="Quartz"&gt;Quartz&lt;/a&gt;
/ camel-quartz
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
quartz://groupName/timerName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Provides a scheduled delivery of messages using the &lt;a
href="http://www.opensymphony.com/quartz/" rel="nofollow"&gt;Quartz scheduler&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Quickfix" title="Quickfix"&gt;Quickfix&lt;/a&gt;
/ camel-quickfix
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
quickfix-server:config file
quickfix-client:config-file
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Implementation of the QuickFix for Java engine which allow
to send/receive &lt;a href="http://www.fixprotocol.org" rel="nofollow"&gt;FIX&lt;/a&gt; messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Ref" title="Ref"&gt;Ref&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
ref:name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Component for lookup of existing endpoints bound in the &lt;a
href="/confluence/display/CAMEL/Registry" title="Registry"&gt;Registry&lt;/a&gt;. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Restlet" title="Restlet"&gt;Restlet&lt;/a&gt;
/ camel-restlet
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
restlet:restletUrl[?options]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Component for consuming and producing Restful resources using
&lt;a href="http://www.restlet.org" rel="nofollow"&gt;Restlet&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/RMI" title="RMI"&gt;RMI&lt;/a&gt;
/ camel-rmi
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
rmi://host[:port]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with RMI &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Jing" title="Jing"&gt;RNC&lt;/a&gt;
/ camel-jing
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
rnc:/relativeOrAbsoluteUri
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Validates the payload of a message using &lt;a href="http://relaxng.org/compact-tutorial-20030326.html"
rel="nofollow"&gt;RelaxNG Compact Syntax&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Jing" title="Jing"&gt;RNG&lt;/a&gt;
/ camel-jing
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
rng:/relativeOrAbsoluteUri
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Validates the payload of a message using &lt;a href="http://relaxng.org/"
rel="nofollow"&gt;RelaxNG&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/RSS" title="RSS"&gt;RSS&lt;/a&gt;
/ camel-rss
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
rss:uri
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with &lt;a href="https://rome.dev.java.net" rel="nofollow"&gt;ROME&lt;/a&gt;
for RSS integration, such as consuming an RSS feed. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/SEDA" title="SEDA"&gt;SEDA&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
seda:name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Asynchronous call to another endpoint in the same Camel Context
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/SERVLET" title="SERVLET"&gt;SERVLET&lt;/a&gt;
/ camel-servlet
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
servlet:uri
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For exposing services over HTTP through the servlet which
is deployed into the Web container. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;SFTP&lt;/a&gt;
/ camel-ftp
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
sftp://host[:port]/fileName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Sending and receiving files over SFTP (FTP over SSH). &lt;b&gt;Camel
1.x use this link &lt;a href="/confluence/display/CAMEL/FTP" title="FTP"&gt;FTP&lt;/a&gt;&lt;/b&gt;.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Smooks" title="Smooks"&gt;Smooks&lt;/a&gt;
/ camel-smooks in &lt;a href="http://code.google.com/p/camel-extra/" rel="nofollow"&gt;camel-extra&lt;/a&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
unmarshal(edi)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For working with EDI parsing using the &lt;a href="http://milyn.codehaus.org/Smooks"
rel="nofollow"&gt;Smooks library&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Mail" title="Mail"&gt;SMTP&lt;/a&gt;
/ camel-mail
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
smtp://user-info@host[:port]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Sending email using SMTP and JavaMail &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/SMPP" title="SMPP"&gt;SMPP&lt;/a&gt;
/ camel-smpp
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
smpp://user-info@host[:port]?options
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To send and receive SMS using Short Messaging Service Center
using the &lt;a href="http://code.google.com/p/jsmpp/" rel="nofollow"&gt;JSMPP library&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/SNMP" title="SNMP"&gt;SNMP&lt;/a&gt;
/ camel-snmp
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
snmp://host[:port]?options
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Polling OID values and receiving traps using SNMP via &lt;a
href="http://snmp4j.com" rel="nofollow"&gt;SNMP4J &lt;/a&gt; library &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/SpringIntegration" title="SpringIntegration"&gt;SpringIntegration&lt;/a&gt;
/ camel-spring-integration
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
spring-integration:defaultChannelName
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The bridge component of Camel and &lt;a href="http://www.springframework.org/spring-integration"
rel="nofollow"&gt;Spring Integration&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/SQL+Component" title="SQL
Component"&gt;SQL&lt;/a&gt; / camel-sql
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
sql:select * from table where id=#
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Performing SQL queries using JDBC &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Stream" title="Stream"&gt;Stream&lt;/a&gt;
/ camel-stream
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
stream:[in|out|err|file]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Read or write to an input/output/error/file stream rather
like unix pipes &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/StringTemplate" title="StringTemplate"&gt;StringTemplate&lt;/a&gt;
/ camel-stringtemplate
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
string-template:someTemplateResource
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Generates a response using a &lt;a href="http://www.stringtemplate.org/"
rel="nofollow"&gt;String Template&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;TCP&lt;/a&gt;
/ camel-mina
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
tcp://host:port
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with TCP protocols using &lt;a href="http://mina.apache.org/"
rel="nofollow"&gt;Apache MINA&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Test" title="Test"&gt;Test&lt;/a&gt;
/ camel-spring
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
test:expectedMessagesEndpointUri
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Creates a &lt;a href="/confluence/display/CAMEL/Mock" title="Mock"&gt;Mock&lt;/a&gt;
endpoint which expects to receive all the message bodies that could be polled from the given
underlying endpoint &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Timer" title="Timer"&gt;Timer&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
timer://name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; A timer endpoint &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;UDP&lt;/a&gt;
/ camel-mina
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
udp://host:port
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with UDP protocols using &lt;a href="http://mina.apache.org/"
rel="nofollow"&gt;Apache MINA&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Validation" title="Validation"&gt;Validation&lt;/a&gt;
/ camel-spring
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
validation:someLocalOrRemoteResource
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Validates the payload of a message using &lt;a href="http://www.w3.org/XML/Schema"
rel="nofollow"&gt;XML Schema&lt;/a&gt; and JAXP Validation &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/Velocity" title="Velocity"&gt;Velocity&lt;/a&gt;
/ camel-velocity
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
velocity:someTemplateResource
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Generates a response using an &lt;a href="http://velocity.apache.org/"
rel="nofollow"&gt;Apache Velocity&lt;/a&gt; template &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/VM" title="VM"&gt;VM&lt;/a&gt;
/ camel-core
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
vm:name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Asynchronous call to another endpoint in the same JVM &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/XMPP" title="XMPP and
Jabber support"&gt;XMPP&lt;/a&gt; / camel-xmpp
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
xmpp://host:port/room
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Working with XMPP and Jabber &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/XQuery+Endpoint" title="XQuery
Endpoint"&gt;XQuery&lt;/a&gt; / camel-saxon
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
xquery:someXQueryResource
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Generates a response using an &lt;a href="/confluence/display/CAMEL/XQuery"
title="XQuery"&gt;XQuery&lt;/a&gt; template &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="/confluence/display/CAMEL/XSLT" title="XSLT"&gt;XSLT&lt;/a&gt;
/ camel-spring
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
xslt:someTemplateResource
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Generates a response using an &lt;a href="http://www.w3.org/TR/xslt"
rel="nofollow"&gt;XSLT&lt;/a&gt; template &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Component+List"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=52930&amp;revisedVersion=125&amp;originalVersion=124"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Component+List?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Advanced configuration of CamelContext using Spring</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c1318912220.1408.1260263460021.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c1318912220-1408-1260263460021-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T09:11:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Advanced+configuration+of+CamelContext+using+Spring"&gt;Advanced
configuration of CamelContext using Spring&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h2&gt;&lt;a name="AdvancedconfigurationofCamelContextusingSpring-AdvancedconfigurationofCamelContextusingSpring"&gt;&lt;/a&gt;Advanced
configuration of CamelContext using Spring&lt;/h2&gt;

&lt;p&gt;When using Spring the CamelContext can be pre configured based on defined beans in
spring XML.&lt;br/&gt;
This wiki page documentes these features. Most of these features requires &lt;b&gt;Camel 2.0&lt;/b&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a name="AdvancedconfigurationofCamelContextusingSpring-Whatcanbeconfigured"&gt;&lt;/a&gt;What
can be configured&lt;/h3&gt;
&lt;p&gt;The following functions can be configured:&lt;/p&gt;
&lt;ul class="alternate" type="square"&gt;
	&lt;li&gt;Class resolvers&lt;/li&gt;
	&lt;li&gt;Lifecycle factories&lt;/li&gt;
	&lt;li&gt;Registry for lookup&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Debugger" title="Debugger"&gt;Debugger&lt;/a&gt;,
&lt;a href="/confluence/display/CAMEL/Tracer" title="Tracer"&gt;Tracer&lt;/a&gt; and &lt;a
href="/confluence/display/CAMEL/Delay+Interceptor" title="Delay Interceptor"&gt;Delay&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Intercept" title="Intercept"&gt;Intercept&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Camel will configure these functions by doing a lookup in the Spring bean registry
to find beans of the given type&lt;br/&gt;
When Camel finds and uses any of these it logs at &lt;tt&gt;INFO&lt;/tt&gt; level.&lt;/p&gt;

&lt;p&gt;The following list all requires at most 1 beans defined. If there are more than 1
bean of this type, then Camel will &lt;b&gt;not&lt;/b&gt; use it. &lt;/p&gt;
&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Type &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Number of beans &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; PackageScanClassResolver &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a 3rd party package scan resolver. More details at
&lt;a href="/confluence/display/CAMEL/Pluggable+Class+Resolvers" title="Pluggable Class Resolvers"&gt;Pluggable
Class Resolvers&lt;/a&gt;. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; ClassResolver &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a 3rd party class resolver. More details at &lt;a href="/confluence/display/CAMEL/Pluggable+Class+Resolvers"
title="Pluggable Class Resolvers"&gt;Pluggable Class Resolvers&lt;/a&gt;. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; FactoryFinderResolver &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a 3rd party factory finder. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Registry &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a 3rd party bean registry. By default Camel will use
Spring ApplicationContext as registry. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Debugger &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a &lt;a href="/confluence/display/CAMEL/Debugger" title="Debugger"&gt;Debugger&lt;/a&gt;
usually for tooling. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Tracer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a 3rd party &lt;a href="/confluence/display/CAMEL/Tracer"
title="Tracer"&gt;Tracer&lt;/a&gt;. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; TraceFormatter &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a bean that has the tracing options configured. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; HandleFault &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a 3rd part fault handler to handle FAULT messages.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Delayer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use a 3rd part &lt;a href="/confluence/display/CAMEL/Delayer"
title="Delayer"&gt;Delayer&lt;/a&gt;. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; ManagementStrategy &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;Camel 2.1:&lt;/b&gt; To use a 3rd part strategy for
&lt;a href="/confluence/display/CAMEL/Camel+JMX" title="Camel JMX"&gt;management&lt;/a&gt;,
for example JMX management.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; EventFactory &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;Camel 2.1:&lt;/b&gt; To use a 3rd part event factory.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; EventNotifier &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;Camel 2.1:&lt;/b&gt; To use a 3rd part event notifier.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; InflightRepository &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..1 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;Camel 2.1:&lt;/b&gt; To use a 3rd part inflight repository.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;And the following options have support for any number of beans defined.&lt;/p&gt;
&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Type &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Number of beans &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; InterceptStrategy &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..n &lt;/td&gt;
&lt;td class='confluenceTd'&gt; To use your own &lt;a href="/confluence/display/CAMEL/Intercept"
title="Intercept"&gt;Intercept&lt;/a&gt; that intercepts every processing steps in all routes
in the &lt;a href="/confluence/display/CAMEL/CamelContext" title="CamelContext"&gt;CamelContext&lt;/a&gt;.
For instance you can use this to do an AOP like performance timer interceptor. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; LifecycleStrategy &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 0..n &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;Camel 2.1:&lt;/b&gt; To use 3rd party lifecycle strategies.
By default Camel uses a JMX aware that does JMX instrumentation. &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Camel will log at &lt;tt&gt;INFO&lt;/tt&gt; level if it pickup and uses a custom
bean using &lt;tt&gt;org.apache.camel.spring.CamelContextFactoryBean&lt;/tt&gt; as name.&lt;/p&gt;

&lt;h3&gt;&lt;a name="AdvancedconfigurationofCamelContextusingSpring-Usingcontainerwideinterceptors"&gt;&lt;/a&gt;Using
container wide interceptors&lt;/h3&gt;
&lt;p&gt;Imagine that you have multiple &lt;a href="/confluence/display/CAMEL/CamelContext"
title="CamelContext"&gt;CamelContext&lt;/a&gt; and you want to configure that they all use
the same container wide interceptor. How do we do that? Well we can leverage the fact that
Camel can auto detect and use custom interceptors. So what we simply do is to define our interceptor
in the spring xml file. The sample below does this and also define 2 camel contexts. The sample
is based on unit test.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"&gt;&lt;b&gt;Spring DSL&lt;/b&gt;&lt;/div&gt;&lt;div class="codeContent
panelContent"&gt;
&lt;pre class="code-xml"&gt;
&amp;lt;!-- here we define a spring bean that is our container wide interceptor
     its important to notice that the class ContainerWideInterceptor implements
     org.apache.camel.spi.InterceptStrategy that allows us to plugin our interceptors
     Camel will at startup automatic look for any beans in spring registry that is an
     instance of org.apache.camel.spi.InterceptStrategy and add it as interceptor
     to all its routes. Using this we are capable of defining container wide interceptors
     that gets used in all camel contests we define with spring --&amp;gt;
&lt;span class="code-tag"&gt;&amp;lt;bean id=&lt;span class="code-quote"&gt;"myInterceptor"&lt;/span&gt;
class=&lt;span class="code-quote"&gt;"org.apache.camel.spring.interceptor.ContainerWideInterceptor"&lt;/span&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="code-tag"&gt;&lt;span class="code-comment"&gt;&amp;lt;!-- here we have the
1st CamelContext --&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel1"&lt;/span&gt;
xmlns=&lt;span class="code-quote"&gt;"http://camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
        &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"direct:one"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"mock:result"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/camelContext&amp;gt;&lt;/span&gt;

&lt;span class="code-tag"&gt;&lt;span class="code-comment"&gt;&amp;lt;!-- and there we have
the 2nd CamelContext --&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel2"&lt;/span&gt;
xmlns=&lt;span class="code-quote"&gt;"http://camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
        &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"direct:two"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"log:two"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"mock:result"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/camelContext&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Okay lets build our interceptor to simply count the number of interceptions. This
is quite easy as we can just implement this logic in our implementation directly as the code
below illustrates:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"&gt;&lt;b&gt;InterceptorStrategy&lt;/b&gt;&lt;/div&gt;&lt;div
class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; class ContainerWideInterceptor
&lt;span class="code-keyword"&gt;implements&lt;/span&gt; InterceptStrategy {

    &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;static&lt;/span&gt;
&lt;span class="code-keyword"&gt;final&lt;/span&gt; &lt;span class="code-keyword"&gt;transient&lt;/span&gt;
Log LOG = LogFactory.getLog(ContainerWideInterceptor.class);
    &lt;span class="code-keyword"&gt;private&lt;/span&gt; &lt;span class="code-keyword"&gt;static&lt;/span&gt;
&lt;span class="code-object"&gt;int&lt;/span&gt; count;

    &lt;span class="code-keyword"&gt;public&lt;/span&gt; Processor wrapProcessorInInterceptors(&lt;span
class="code-keyword"&gt;final&lt;/span&gt; CamelContext context, &lt;span class="code-keyword"&gt;final&lt;/span&gt;
ProcessorDefinition definition,
                                                 &lt;span class="code-keyword"&gt;final&lt;/span&gt;
Processor target, &lt;span class="code-keyword"&gt;final&lt;/span&gt; Processor nextTarget)
&lt;span class="code-keyword"&gt;throws&lt;/span&gt; Exception {

        &lt;span class="code-comment"&gt;// as &lt;span class="code-keyword"&gt;this&lt;/span&gt;
is based on an unit test we are a bit lazy and just create an inlined processor
&lt;/span&gt;        &lt;span class="code-comment"&gt;// where we implement our interception
logic.
&lt;/span&gt;        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;new&lt;/span&gt;
Processor() {
            &lt;span class="code-keyword"&gt;public&lt;/span&gt; void process(Exchange exchange)
&lt;span class="code-keyword"&gt;throws&lt;/span&gt; Exception {
                &lt;span class="code-comment"&gt;// we just count number of interceptions
&lt;/span&gt;                count++;
                LOG.info(&lt;span class="code-quote"&gt;"I am the container wide interceptor.
Intercepted total count: "&lt;/span&gt; + count);
                &lt;span class="code-comment"&gt;// its important that we delegate to the
real target so we let target process the exchange
&lt;/span&gt;                target.process(exchange);
            }

            @Override
            &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-object"&gt;String&lt;/span&gt;
toString() {
                &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-quote"&gt;"ContainerWideInterceptor["&lt;/span&gt;
+ target + &lt;span class="code-quote"&gt;"]"&lt;/span&gt;;
            }
        };
    }

    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-object"&gt;int&lt;/span&gt;
getCount() {
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; count;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When Camel boots up it logs at &lt;tt&gt;INFO&lt;/tt&gt; level the container wide
interceptors it have found:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
INFO  CamelContextFactoryBean        - Using custom intercept strategy with id: myInterceptor
and implementation:org.apache.camel.spring.interceptor.ContainerWideInterceptor@b84c44
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;Notice:&lt;/b&gt; If we have more than 1 container wide interceptor, we
can just define them as spring bean. Camel will find and use them.&lt;/p&gt;

&lt;h2&gt;&lt;a name="AdvancedconfigurationofCamelContextusingSpring-SeeAlso"&gt;&lt;/a&gt;See
Also&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Spring" title="Spring"&gt;Spring&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Tutorial-JmsRemoting" title="Tutorial-JmsRemoting"&gt;Spring
JMS Tutorial&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Creating+a+new+Spring+based+Camel+Route"
title="Creating a new Spring based Camel Route"&gt;Creating a new Spring based Camel Route&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Spring+Example" title="Spring Example"&gt;Spring
example&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Xml+Reference" title="Xml Reference"&gt;Xml
Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Advanced+configuration+of+CamelContext+using+Spring"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=120229&amp;revisedVersion=12&amp;originalVersion=11"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Advanced+configuration+of+CamelContext+using+Spring?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888296 [2/2] - in /camel/trunk: apache-camel/ apache-camel/src/main/descriptors/ components/ components/camel-smpp/ components/camel-smpp/src/ components/camel-smpp/src/main/ components/camel-smpp/src/main/java/ components/camel-smpp/src/m...</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091208090717.A339F23889B6@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091208090717-A339F23889B6@eris-apache-org%3e</id>
<updated>2009-12-08T09:07:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,127 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import org.apache.camel.Processor;
+import org.jsmpp.bean.BindType;
+import org.jsmpp.bean.NumberingPlanIndicator;
+import org.jsmpp.bean.TypeOfNumber;
+import org.jsmpp.session.BindParameter;
+import org.jsmpp.session.MessageReceiverListener;
+import org.jsmpp.session.SMPPSession;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.easymock.classextension.EasyMock.*;
+import static org.junit.Assert.assertSame;
+
+/**
+ * JUnit test class for &lt;code&gt;org.apache.camel.component.smpp.SmppConsumer&lt;/code&gt;
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppConsumerTest {
+    
+    private SmppConsumer consumer;
+    private SmppEndpoint endpoint;
+    private SmppConfiguration configuration;
+    private Processor processor;
+    private SMPPSession session;
+
+    @Before
+    public void setUp() {
+        configuration = new SmppConfiguration();
+        endpoint = createMock(SmppEndpoint.class);
+        processor = createMock(Processor.class);
+        session = createMock(SMPPSession.class);
+        
+        consumer = new SmppConsumer(
+                endpoint, 
+                configuration,
+                processor) {
+            
+            SMPPSession createSMPPSession() {
+                return session;
+            }
+        };
+    }
+
+    @Test
+    public void doStartShouldStartANewSmppSession() throws Exception {
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775")
+            .times(2);
+        session.setEnquireLinkTimer(5000); //expectation
+        session.setTransactionTimer(10000); //expectation
+        session.setMessageReceiverListener(isA(MessageReceiverListener.class)); //expectation
+        expect(session.connectAndBind(
+                "localhost",
+                new Integer(2775),
+                new BindParameter(
+                        BindType.BIND_RX,
+                        "smppclient",
+                        "password",
+                        "cp",
+                        TypeOfNumber.UNKNOWN,
+                        NumberingPlanIndicator.UNKNOWN,
+                        ""))).andReturn("1");
+        expect(endpoint.getConnectionString()).andReturn("smpp://smppclient@localhost:2775");
+        
+        replay(endpoint, processor, session);
+        
+        consumer.doStart();
+        
+        verify(endpoint, processor, session);
+    }
+
+    @Test
+    public void doStopShouldNotCloseTheSMPPSessionIfItIsNull() throws Exception {
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775")
+            .times(3);
+        
+        replay(session, endpoint);
+        
+        consumer.doStop();
+        
+        verify(session, endpoint);
+    }
+    
+    @Test
+    public void doStopShouldCloseTheSMPPSession() throws Exception {
+        doStartShouldStartANewSmppSession();
+        reset(endpoint, processor, session);
+        
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775")
+            .times(3);
+        session.close();
+        
+        replay(session, endpoint);
+        
+        consumer.doStop();
+        
+        verify(session, endpoint);
+    }
+
+    @Test
+    public void getterShouldReturnTheSetValues() {
+        assertSame(endpoint, consumer.getEndpoint());
+        assertSame(configuration, consumer.getConfiguration());
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppEndpointTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppEndpointTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppEndpointTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,194 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import junit.framework.TestCase;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.jsmpp.bean.AlertNotification;
+import org.jsmpp.bean.DeliverSm;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.isA;
+import static org.easymock.classextension.EasyMock.createMock;
+import static org.easymock.classextension.EasyMock.replay;
+import static org.easymock.classextension.EasyMock.verify;
+
+
+/**
+ * JUnit test class for &lt;code&gt;org.apache.camel.component.smpp.SmppEndpoint&lt;/code&gt;
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppEndpointTest extends TestCase {
+    
+    private SmppEndpoint endpoint;
+    private SmppConfiguration configuration;
+    private Component component;
+    private SmppBinding binding;
+
+    @Before
+    public void setUp() throws Exception {
+        configuration = createMock(SmppConfiguration.class);
+        component = createMock(Component.class);
+        binding = createMock(SmppBinding.class);
+        
+        endpoint = new SmppEndpoint("smpp://smppclient@localhost:2775", component, configuration);
+        endpoint.setBinding(binding);
+    }
+
+    @Test
+    public void isLenientPropertiesShouldReturnTrue() {
+        assertTrue(endpoint.isLenientProperties());
+    }
+
+    @Test
+    public void isSingletonShouldReturnTrue() {
+        assertTrue(endpoint.isSingleton());
+    }
+
+    @Test
+    public void createEndpointUriShouldReturnTheEndpointUri() {
+        expect(configuration.getSystemId()).andReturn("smppclient");
+        expect(configuration.getHost()).andReturn("localhost");
+        expect(configuration.getPort()).andReturn(new Integer(2775));
+        
+        replay(configuration);
+        
+        assertEquals("smpp://smppclient@localhost:2775", endpoint.createEndpointUri());
+        
+        verify(configuration);
+    }
+
+    @Test
+    public void createConsumerShouldReturnASmppConsumer() throws Exception {
+        Processor processor = createMock(Processor.class);
+        
+        replay(processor);
+        
+        Consumer consumer = endpoint.createConsumer(processor);
+        
+        verify(processor);
+        
+        assertTrue(consumer instanceof SmppConsumer);
+    }
+
+    @Test
+    public void vreateProducerShouldReturnASmppProducer() throws Exception {
+        Producer producer = endpoint.createProducer();
+        
+        assertTrue(producer instanceof SmppProducer);
+    }
+
+    @Test
+    public void createOnAcceptAlertNotificationExchangeAlertNotification() {
+        AlertNotification alertNotification = createMock(AlertNotification.class);
+        SmppMessage message = createMock(SmppMessage.class);
+        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
+        message.setExchange(isA(Exchange.class));
+        
+        replay(alertNotification, binding, message);
+        
+        Exchange exchange = endpoint.createOnAcceptAlertNotificationExchange(alertNotification);
+        
+        verify(alertNotification, binding, message);
+        
+        assertSame(binding, exchange.getProperty(Exchange.BINDING));
+        assertSame(message, exchange.getIn());
+        assertSame(ExchangePattern.InOnly, exchange.getPattern());
+    }
+
+    @Test
+    public void testCreateOnAcceptAlertNotificationExchangeExchangePatternAlertNotification() {
+        AlertNotification alertNotification = createMock(AlertNotification.class);
+        SmppMessage message = createMock(SmppMessage.class);
+        expect(binding.createSmppMessage(alertNotification)).andReturn(message);
+        message.setExchange(isA(Exchange.class));
+        
+        replay(alertNotification, binding, message);
+        
+        Exchange exchange = endpoint.createOnAcceptAlertNotificationExchange(ExchangePattern.InOut, alertNotification);
+        
+        verify(alertNotification, binding, message);
+        
+        assertSame(binding, exchange.getProperty(Exchange.BINDING));
+        assertSame(message, exchange.getIn());
+        assertSame(ExchangePattern.InOut, exchange.getPattern());
+    }
+
+    @Test
+    public void testCreateOnAcceptDeliverSmExchangeDeliverSm() throws Exception {
+        DeliverSm deliverSm = createMock(DeliverSm.class);
+        SmppMessage message = createMock(SmppMessage.class);
+        expect(binding.createSmppMessage(deliverSm)).andReturn(message);
+        message.setExchange(isA(Exchange.class));
+        
+        replay(deliverSm, binding, message);
+        
+        Exchange exchange = endpoint.createOnAcceptDeliverSmExchange(deliverSm);
+        
+        verify(deliverSm, binding, message);
+        
+        assertSame(binding, exchange.getProperty(Exchange.BINDING));
+        assertSame(message, exchange.getIn());
+        assertSame(ExchangePattern.InOnly, exchange.getPattern());
+    }
+
+    @Test
+    public void testCreateOnAcceptDeliverSmExchangeExchangePatternDeliverSm() throws Exception {
+        DeliverSm deliverSm = createMock(DeliverSm.class);
+        SmppMessage message = createMock(SmppMessage.class);
+        expect(binding.createSmppMessage(deliverSm)).andReturn(message);
+        message.setExchange(isA(Exchange.class));
+        
+        replay(deliverSm, binding, message);
+        
+        Exchange exchange = endpoint.createOnAcceptDeliverSmExchange(ExchangePattern.InOut, deliverSm);
+        
+        verify(deliverSm, binding, message);
+        
+        assertSame(binding, exchange.getProperty(Exchange.BINDING));
+        assertSame(message, exchange.getIn());
+        assertSame(ExchangePattern.InOut, exchange.getPattern());
+    }
+
+    @Test
+    public void getConnectionStringShouldReturnTheConnectionString() {
+        expect(configuration.getSystemId()).andReturn("smppclient");
+        expect(configuration.getHost()).andReturn("localhost");
+        expect(configuration.getPort()).andReturn(new Integer(2775));
+        
+        replay(configuration);
+        
+        assertEquals("smpp://smppclient@localhost:2775", endpoint.getConnectionString());
+        
+        verify(configuration);
+    }
+
+    @Test
+    public void getConfigurationShouldReturnTheSetValue() {
+        assertSame(configuration, endpoint.getConfiguration());
+    }
+
+}

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppEndpointTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppEndpointTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,112 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import org.jsmpp.bean.AlertNotification;
+import org.jsmpp.bean.DeliverSm;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * JUnit test class for &lt;code&gt;org.apache.camel.component.smpp.SmppMessage&lt;/code&gt;
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppMessageTest {
+    
+    private SmppMessage message;
+
+    @Before
+    public void setUp() {
+        message = new SmppMessage();
+    }
+
+    @Test
+    public void emptyConstructorShouldReturnAnInstanceWithoutACommand() {
+        assertNull(message.getCommand());
+        assertTrue(message.getHeaders().isEmpty());
+    }
+
+    @Test
+    public void alertNotificationConstructorShouldReturnAnInstanceWithACommandAndHeaderAttributes() {
+        AlertNotification command = new AlertNotification();
+        message = new SmppMessage(command);
+        
+        assertTrue(message.getCommand() instanceof AlertNotification);
+        assertTrue(message.getHeaders().isEmpty());
+    }
+
+    @Test
+    public void testSmppMessageDeliverSm() {
+        DeliverSm command = new DeliverSm();
+        message = new SmppMessage(command);
+        
+        assertTrue(message.getCommand() instanceof DeliverSm);
+        assertTrue(message.getHeaders().isEmpty());
+    }
+
+    @Test
+    public void newInstanceShouldReturnAnInstanceWithoutACommand() {
+        SmppMessage msg = message.newInstance();
+        
+        assertNotNull(msg);
+        assertNull(msg.getCommand());
+        assertTrue(msg.getHeaders().isEmpty());
+    }
+    
+    @Test
+    public void createBodyShouldReturnNullIfTheCommandIsNull() {
+        assertNull(message.createBody());
+    }
+    
+    @Test
+    public void createBodyShouldReturnNullIfTheCommandIsNotAMessageRequest() {
+        AlertNotification command = new AlertNotification();
+        message = new SmppMessage(command);
+        
+        assertNull(message.createBody());
+    }
+    
+    @Test
+    public void createBodyShouldReturnTheShortMessageIfTheCommandIsAMessageRequest() {
+        DeliverSm command = new DeliverSm();
+        command.setShortMessage("Hello SMPP world!".getBytes());
+        message = new SmppMessage(command);
+        
+        assertEquals("Hello SMPP world!", message.createBody());
+    }
+    
+    @Test
+    public void toStringShouldReturnTheBodyIfTheCommandIsNull() {
+        assertEquals("SmppMessage: null", message.toString());
+    }
+    
+    @Test
+    public void toStringShouldReturnTheShortMessageIfTheCommandIsNotNull() {
+        DeliverSm command = new DeliverSm();
+        command.setShortMessage("Hello SMPP world!".getBytes());
+        message = new SmppMessage(command);
+        
+        assertEquals("SmppMessage: PDUHeader(0, 00000000, 00000000, 0)", message.toString());
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,335 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.io.IOException;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.Message;
+import org.jsmpp.bean.Alphabet;
+import org.jsmpp.bean.BindType;
+import org.jsmpp.bean.ESMClass;
+import org.jsmpp.bean.GeneralDataCoding;
+import org.jsmpp.bean.MessageClass;
+import org.jsmpp.bean.NumberingPlanIndicator;
+import org.jsmpp.bean.RegisteredDelivery;
+import org.jsmpp.bean.SMSCDeliveryReceipt;
+import org.jsmpp.bean.SubmitSm;
+import org.jsmpp.bean.TypeOfNumber;
+import org.jsmpp.session.BindParameter;
+import org.jsmpp.session.SMPPSession;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.easymock.EasyMock.aryEq;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.isA;
+import static org.easymock.classextension.EasyMock.createMock;
+import static org.easymock.classextension.EasyMock.replay;
+import static org.easymock.classextension.EasyMock.verify;
+import static org.junit.Assert.assertSame;
+
+/**
+ * JUnit test class for &lt;code&gt;org.apache.camel.component.smpp.SmppProducer&lt;/code&gt;
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppProducerTest {
+    
+    private SmppProducer producer;
+    private SmppConfiguration configuration;
+    private SmppEndpoint endpoint;
+    private SMPPSession session;
+
+    @Before
+    public void setUp() {
+        configuration = new SmppConfiguration();
+        endpoint = createMock(SmppEndpoint.class);
+        session = createMock(SMPPSession.class);
+        
+        producer = new SmppProducer(endpoint, configuration) {
+            SMPPSession createSMPPSession() {
+                return session;
+            }
+        };
+    }
+
+    private void doStartExpectations() throws IOException {
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775")
+            .times(2);
+        session.setEnquireLinkTimer(5000); //expectation
+        session.setTransactionTimer(10000); //expectation
+        expect(session.connectAndBind(
+            "localhost",
+            new Integer(2775),
+            new BindParameter(
+                    BindType.BIND_TX,
+                    "smppclient",
+                    "password",
+                    "cp",
+                    TypeOfNumber.UNKNOWN,
+                    NumberingPlanIndicator.UNKNOWN,
+                    ""))).andReturn("1");
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775");
+    }
+    
+    private void submitSmExpectations(Exchange exchange, SmppBinding binding, SubmitSm submitSm) throws Exception {
+        expect(submitSm.getServiceType()).andReturn("CMT");
+        expect(submitSm.getSourceAddrTon()).andReturn(TypeOfNumber.UNKNOWN.value());
+        expect(submitSm.getSourceAddrNpi()).andReturn(NumberingPlanIndicator.UNKNOWN.value());
+        expect(submitSm.getSourceAddr()).andReturn("1616");
+        expect(submitSm.getDestAddrTon()).andReturn(TypeOfNumber.UNKNOWN.value());
+        expect(submitSm.getDestAddrNpi()).andReturn(NumberingPlanIndicator.UNKNOWN.value());
+        expect(submitSm.getDestAddress()).andReturn("1717");
+        expect(submitSm.getProtocolId()).andReturn((byte) 0);
+        expect(submitSm.getPriorityFlag()).andReturn((byte) 1);
+        expect(submitSm.getScheduleDeliveryTime()).andReturn("090830230627004+");
+        expect(submitSm.getValidityPeriod()).andReturn("090831232000004+");
+        expect(submitSm.getRegisteredDelivery())
+            .andReturn(SMSCDeliveryReceipt.SUCCESS_FAILURE.value());
+        expect(submitSm.getReplaceIfPresent()).andReturn((byte) 0);
+        expect(submitSm.getShortMessage()).andReturn("Hello SMPP world!".getBytes("ISO-8859-1"));
+    }
+    
+    @Test
+    public void doStartShouldStartANewSmppSession() throws Exception {
+        doStartExpectations();
+    
+        replay(endpoint, session);
+    
+        producer.doStart();
+    
+        verify(endpoint, session);
+    }
+
+    @Test
+    public void doStopShouldNotCloseTheSMPPSessionIfItIsNull() throws Exception {
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775")
+            .times(3);
+        
+        replay(session, endpoint);
+        
+        producer.doStop();
+        
+        verify(session, endpoint);
+    }
+    
+    @Test
+    public void doStopShouldCloseTheSMPPSession() throws Exception {
+        doStartExpectations();
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775")
+            .times(2);
+        session.close();
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775");
+        
+        replay(session, endpoint);
+        
+        producer.doStart();
+        producer.doStop();
+        
+        verify(session, endpoint);
+    }
+    
+    @Test
+    public void processInOnlyShouldSendASubmitSmAndUpdateTheExchangeInMessage() throws Exception {
+        doStartExpectations();
+        SmppBinding binding = createMock(SmppBinding.class);
+        Exchange exchange = createMock(Exchange.class);
+        Message message = createMock(Message.class);
+        SubmitSm submitSm = createMock(SubmitSm.class);
+        expect(exchange.getExchangeId()).andReturn("ID-muellerc-macbookpro/3690-1214458315718/2-0");
+        expect(endpoint.getBinding()).andReturn(binding);
+        expect(binding.createSubmitSm(exchange)).andReturn(submitSm);
+        submitSmExpectations(exchange, binding, submitSm);
+        expect(session.submitShortMessage(
+                eq("CMT"),
+                eq(TypeOfNumber.UNKNOWN),
+                eq(NumberingPlanIndicator.UNKNOWN),
+                eq("1616"),
+                eq(TypeOfNumber.UNKNOWN),
+                eq(NumberingPlanIndicator.UNKNOWN),
+                eq("1717"),
+                isA(ESMClass.class),
+                eq((byte) 0),
+                eq((byte) 1),
+                eq("090830230627004+"),
+                eq("090831232000004+"),
+                eq(new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS_FAILURE)),
+                eq((byte) 0),
+                eq(new GeneralDataCoding(
+                        false,
+                        false,
+                        MessageClass.CLASS1,
+                        Alphabet.ALPHA_DEFAULT)),
+                eq((byte) 0),
+                aryEq("Hello SMPP world!".getBytes("ISO-8859-1"))))
+            .andReturn("1");
+        expect(exchange.getPattern()).andReturn(ExchangePattern.InOnly);
+        expect(exchange.getIn()).andReturn(message);
+        message.setHeader(SmppBinding.ID, "1"); // expectation without return value
+        expect(exchange.getExchangeId()).andReturn("ID-muellerc-macbookpro/3690-1214458315718/2-0");
+        
+        replay(session, endpoint, binding, exchange, message, submitSm);
+        
+        producer.doStart();
+        producer.process(exchange);
+        
+        verify(session, endpoint, binding, exchange, message, submitSm);
+    }
+    
+    @Test
+    public void processInOutShouldSendASubmitSmAndUpdateTheExchangeOutMessage() throws Exception {
+        doStartExpectations();
+        SmppBinding binding = createMock(SmppBinding.class);
+        Exchange exchange = createMock(Exchange.class);
+        Message message = createMock(Message.class);
+        SubmitSm submitSm = createMock(SubmitSm.class);
+        expect(exchange.getExchangeId()).andReturn("ID-muellerc-macbookpro/3690-1214458315718/2-0");
+        expect(endpoint.getBinding()).andReturn(binding);
+        expect(binding.createSubmitSm(exchange)).andReturn(submitSm);
+        submitSmExpectations(exchange, binding, submitSm);
+        expect(session.submitShortMessage(
+                eq("CMT"),
+                eq(TypeOfNumber.UNKNOWN),
+                eq(NumberingPlanIndicator.UNKNOWN),
+                eq("1616"),
+                eq(TypeOfNumber.UNKNOWN),
+                eq(NumberingPlanIndicator.UNKNOWN),
+                eq("1717"),
+                isA(ESMClass.class),
+                eq((byte) 0),
+                eq((byte) 1),
+                eq("090830230627004+"),
+                eq("090831232000004+"),
+                eq(new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS_FAILURE)),
+                eq((byte) 0),
+                eq(new GeneralDataCoding(
+                        false,
+                        false,
+                        MessageClass.CLASS1,
+                        Alphabet.ALPHA_DEFAULT)),
+                eq((byte) 0),
+                aryEq("Hello SMPP world!".getBytes("ISO-8859-1"))))
+            .andReturn("1");
+        expect(exchange.getPattern()).andReturn(ExchangePattern.InOut);
+        expect(exchange.getOut()).andReturn(message);
+        message.setHeader(SmppBinding.ID, "1"); // expectation without return value
+        expect(exchange.getExchangeId()).andReturn("ID-muellerc-macbookpro/3690-1214458315718/2-0");
+        
+        replay(session, endpoint, binding, exchange, message, submitSm);
+        
+        producer.doStart();
+        producer.process(exchange);
+        
+        verify(session, endpoint, binding, exchange, message, submitSm);
+    }
+    
+    @Test
+    public void processShouldDoAReconnectAfterAnIOException() throws Exception {
+        doStartExpectations();
+        SmppBinding binding = createMock(SmppBinding.class);
+        Exchange exchange = createMock(Exchange.class);
+        Message message = createMock(Message.class);
+        SubmitSm submitSm = createMock(SubmitSm.class);
+        expect(exchange.getExchangeId()).andReturn("ID-muellerc-macbookpro/3690-1214458315718/2-0");
+        expect(endpoint.getBinding()).andReturn(binding);
+        expect(binding.createSubmitSm(exchange)).andReturn(submitSm);
+        submitSmExpectations(exchange, binding, submitSm);
+        expect(session.submitShortMessage(
+                eq("CMT"),
+                eq(TypeOfNumber.UNKNOWN),
+                eq(NumberingPlanIndicator.UNKNOWN),
+                eq("1616"),
+                eq(TypeOfNumber.UNKNOWN),
+                eq(NumberingPlanIndicator.UNKNOWN),
+                eq("1717"),
+                isA(ESMClass.class),
+                eq((byte) 0),
+                eq((byte) 1),
+                eq("090830230627004+"),
+                eq("090831232000004+"),
+                eq(new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS_FAILURE)),
+                eq((byte) 0),
+                eq(new GeneralDataCoding(
+                        false,
+                        false,
+                        MessageClass.CLASS1,
+                        Alphabet.ALPHA_DEFAULT)),
+                eq((byte) 0),
+                aryEq("Hello SMPP world!".getBytes("ISO-8859-1"))))
+            .andThrow(new IOException("connection broken"));
+        
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775")
+            .times(2);
+        session.close(); // expectation without return value
+        expect(endpoint.getConnectionString())
+            .andReturn("smpp://smppclient@localhost:2775");
+
+        doStartExpectations();
+        
+        submitSmExpectations(exchange, binding, submitSm);
+        expect(session.submitShortMessage(
+                eq("CMT"),
+                eq(TypeOfNumber.UNKNOWN),
+                eq(NumberingPlanIndicator.UNKNOWN),
+                eq("1616"),
+                eq(TypeOfNumber.UNKNOWN),
+                eq(NumberingPlanIndicator.UNKNOWN),
+                eq("1717"),
+                isA(ESMClass.class),
+                eq((byte) 0),
+                eq((byte) 1),
+                eq("090830230627004+"),
+                eq("090831232000004+"),
+                eq(new RegisteredDelivery(SMSCDeliveryReceipt.SUCCESS_FAILURE)),
+                eq((byte) 0),
+                eq(new GeneralDataCoding(
+                        false,
+                        false,
+                        MessageClass.CLASS1,
+                        Alphabet.ALPHA_DEFAULT)),
+                eq((byte) 0),
+                aryEq("Hello SMPP world!".getBytes("ISO-8859-1"))))
+            .andReturn("1");
+        expect(exchange.getPattern()).andReturn(ExchangePattern.InOnly);
+        expect(exchange.getIn()).andReturn(message);
+        message.setHeader(SmppBinding.ID, "1"); // expectation without return value
+        expect(exchange.getExchangeId()).andReturn("ID-muellerc-macbookpro/3690-1214458315718/2-0");
+        
+        replay(session, endpoint, binding, exchange, message, submitSm);
+        
+        producer.doStart();
+        producer.process(exchange);
+        
+        verify(session, endpoint, binding, exchange, message, submitSm);
+    }
+
+    @Test
+    public void getterShouldReturnTheSetValues() {
+        assertSame(endpoint, producer.getEndpoint());
+        assertSame(configuration, producer.getConfiguration());
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,108 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp.integration;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.smpp.SmppBinding;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Spring based integration test for the smpp component. To run this test, ensure that
+ * the SMSC is running on:
+ * host:     localhost
+ * port:     2775
+ * user:     smppclient
+ * password: password
+ * &lt;br/&gt;
+ * A SMSC for test is available here: http://www.seleniumsoftware.com/downloads.html
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppComponentIntegrationTest extends CamelTestSupport {
+    
+    @Test
+    @Ignore("Must be manually tested")
+    public void sendInOut() throws Exception {
+        MockEndpoint result = getMockEndpoint("mock:result");
+        result.expectedMessageCount(1);
+        
+        Endpoint start = getMandatoryEndpoint("direct:start");
+        Exchange exchange = start.createExchange();
+        exchange.setPattern(ExchangePattern.InOut);
+        exchange.getIn().setBody("Hello SMPP World!");
+
+        template.send(start, exchange);
+        
+        assertMockEndpointsSatisfied();
+        Exchange resultExchange = result.getExchanges().get(0);
+        assertEquals("Hello SMPP World!", resultExchange.getIn().getBody());
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.ID));
+        assertEquals(1, resultExchange.getIn().getHeader(SmppBinding.SUBMITTED));
+        assertEquals(1, resultExchange.getIn().getHeader(SmppBinding.DELIVERED));
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.DONE_DATE));
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.SUBMIT_DATE));
+        assertNull(resultExchange.getIn().getHeader(SmppBinding.ERROR));
+        
+        assertNotNull(exchange.getOut().getHeader(SmppBinding.ID));
+    }
+    
+    @Test
+    @Ignore("Must be manually tested")
+    public void sendInOnly() throws Exception {
+        MockEndpoint result = getMockEndpoint("mock:result");
+        result.expectedMessageCount(1);
+        
+        Endpoint start = getMandatoryEndpoint("direct:start");
+        Exchange exchange = start.createExchange();
+        exchange.setPattern(ExchangePattern.InOnly);
+        exchange.getIn().setBody("Hello SMPP World!");
+
+        template.send(start, exchange);
+        
+        assertMockEndpointsSatisfied();
+        Exchange resultExchange = result.getExchanges().get(0);
+        assertEquals("Hello SMPP World!", resultExchange.getIn().getBody());
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.ID));
+        assertEquals(1, resultExchange.getIn().getHeader(SmppBinding.SUBMITTED));
+        assertEquals(1, resultExchange.getIn().getHeader(SmppBinding.DELIVERED));
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.DONE_DATE));
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.SUBMIT_DATE));
+        assertNull(resultExchange.getIn().getHeader(SmppBinding.ERROR));
+        
+        assertNotNull(exchange.getIn().getHeader(SmppBinding.ID));
+    }
+
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start")
+                    .to("smpp://smppclient@localhost:2775?password=password&amp;enquireLinkTimer=3000&amp;transactionTimer=5000&amp;systemType=producer");
+                
+                from("smpp://smppclient@localhost:2775?password=password&amp;enquireLinkTimer=3000&amp;transactionTimer=5000&amp;systemType=consumer")
+                    .to("mock:result");
+            }
+        };
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,100 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp.integration;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.smpp.SmppBinding;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Spring based integration test for the smpp component. To run this test, ensure that
+ * the SMSC is running on:
+ * host:     localhost
+ * port:     2775
+ * user:     smppclient
+ * password: password
+ * &lt;br/&gt;
+ * A SMSC for test is available here: http://www.seleniumsoftware.com/downloads.html
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppComponentSpringIntegrationTest extends CamelSpringTestSupport {
+
+    @Test
+    @Ignore("Must be manually tested")
+    public void sendInOut() throws Exception {
+        MockEndpoint result = getMockEndpoint("mock:result");
+        result.expectedMessageCount(1);
+        
+        Endpoint start = getMandatoryEndpoint("direct:start");
+        Exchange exchange = start.createExchange();
+        exchange.setPattern(ExchangePattern.InOut);
+        exchange.getIn().setBody("Hello SMPP World!");
+
+        template.send(start, exchange);
+        
+        assertMockEndpointsSatisfied();
+        Exchange resultExchange = result.getExchanges().get(0);
+        assertEquals("Hello SMPP World!", resultExchange.getIn().getBody());
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.ID));
+        assertEquals(1, resultExchange.getIn().getHeader(SmppBinding.SUBMITTED));
+        assertEquals(1, resultExchange.getIn().getHeader(SmppBinding.DELIVERED));
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.DONE_DATE));
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.SUBMIT_DATE));
+        assertNull(resultExchange.getIn().getHeader(SmppBinding.ERROR));
+        
+        assertNotNull(exchange.getOut().getHeader(SmppBinding.ID));
+    }
+    
+    @Test
+    @Ignore("Must be manually tested")
+    public void sendInOnly() throws Exception {
+        MockEndpoint result = getMockEndpoint("mock:result");
+        result.expectedMessageCount(1);
+        
+        Endpoint start = getMandatoryEndpoint("direct:start");
+        Exchange exchange = start.createExchange();
+        exchange.setPattern(ExchangePattern.InOnly);
+        exchange.getIn().setBody("Hello SMPP World!");
+
+        template.send(start, exchange);
+        
+        assertMockEndpointsSatisfied();
+        Exchange resultExchange = result.getExchanges().get(0);
+        assertEquals("Hello SMPP World!", resultExchange.getIn().getBody());
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.ID));
+        assertEquals(1, resultExchange.getIn().getHeader(SmppBinding.SUBMITTED));
+        assertEquals(1, resultExchange.getIn().getHeader(SmppBinding.DELIVERED));
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.DONE_DATE));
+        assertNotNull(resultExchange.getIn().getHeader(SmppBinding.SUBMIT_DATE));
+        assertNull(resultExchange.getIn().getHeader(SmppBinding.ERROR));
+        
+        assertNotNull(exchange.getIn().getHeader(SmppBinding.ID));
+    }
+
+    @Override
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml");
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/resources/log4j.properties?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/resources/log4j.properties (added)
+++ camel/trunk/components/camel-smpp/src/test/resources/log4j.properties Tue Dec  8 09:07:14 2009
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+## ---------------------------------------------------------------------------
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=INFO, file
+
+log4j.logger.org.apache.camel.component.smpp=DEBUG
+log4j.logger.org.apache.camel.impl=INFO
+#log4j.logger.org.apache.camel.impl=DEBUG
+#log4j.logger.org.apache.camel=DEBUG
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-smpp-test.log
+log4j.appender.file.append=true

Propchange: camel/trunk/components/camel-smpp/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-smpp/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml (added)
+++ camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml Tue Dec  8 09:07:14 2009
@@ -0,0 +1,34 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+  &lt;!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+  --&gt;
+&lt;beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="
+    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+    http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"&gt;
+
+  &lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
+    &lt;route&gt;
+      &lt;from uri="direct:start" /&gt;
+      &lt;to uri="smpp://smppclient@localhost:2775?password=password&amp;amp;enquireLinkTimer=3000&amp;amp;transactionTimer=5000&amp;amp;systemType=producer" /&gt;
+    &lt;/route&gt;
+  
+    &lt;route&gt;
+      &lt;from uri="smpp://smppclient@localhost:2775?password=password&amp;amp;enquireLinkTimer=3000&amp;amp;transactionTimer=5000&amp;amp;systemType=consumer" /&gt;
+      &lt;to uri="mock:result" /&gt;
+    &lt;/route&gt;
+  &lt;/camelContext&gt;
+&lt;/beans&gt;
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: camel/trunk/components/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/pom.xml?rev=888296&amp;r1=888295&amp;r2=888296&amp;view=diff
==============================================================================
--- camel/trunk/components/pom.xml (original)
+++ camel/trunk/components/pom.xml Tue Dec  8 09:07:14 2009
@@ -30,6 +30,7 @@
   &lt;packaging&gt;pom&lt;/packaging&gt;
 
   &lt;modules&gt;
+    &lt;!--&lt;module&gt;camel-jmxconnect&lt;/module&gt;--&gt;
     &lt;module&gt;camel-amqp&lt;/module&gt;
     &lt;module&gt;camel-atom&lt;/module&gt;
     &lt;module&gt;camel-bam&lt;/module&gt;
@@ -60,7 +61,6 @@
     &lt;module&gt;camel-jms&lt;/module&gt;
     &lt;module&gt;camel-josql&lt;/module&gt;
     &lt;module&gt;camel-jcr&lt;/module&gt;
-    &lt;!--&lt;module&gt;camel-jmxconnect&lt;/module&gt;--&gt;
     &lt;module&gt;camel-jpa&lt;/module&gt;
     &lt;module&gt;camel-jt400&lt;/module&gt;
     &lt;module&gt;camel-juel&lt;/module&gt;
@@ -83,6 +83,7 @@
     &lt;module&gt;camel-scala&lt;/module&gt;
     &lt;module&gt;camel-script&lt;/module&gt;
     &lt;module&gt;camel-servlet&lt;/module&gt;
+    &lt;module&gt;camel-smpp&lt;/module&gt;
     &lt;module&gt;camel-snmp&lt;/module&gt;
     &lt;module&gt;camel-spring&lt;/module&gt;
     &lt;module&gt;camel-spring-integration&lt;/module&gt;

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=888296&amp;r1=888295&amp;r2=888296&amp;view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Tue Dec  8 09:07:14 2009
@@ -426,6 +426,11 @@
       &lt;/dependency&gt;
       &lt;dependency&gt;
         &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+        &lt;artifactId&gt;camel-smpp&lt;/artifactId&gt;
+        &lt;version&gt;${project.version}&lt;/version&gt;
+      &lt;/dependency&gt;
+      &lt;dependency&gt;
+        &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
         &lt;artifactId&gt;camel-spring&lt;/artifactId&gt;
         &lt;version&gt;${project.version}&lt;/version&gt;
       &lt;/dependency&gt;

Modified: camel/trunk/platforms/karaf/features/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/pom.xml?rev=888296&amp;r1=888295&amp;r2=888296&amp;view=diff
==============================================================================
--- camel/trunk/platforms/karaf/features/pom.xml (original)
+++ camel/trunk/platforms/karaf/features/pom.xml Tue Dec  8 09:07:14 2009
@@ -82,6 +82,7 @@
       &lt;jsp-api-2.1-version&gt;1.0.1&lt;/jsp-api-2.1-version&gt;
       &lt;juel-bundle-version&gt;2.1.2_1&lt;/juel-bundle-version&gt;
       &lt;junit-bundle-version&gt;4.7_1&lt;/junit-bundle-version&gt;
+      &lt;jsmpp-bundle-version&gt;2.0_2&lt;/jsmpp-bundle-version&gt;
       &lt;mvel-bundle-version&gt;2.0.8_3&lt;/mvel-bundle-version&gt;
       &lt;mina-bundle-version&gt;1.1.7_3&lt;/mina-bundle-version&gt;
       &lt;neethi-bundle-version&gt;2.0.4_1&lt;/neethi-bundle-version&gt;

Modified: camel/trunk/platforms/karaf/features/src/main/resources/bundles.properties
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/src/main/resources/bundles.properties?rev=888296&amp;r1=888295&amp;r2=888296&amp;view=diff
==============================================================================
--- camel/trunk/platforms/karaf/features/src/main/resources/bundles.properties (original)
+++ camel/trunk/platforms/karaf/features/src/main/resources/bundles.properties Tue Dec  8 09:07:14 2009
@@ -65,6 +65,7 @@
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.oscache/${oscache-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.httpcore/${httpcore-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.jing/${jing-bundle-version}/jar
+org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsmpp/${jsmpp-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.quartz/${quartz-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.qpid/${qpid-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon/${saxon-bundle-version}/jar

Modified: camel/trunk/platforms/karaf/features/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/src/main/resources/features.xml?rev=888296&amp;r1=888295&amp;r2=888296&amp;view=diff
==============================================================================
--- camel/trunk/platforms/karaf/features/src/main/resources/features.xml (original)
+++ camel/trunk/platforms/karaf/features/src/main/resources/features.xml Tue Dec  8 09:07:14 2009
@@ -372,6 +372,11 @@
     &lt;bundle&gt;mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.scripting-api-1.0/${servicemix-specs-version}&lt;/bundle&gt;
     &lt;bundle&gt;mvn:org.apache.camel/camel-script/${pom.version}&lt;/bundle&gt;
   &lt;/feature&gt;
+  &lt;feature name='camel-smpp' version='${pom.version}'&gt;
+    &lt;feature version='${pom.version}'&gt;camel-core&lt;/feature&gt;
+    &lt;bundle&gt;mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsmpp/${jsmpp-bundle-version}&lt;/bundle&gt;
+    &lt;bundle&gt;mvn:org.apache.camel/camel-smpp/${pom.version}&lt;/bundle&gt;
+  &lt;/feature&gt;
   &lt;feature name='camel-snmp' version='${pom.version}'&gt;
     &lt;feature version='${pom.version}'&gt;camel-core&lt;/feature&gt;
     &lt;bundle&gt;mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j/${snmp4j-bundle-version}&lt;/bundle&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888296 [1/2] - in /camel/trunk: apache-camel/ apache-camel/src/main/descriptors/ components/ components/camel-smpp/ components/camel-smpp/src/ components/camel-smpp/src/main/ components/camel-smpp/src/main/java/ components/camel-smpp/src/m...</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091208090717.9D9F82388882@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091208090717-9D9F82388882@eris-apache-org%3e</id>
<updated>2009-12-08T09:07:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Tue Dec  8 09:07:14 2009
New Revision: 888296

URL: http://svn.apache.org/viewvc?rev=888296&amp;view=rev
Log:
CAMEL-1921: Added new camel-smpp component. Many thanks to Christian Mueller for contributing.

Added:
    camel/trunk/components/camel-smpp/
    camel/trunk/components/camel-smpp/pom.xml   (with props)
    camel/trunk/components/camel-smpp/src/
    camel/trunk/components/camel-smpp/src/main/
    camel/trunk/components/camel-smpp/src/main/java/
    camel/trunk/components/camel-smpp/src/main/java/org/
    camel/trunk/components/camel-smpp/src/main/java/org/apache/
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java   (with props)
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java   (with props)
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java   (with props)
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java   (with props)
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java   (with props)
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppMessage.java   (with props)
    camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppProducer.java   (with props)
    camel/trunk/components/camel-smpp/src/main/resources/
    camel/trunk/components/camel-smpp/src/main/resources/META-INF/
    camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/
    camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/
    camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/apache/
    camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/apache/camel/
    camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/apache/camel/component/
    camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/apache/camel/component/smpp
    camel/trunk/components/camel-smpp/src/test/
    camel/trunk/components/camel-smpp/src/test/java/
    camel/trunk/components/camel-smpp/src/test/java/org/
    camel/trunk/components/camel-smpp/src/test/java/org/apache/
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppEndpointTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java   (with props)
    camel/trunk/components/camel-smpp/src/test/resources/
    camel/trunk/components/camel-smpp/src/test/resources/log4j.properties   (with props)
    camel/trunk/components/camel-smpp/src/test/resources/org/
    camel/trunk/components/camel-smpp/src/test/resources/org/apache/
    camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/
    camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/
    camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/
    camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/
    camel/trunk/components/camel-smpp/src/test/resources/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest-context.xml   (with props)
Modified:
    camel/trunk/apache-camel/pom.xml
    camel/trunk/apache-camel/src/main/descriptors/common-bin.xml
    camel/trunk/components/pom.xml
    camel/trunk/parent/pom.xml
    camel/trunk/platforms/karaf/features/pom.xml
    camel/trunk/platforms/karaf/features/src/main/resources/bundles.properties
    camel/trunk/platforms/karaf/features/src/main/resources/features.xml

Modified: camel/trunk/apache-camel/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/apache-camel/pom.xml?rev=888296&amp;r1=888295&amp;r2=888296&amp;view=diff
==============================================================================
--- camel/trunk/apache-camel/pom.xml (original)
+++ camel/trunk/apache-camel/pom.xml Tue Dec  8 09:07:14 2009
@@ -228,6 +228,10 @@
     &lt;/dependency&gt;
     &lt;dependency&gt;
       &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+      &lt;artifactId&gt;camel-smpp&lt;/artifactId&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
       &lt;artifactId&gt;camel-snmp&lt;/artifactId&gt;
     &lt;/dependency&gt;
     &lt;dependency&gt;

Modified: camel/trunk/apache-camel/src/main/descriptors/common-bin.xml
URL: http://svn.apache.org/viewvc/camel/trunk/apache-camel/src/main/descriptors/common-bin.xml?rev=888296&amp;r1=888295&amp;r2=888296&amp;view=diff
==============================================================================
--- camel/trunk/apache-camel/src/main/descriptors/common-bin.xml (original)
+++ camel/trunk/apache-camel/src/main/descriptors/common-bin.xml Tue Dec  8 09:07:14 2009
@@ -80,6 +80,7 @@
         &lt;include&gt;org.apache.camel:camel-scala&lt;/include&gt;
         &lt;include&gt;org.apache.camel:camel-script&lt;/include&gt;
         &lt;include&gt;org.apache.camel:camel-servlet&lt;/include&gt;
+        &lt;include&gt;org.apache.camel:camel-smpp&lt;/include&gt;
         &lt;include&gt;org.apache.camel:camel-snmp&lt;/include&gt;
         &lt;include&gt;org.apache.camel:camel-spring&lt;/include&gt;
         &lt;include&gt;org.apache.camel:camel-spring-integration&lt;/include&gt;

Added: camel/trunk/components/camel-smpp/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/pom.xml?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/pom.xml (added)
+++ camel/trunk/components/camel-smpp/pom.xml Tue Dec  8 09:07:14 2009
@@ -0,0 +1,91 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+  &lt;!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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.
+  --&gt;
+&lt;project xmlns="http://maven.apache.org/POM/4.0.0" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
+  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
+
+  &lt;parent&gt;
+    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+    &lt;artifactId&gt;camel-parent&lt;/artifactId&gt;
+    &lt;version&gt;2.2-SNAPSHOT&lt;/version&gt;
+  &lt;/parent&gt;
+
+  &lt;artifactId&gt;camel-smpp&lt;/artifactId&gt;
+  &lt;packaging&gt;bundle&lt;/packaging&gt;
+  &lt;name&gt;Camel :: SMPP&lt;/name&gt;
+  &lt;description&gt;Camel SMPP support&lt;/description&gt;
+
+  &lt;properties&gt;
+    &lt;camel.osgi.export.pkg&gt;org.apache.camel.component.smpp.*&lt;/camel.osgi.export.pkg&gt;
+  &lt;/properties&gt;
+
+  &lt;dependencies&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+      &lt;artifactId&gt;camel-core&lt;/artifactId&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.servicemix.bundles&lt;/groupId&gt;
+      &lt;artifactId&gt;org.apache.servicemix.bundles.jsmpp&lt;/artifactId&gt;
+      &lt;version&gt;2.0_2&lt;/version&gt;
+      &lt;type&gt;bundle&lt;/type&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
+      &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
+      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
+    &lt;/dependency&gt;
+
+    &lt;!-- testing --&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;junit&lt;/groupId&gt;
+      &lt;artifactId&gt;junit&lt;/artifactId&gt;
+      &lt;scope&gt;test&lt;/scope&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+      &lt;artifactId&gt;camel-test&lt;/artifactId&gt;      
+      &lt;scope&gt;test&lt;/scope&gt;
+    &lt;/dependency&gt;
+      &lt;dependency&gt;
+        &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+        &lt;artifactId&gt;camel-spring&lt;/artifactId&gt;
+        &lt;scope&gt;test&lt;/scope&gt;
+      &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
+      &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
+      &lt;scope&gt;test&lt;/scope&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;commons-logging&lt;/groupId&gt;
+      &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
+      &lt;scope&gt;test&lt;/scope&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.easymock&lt;/groupId&gt;
+      &lt;artifactId&gt;easymockclassextension&lt;/artifactId&gt;
+      &lt;version&gt;2.4&lt;/version&gt;
+      &lt;scope&gt;test&lt;/scope&gt;
+    &lt;/dependency&gt;
+  &lt;/dependencies&gt;
+
+&lt;/project&gt;
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-smpp/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java (added)
+++ camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,247 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.jsmpp.bean.AlertNotification;
+import org.jsmpp.bean.Command;
+import org.jsmpp.bean.DeliverSm;
+import org.jsmpp.bean.DeliveryReceipt;
+import org.jsmpp.bean.SubmitSm;
+import org.jsmpp.util.AbsoluteTimeFormatter;
+import org.jsmpp.util.TimeFormatter;
+
+/**
+ * A Strategy used to convert between a Camel {@link Exchange} and
+ * {@link SmppMessage} to and from a SMPP {@link Command}
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppBinding {
+
+    public static final String SEQUENCE_NUMBER = "CamelSmppSequenceNumber";
+    public static final String SUBMITTED = "CamelSmppSubmitted";
+    public static final String SUBMIT_DATE = "CamelSmppSubmitDate";
+    public static final String ERROR = "CamelSmppError";
+    public static final String DONE_DATE = "CamelSmppDoneDate";
+    public static final String DELIVERED = "CamelSmppDelivered";
+    public static final String COMMAND_ID = "CamelSmppCommandId";
+    public static final String COMMAND_STATUS = "CamelSmppCommandStatus";
+    public static final String ID = "CamelSmppId";
+    public static final String REPLACE_IF_PRESENT_FLAG = "CamelSmppReplaceIfPresentFlag";
+    public static final String VALIDITY_PERIOD = "CamelSmppValidityPeriod";
+    public static final String SCHEDULE_DELIVERY_TIME = "CamelSmppScheduleDeliveryTime";
+    public static final String PRIORITY_FLAG = "CamelSmppPriorityFlag";
+    public static final String PROTOCOL_ID = "CamelSmppProtocolId";
+    public static final String REGISTERED_DELIVERY = "CamelSmppRegisteredDelivery";
+    public static final String SERVICE_TYPE = "CamelSmppServiceType";
+    public static final String SOURCE_ADDR_NPI = "CamelSmppSourceAddrNpi";
+    public static final String SOURCE_ADDR_TON = "CamelSmppSourceAddrTon";
+    public static final String SOURCE_ADDR = "CamelSmppSourceAddr";
+    public static final String DEST_ADDR_NPI = "CamelSmppDestAddrNpi";
+    public static final String DEST_ADDR_TON = "CamelSmppDestAddrTon";
+    public static final String DEST_ADDR = "CamelSmppDestAddr";
+    public static final String ESME_ADDR_NPI = "CamelSmppEsmeAddrNpi";
+    public static final String ESME_ADDR_TON = "CamelSmppEsmeAddrTon";
+    public static final String ESME_ADDR = "CamelSmppEsmeAddr";
+
+    private static TimeFormatter timeFormatter = new AbsoluteTimeFormatter();
+
+    private SmppConfiguration configuration;
+
+    public SmppBinding() {
+        this.configuration = new SmppConfiguration();
+    }
+
+    public SmppBinding(SmppConfiguration configuration) {
+        this.configuration = configuration;
+    }
+
+    /**
+     * Create the SubmitSm object from the inbound exchange
+     * 
+     * @throws UnsupportedEncodingException if the encoding is not supported
+     */
+    public SubmitSm createSubmitSm(Exchange exchange) throws UnsupportedEncodingException {
+        Message in = exchange.getIn();
+
+        SubmitSm submitSm = new SubmitSm();
+        submitSm.setShortMessage(exchange.getIn().getBody(String.class).getBytes("ISO-8859-1"));
+
+        if (in.getHeaders().containsKey(DEST_ADDR)) {
+            submitSm.setDestAddress((String) in.getHeader(DEST_ADDR));
+        } else {
+            submitSm.setDestAddress(configuration.getDestAddr());
+        }
+
+        if (in.getHeaders().containsKey(DEST_ADDR_TON)) {
+            submitSm.setDestAddrTon((Byte) in.getHeader(DEST_ADDR_TON));
+        } else {
+            submitSm.setDestAddrTon(configuration.getDestAddrTon());
+        }
+
+        if (in.getHeaders().containsKey(DEST_ADDR_NPI)) {
+            submitSm.setDestAddrNpi((Byte) in.getHeader(DEST_ADDR_NPI));
+        } else {
+            submitSm.setDestAddrNpi(configuration.getDestAddrNpi());
+        }
+
+        if (in.getHeaders().containsKey(SOURCE_ADDR)) {
+            submitSm.setSourceAddr((String) in.getHeader(SOURCE_ADDR));
+        } else {
+            submitSm.setSourceAddr(configuration.getSourceAddr());
+        }
+
+        if (in.getHeaders().containsKey(SOURCE_ADDR_TON)) {
+            submitSm.setSourceAddrTon((Byte) in.getHeader(SOURCE_ADDR_TON));
+        } else {
+            submitSm.setSourceAddrTon(configuration.getSourceAddrTon());
+        }
+
+        if (in.getHeaders().containsKey(SOURCE_ADDR_NPI)) {
+            submitSm.setSourceAddrNpi((Byte) in.getHeader(SOURCE_ADDR_NPI));
+        } else {
+            submitSm.setSourceAddrNpi(configuration.getDestAddrNpi());
+        }
+
+        if (in.getHeaders().containsKey(SERVICE_TYPE)) {
+            submitSm.setServiceType((String) in.getHeader(SERVICE_TYPE));
+        } else {
+            submitSm.setServiceType(configuration.getServiceType());
+        }
+
+        if (in.getHeaders().containsKey(REGISTERED_DELIVERY)) {
+            submitSm.setRegisteredDelivery((Byte) in.getHeader(REGISTERED_DELIVERY));
+        } else {
+            submitSm.setRegisteredDelivery(configuration.getRegisteredDelivery());
+        }
+
+        if (in.getHeaders().containsKey(PROTOCOL_ID)) {
+            submitSm.setProtocolId((Byte) in.getHeader(PROTOCOL_ID));
+        } else {
+            submitSm.setProtocolId(configuration.getProtocolId());
+        }
+
+        if (in.getHeaders().containsKey(PRIORITY_FLAG)) {
+            submitSm.setPriorityFlag((Byte) in.getHeader(PRIORITY_FLAG));
+        } else {
+            submitSm.setPriorityFlag(configuration.getPriorityFlag());
+        }
+
+        if (in.getHeaders().containsKey(SCHEDULE_DELIVERY_TIME)) {
+            submitSm.setScheduleDeliveryTime(timeFormatter.format((Date) in.getHeader(SCHEDULE_DELIVERY_TIME)));
+        } else {
+            submitSm.setScheduleDeliveryTime(timeFormatter.format(getCurrentDate()));
+        }
+
+        if (in.getHeaders().containsKey(VALIDITY_PERIOD)) {
+            submitSm.setValidityPeriod(timeFormatter.format((Date) in.getHeader(VALIDITY_PERIOD)));
+        }
+
+        if (in.getHeaders().containsKey(REPLACE_IF_PRESENT_FLAG)) {
+            submitSm.setReplaceIfPresent((Byte) in.getHeader(REPLACE_IF_PRESENT_FLAG));
+        } else {
+            submitSm.setReplaceIfPresent(configuration.getReplaceIfPresentFlag());
+        }
+
+        return submitSm;
+    }
+
+    /**
+     * Create a new SmppMessage from the inbound alert notification
+     */
+    public SmppMessage createSmppMessage(AlertNotification alertNotification) {
+        SmppMessage smppMessage = new SmppMessage(alertNotification);
+
+        smppMessage.setHeader(SEQUENCE_NUMBER, alertNotification.getSequenceNumber());
+        smppMessage.setHeader(COMMAND_ID, alertNotification.getCommandId());
+        smppMessage.setHeader(COMMAND_STATUS, alertNotification.getCommandStatus());
+        smppMessage.setHeader(SOURCE_ADDR, alertNotification.getSourceAddr());
+        smppMessage.setHeader(SOURCE_ADDR_NPI, alertNotification.getSourceAddrNpi());
+        smppMessage.setHeader(SOURCE_ADDR_TON, alertNotification.getSourceAddrNpi());
+        smppMessage.setHeader(ESME_ADDR, alertNotification.getEsmeAddr());
+        smppMessage.setHeader(ESME_ADDR_NPI, alertNotification.getEsmeAddrNpi());
+        smppMessage.setHeader(ESME_ADDR_TON, alertNotification.getEsmeAddrNpi());
+
+        return smppMessage;
+    }
+
+    /**
+     * Create a new SmppMessage from the inbound deliver sm or deliver receipt
+     */
+    public SmppMessage createSmppMessage(DeliverSm deliverSm) throws Exception {
+        SmppMessage smppMessage = new SmppMessage(deliverSm);
+
+        if (deliverSm.isSmscDeliveryReceipt()) {
+            DeliveryReceipt smscDeliveryReceipt = deliverSm.getShortMessageAsDeliveryReceipt();
+            smppMessage.setBody(smscDeliveryReceipt.getText());
+
+            smppMessage.setHeader(ID, smscDeliveryReceipt.getId());
+            smppMessage.setHeader(DELIVERED, smscDeliveryReceipt.getDelivered());
+            smppMessage.setHeader(DONE_DATE, smscDeliveryReceipt.getDoneDate());
+            if (!"000".equals(smscDeliveryReceipt.getError())) {
+                smppMessage.setHeader(ERROR, smscDeliveryReceipt.getError());
+            }
+            smppMessage.setHeader(SUBMIT_DATE, smscDeliveryReceipt.getSubmitDate());
+            smppMessage.setHeader(SUBMITTED, smscDeliveryReceipt.getSubmitted());
+        } else {
+            smppMessage.setBody(String.valueOf(new String(deliverSm.getShortMessage(),
+                    configuration.getEncoding())));
+
+            smppMessage.setHeader(SEQUENCE_NUMBER, deliverSm.getSequenceNumber());
+            smppMessage.setHeader(COMMAND_ID, deliverSm.getCommandId());
+            smppMessage.setHeader(SOURCE_ADDR, deliverSm.getSourceAddr());
+            smppMessage.setHeader(DEST_ADDR, deliverSm.getDestAddress());
+            smppMessage.setHeader(SCHEDULE_DELIVERY_TIME, deliverSm.getScheduleDeliveryTime());
+            smppMessage.setHeader(VALIDITY_PERIOD, deliverSm.getValidityPeriod());
+        }
+
+        return smppMessage;
+    }
+    
+    /**
+     * Returns the current date. Externalized for better test support.
+     * 
+     * @return the current date
+     */
+    Date getCurrentDate() {
+        return new Date();
+    }
+
+    /**
+     * Returns the smpp configuration
+     * 
+     * @return the configuration
+     */
+    public SmppConfiguration getConfiguration() {
+        return configuration;
+    }
+
+    /**
+     * Set the smpp configuration.
+     * 
+     * @param configuration smppConfiguration
+     */
+    public void setConfiguration(SmppConfiguration configuration) {
+        this.configuration = configuration;
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java (added)
+++ camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.net.URI;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.util.IntrospectionSupport;
+
+/**
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppComponent extends DefaultComponent {
+
+    private SmppConfiguration configuration;
+
+    public SmppComponent() {
+    }
+
+    public SmppComponent(SmppConfiguration configuration) {
+        this.configuration = configuration;
+    }
+
+    public SmppComponent(CamelContext context) {
+        super(context);
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception {
+        if (this.configuration == null) {
+            this.configuration = new SmppConfiguration();
+        }
+
+        // create a copy of the configuration as other endpoints can adjust their copy as well
+        SmppConfiguration config = this.configuration.copy();
+
+        config.configureFromURI(new URI(uri));
+        if (getCamelContext() != null) {
+            IntrospectionSupport.setProperties(getCamelContext().getTypeConverter(), config, parameters);
+        } else {
+            IntrospectionSupport.setProperties(config, parameters);
+        }
+
+        return createEndpoint(uri, config);
+    }
+
+    /**
+     * Create a new smpp endpoint with the provided smpp configuration
+     */
+    protected Endpoint createEndpoint(SmppConfiguration config) throws Exception {
+        return createEndpoint(null, config);
+    }
+
+    /**
+     * Create a new smpp endpoint with the provided uri and smpp configuration
+     */
+    protected Endpoint createEndpoint(String uri, SmppConfiguration config) throws Exception {
+        return new SmppEndpoint(uri, this, config);
+    }
+
+    public SmppConfiguration getConfiguration() {
+        return configuration;
+    }
+
+    public void setConfiguration(SmppConfiguration configuration) {
+        this.configuration = configuration;
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppComponent.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java (added)
+++ camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,259 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.net.URI;
+
+import org.apache.camel.RuntimeCamelException;
+import org.jsmpp.bean.NumberingPlanIndicator;
+import org.jsmpp.bean.SMSCDeliveryReceipt;
+import org.jsmpp.bean.TypeOfNumber;
+
+/**
+ * Contains the SMPP component configuration properties&lt;/a&gt;
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppConfiguration implements Cloneable {
+
+    private String host = "localhost";
+    private Integer port = new Integer(2775);
+    private String systemId = "smppclient";
+    private String password = "password";
+    private String systemType = "cp";
+    private String encoding = "ISO-8859-1";
+    private Integer enquireLinkTimer = new Integer(5000);
+    private Integer transactionTimer = new Integer(10000);
+    private byte registeredDelivery = SMSCDeliveryReceipt.SUCCESS_FAILURE
+            .value();
+    private String serviceType = "CMT";
+    private String sourceAddr = "1616";
+    private String destAddr = "1717";
+    private byte sourceAddrTon = TypeOfNumber.UNKNOWN.value();
+    private byte destAddrTon = TypeOfNumber.UNKNOWN.value();
+    private byte sourceAddrNpi = NumberingPlanIndicator.UNKNOWN.value();
+    private byte destAddrNpi = NumberingPlanIndicator.UNKNOWN.value();
+    private byte protocolId = (byte) 0;
+    private byte priorityFlag = (byte) 1;
+    private byte replaceIfPresentFlag = (byte) 0;
+    private byte typeOfNumber = TypeOfNumber.UNKNOWN.value();
+    private byte numberingPlanIndicator = NumberingPlanIndicator.UNKNOWN.value();
+
+    /**
+     * A POJO which contains all necessary configuration parameters for the SMPP connection
+     * 
+     * @param uri the full URI of the endpoint
+     */
+    public void configureFromURI(URI uri) {
+        setSystemId(uri.getUserInfo());
+        setHost(uri.getHost());
+        setPort(uri.getPort());
+    }
+
+    public SmppConfiguration copy() {
+        try {
+            return (SmppConfiguration) clone();
+        } catch (CloneNotSupportedException e) {
+            throw new RuntimeCamelException(e);
+        }
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public Integer getPort() {
+        return port;
+    }
+
+    public void setPort(Integer port) {
+        this.port = port;
+    }
+
+    public String getSystemId() {
+        return systemId;
+    }
+
+    public void setSystemId(String systemId) {
+        this.systemId = systemId;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+    
+    public String getEncoding() {
+        return encoding;
+    }
+
+    public void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public Integer getEnquireLinkTimer() {
+        return enquireLinkTimer;
+    }
+
+    public void setEnquireLinkTimer(Integer enquireLinkTimer) {
+        this.enquireLinkTimer = enquireLinkTimer;
+    }
+
+    public Integer getTransactionTimer() {
+        return transactionTimer;
+    }
+
+    public void setTransactionTimer(Integer transactionTimer) {
+        this.transactionTimer = transactionTimer;
+    }
+
+    public String getSystemType() {
+        return systemType;
+    }
+
+    public void setSystemType(String systemType) {
+        this.systemType = systemType;
+    }
+
+    public byte getRegisteredDelivery() {
+        return registeredDelivery;
+    }
+
+    public void setRegisteredDelivery(byte registeredDelivery) {
+        this.registeredDelivery = registeredDelivery;
+    }
+
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    public byte getSourceAddrTon() {
+        return sourceAddrTon;
+    }
+
+    public void setSourceAddrTon(byte sourceAddrTon) {
+        this.sourceAddrTon = sourceAddrTon;
+    }
+
+    public byte getDestAddrTon() {
+        return destAddrTon;
+    }
+
+    public void setDestAddrTon(byte destAddrTon) {
+        this.destAddrTon = destAddrTon;
+    }
+
+    public byte getSourceAddrNpi() {
+        return sourceAddrNpi;
+    }
+
+    public void setSourceAddrNpi(byte sourceAddrNpi) {
+        this.sourceAddrNpi = sourceAddrNpi;
+    }
+
+    public byte getDestAddrNpi() {
+        return destAddrNpi;
+    }
+
+    public void setDestAddrNpi(byte destAddrNpi) {
+        this.destAddrNpi = destAddrNpi;
+    }
+
+    public byte getProtocolId() {
+        return protocolId;
+    }
+
+    public void setProtocolId(byte protocolId) {
+        this.protocolId = protocolId;
+    }
+
+    public byte getPriorityFlag() {
+        return priorityFlag;
+    }
+
+    public void setPriorityFlag(byte priorityFlag) {
+        this.priorityFlag = priorityFlag;
+    }
+
+    public byte getReplaceIfPresentFlag() {
+        return replaceIfPresentFlag;
+    }
+
+    public void setReplaceIfPresentFlag(byte replaceIfPresentFlag) {
+        this.replaceIfPresentFlag = replaceIfPresentFlag;
+    }
+
+    public String getSourceAddr() {
+        return sourceAddr;
+    }
+
+    public void setSourceAddr(String sourceAddr) {
+        this.sourceAddr = sourceAddr;
+    }
+
+    public String getDestAddr() {
+        return destAddr;
+    }
+
+    public void setDestAddr(String destAddr) {
+        this.destAddr = destAddr;
+    }
+    
+    public byte getTypeOfNumber() {
+        return typeOfNumber;
+    }
+
+    public void setTypeOfNumber(byte typeOfNumber) {
+        this.typeOfNumber = typeOfNumber;
+    }
+
+    public byte getNumberingPlanIndicator() {
+        return numberingPlanIndicator;
+    }
+
+    public void setNumberingPlanIndicator(byte numberingPlanIndicator) {
+        this.numberingPlanIndicator = numberingPlanIndicator;
+    }
+
+    @Override
+    public String toString() {
+        return "SmppConfiguration[" + "enquireLinkTimer=" + enquireLinkTimer
+                + ", host=" + host + ", password=" + password + ", port="
+                + port + ", systemId=" + systemId + ", systemType="
+                + systemType + ", transactionTimer=" + transactionTimer
+                + ", registeredDelivery=" + registeredDelivery
+                + ", serviceType=" + serviceType + ", sourceAddrTon="
+                + sourceAddrTon + ", destAddrTon=" + destAddrTon
+                + ", sourceAddrNpi=" + sourceAddrNpi + ", destAddrNpi="
+                + destAddrNpi + ", protocolId=" + protocolId
+                + ", priorityFlag=" + priorityFlag + ", replaceIfPresentFlag="
+                + replaceIfPresentFlag + ", sourceAddr=" + sourceAddr 
+                + ", destAddr=" + destAddr + "]";
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConfiguration.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java (added)
+++ camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,157 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.impl.DefaultConsumer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jsmpp.bean.AlertNotification;
+import org.jsmpp.bean.BindType;
+import org.jsmpp.bean.DeliverSm;
+import org.jsmpp.bean.NumberingPlanIndicator;
+import org.jsmpp.bean.TypeOfNumber;
+import org.jsmpp.session.BindParameter;
+import org.jsmpp.session.MessageReceiverListener;
+import org.jsmpp.session.SMPPSession;
+
+/**
+ * An implementation of @{link Consumer} which use the SMPP protocol
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppConsumer extends DefaultConsumer {
+
+    private static final transient Log LOG = LogFactory.getLog(SmppConsumer.class);
+
+    private SmppConfiguration configuration;
+    private SMPPSession session;
+
+    /**
+     * The constructor which gets a smpp endpoint, a smpp configuration and a processor
+     */
+    public SmppConsumer(SmppEndpoint endpoint, SmppConfiguration configuration, Processor processor) {
+        super(endpoint, processor);
+        this.configuration = configuration;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Connecting to: " + getEndpoint().getConnectionString() + "...");
+        }
+
+        super.doStart();
+
+        session = createSMPPSession();
+        session.setEnquireLinkTimer(this.configuration.getEnquireLinkTimer());
+        session.setTransactionTimer(this.configuration.getTransactionTimer());
+        session.setMessageReceiverListener(new MessageReceiverListener() {
+            public void onAcceptAlertNotification(AlertNotification alertNotification) {
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Received an alertNotification " + alertNotification);
+                }
+
+                try {
+                    Exchange exchange = getEndpoint().createOnAcceptAlertNotificationExchange(alertNotification);
+
+                    LOG.trace("Processing the new smpp exchange...");
+                    getProcessor().process(exchange);
+                    LOG.trace("Processed the new smpp exchange");
+                } catch (Exception e) {
+                    getExceptionHandler().handleException(e);
+                }
+            }
+
+            public void onAcceptDeliverSm(DeliverSm deliverSm) {
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Received a deliverSm " + deliverSm);
+                }
+
+                try {
+                    Exchange exchange = getEndpoint().createOnAcceptDeliverSmExchange(deliverSm);
+
+                    LOG.trace("processing the new smpp exchange...");
+                    getProcessor().process(exchange);
+                    LOG.trace("processed the new smpp exchange");
+                } catch (Exception e) {
+                    getExceptionHandler().handleException(e);
+                }
+            }
+
+        });
+
+        session.connectAndBind(
+                this.configuration.getHost(),
+                this.configuration.getPort(),
+                new BindParameter(
+                        BindType.BIND_RX,
+                        this.configuration.getSystemId(),
+                        this.configuration.getPassword(),
+                        this.configuration.getSystemType(),
+                        TypeOfNumber.UNKNOWN,
+                        NumberingPlanIndicator.UNKNOWN,
+                        ""));
+
+        LOG.info("Connected to: " + getEndpoint().getConnectionString());
+    }
+
+    /**
+     * Factory method to easily instantiate a mock SMPPSession
+     * 
+     * @return the SMPPSession
+     */
+    SMPPSession createSMPPSession() {
+        return new SMPPSession();
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        LOG.debug("Disconnecting from: " + getEndpoint().getConnectionString() + "...");
+
+        super.doStop();
+
+        if (session != null) {
+            session.close();
+            session = null;
+        }
+
+        LOG.info("Disconnected from: " + getEndpoint().getConnectionString());
+    }
+
+    @Override
+    public String toString() {
+        return "SmppConsumer[" + getEndpoint().getConnectionString() + "]";
+    }
+
+    @Override
+    public SmppEndpoint getEndpoint() {
+        return (SmppEndpoint) super.getEndpoint();
+    }
+
+    /**
+     * Returns the smpp configuration
+     * 
+     * @return the configuration
+     */
+    public SmppConfiguration getConfiguration() {
+        return configuration;
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java (added)
+++ camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,156 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jsmpp.bean.AlertNotification;
+import org.jsmpp.bean.DeliverSm;
+
+/**
+ * A SMPP Endpoint
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppEndpoint extends DefaultEndpoint {
+
+    private static final transient Log LOG = LogFactory.getLog(SmppEndpoint.class);
+
+    private SmppBinding binding;
+    private SmppConfiguration configuration;
+
+    public SmppEndpoint(String endpointUri, Component component, SmppConfiguration configuration) {
+        super(endpointUri, component);
+        this.configuration = configuration;
+    }
+
+    public boolean isSingleton() {
+        return true;
+    }
+    
+    @Override
+    protected String createEndpointUri() {
+        return getConnectionString();
+    }
+    
+    @Override
+    public boolean isLenientProperties() {
+        return true;
+    }
+
+    public Consumer createConsumer(Processor processor) throws Exception {
+        return new SmppConsumer(this, configuration, processor);
+    }
+
+    public Producer createProducer() throws Exception {
+        return new SmppProducer(this, configuration);
+    }
+
+    /**
+     * Create a new exchange for communicating with this endpoint from a SMSC
+     *
+     * @param alertNotification the received message from the SMSC
+     * @return a new exchange
+     */
+    public Exchange createOnAcceptAlertNotificationExchange(AlertNotification alertNotification) {
+        return createOnAcceptAlertNotificationExchange(getExchangePattern(), alertNotification);
+    }
+    
+    /**
+     * Create a new exchange for communicating with this endpoint from a SMSC
+     * with the specified {@link ExchangePattern} such as whether its going
+     * to be an {@link ExchangePattern#InOnly} or {@link ExchangePattern#InOut} exchange
+     *
+     * @param exchangePattern the message exchange pattern for the exchange
+     * @param alertNotification the received message from the SMSC
+     * @return a new exchange
+     */
+    public Exchange createOnAcceptAlertNotificationExchange(ExchangePattern exchangePattern,
+                                                            AlertNotification alertNotification) {
+        Exchange exchange = createExchange(exchangePattern);
+        exchange.setProperty(Exchange.BINDING, getBinding());
+        exchange.setIn(getBinding().createSmppMessage(alertNotification));
+        return exchange;
+    }
+
+    /**
+     * Create a new exchange for communicating with this endpoint from a SMSC
+     *
+     * @param deliverSm the received message from the SMSC
+     * @return a new exchange
+     */
+    public Exchange createOnAcceptDeliverSmExchange(DeliverSm deliverSm) throws Exception {
+        return createOnAcceptDeliverSmExchange(getExchangePattern(), deliverSm);
+    }
+    
+    /**
+     * Create a new exchange for communicating with this endpoint from a SMSC
+     * with the specified {@link ExchangePattern} such as whether its going
+     * to be an {@link ExchangePattern#InOnly} or {@link ExchangePattern#InOut} exchange
+     *
+     * @param exchangePattern the message exchange pattern for the exchange
+     * @param deliverSm the received message from the SMSC
+     * @return a new exchange
+     */
+    public Exchange createOnAcceptDeliverSmExchange(ExchangePattern exchangePattern,
+                                                    DeliverSm deliverSm) throws Exception {
+        Exchange exchange = createExchange(exchangePattern);
+        exchange.setProperty(Exchange.BINDING, getBinding());
+        exchange.setIn(getBinding().createSmppMessage(deliverSm));
+        return exchange;
+    }
+
+    /**
+     * Returns the connection string for the current connection which has the form:
+     * smpp://&lt;user&gt;@&lt;host&gt;:&lt;port&gt;
+     * 
+     * @return the connection string
+     */
+    public String getConnectionString() {
+        return "smpp://" + getConfiguration().getSystemId() + "@"
+                + getConfiguration().getHost() + ":"
+                + getConfiguration().getPort();
+    }
+
+    /**
+     * Returns the smpp configuration
+     * 
+     * @return the configuration
+     */
+    public SmppConfiguration getConfiguration() {
+        return configuration;
+    }
+
+    public SmppBinding getBinding() {
+        if (binding == null) {
+            binding = new SmppBinding(getConfiguration());
+        }
+        return binding;
+    }
+
+    public void setBinding(SmppBinding binding) {
+        this.binding = binding;
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppMessage.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppMessage.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppMessage.java (added)
+++ camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppMessage.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,84 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.io.UnsupportedEncodingException;
+
+import org.apache.camel.impl.DefaultMessage;
+import org.jsmpp.bean.AlertNotification;
+import org.jsmpp.bean.Command;
+import org.jsmpp.bean.DeliverSm;
+import org.jsmpp.bean.MessageRequest;
+
+/**
+ * Represents a {@link org.apache.camel.Message} for working with SMPP
+ * 
+ * @author muellerc
+ * @version $Revision$
+ */
+public class SmppMessage extends DefaultMessage {
+
+    private Command command;
+    
+    public SmppMessage() {
+    }
+
+    public SmppMessage(AlertNotification command) {
+        this.command = command;
+    }
+    
+    public SmppMessage(DeliverSm command) {
+        this.command = command;
+    }
+
+    @Override
+    public SmppMessage newInstance() {
+        return new SmppMessage();
+    }
+
+    @Override
+    protected Object createBody() {
+        if (command instanceof MessageRequest) {
+            byte[] shortMessage = ((MessageRequest) command).getShortMessage();
+            try {
+                return new String(shortMessage, "ISO-8859-1");
+            } catch (UnsupportedEncodingException e) {
+                return new String(shortMessage);
+            }
+        }
+
+        return null;
+    }
+
+    @Override
+    public String toString() {
+        if (command != null) {
+            return "SmppMessage: " + command;
+        } else {
+            return "SmppMessage: " + getBody();
+        }
+    }
+
+    /**
+     * Returns the underlying jSMPP command
+     * 
+     * @return command
+     */
+    public Command getCommand() {
+        return command;
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppMessage.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppProducer.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppProducer.java (added)
+++ camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppProducer.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,188 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.io.IOException;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultProducer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jsmpp.InvalidResponseException;
+import org.jsmpp.PDUException;
+import org.jsmpp.bean.Alphabet;
+import org.jsmpp.bean.BindType;
+import org.jsmpp.bean.ESMClass;
+import org.jsmpp.bean.GeneralDataCoding;
+import org.jsmpp.bean.MessageClass;
+import org.jsmpp.bean.NumberingPlanIndicator;
+import org.jsmpp.bean.RegisteredDelivery;
+import org.jsmpp.bean.SubmitSm;
+import org.jsmpp.bean.TypeOfNumber;
+import org.jsmpp.extra.NegativeResponseException;
+import org.jsmpp.extra.ResponseTimeoutException;
+import org.jsmpp.session.BindParameter;
+import org.jsmpp.session.SMPPSession;
+
+/**
+ * An implementation of @{link Producer} which use the SMPP protocol
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppProducer extends DefaultProducer {
+
+    private static final transient Log LOG = LogFactory.getLog(SmppProducer.class);
+
+    private SmppConfiguration configuration;
+    private SMPPSession session;
+
+    public SmppProducer(SmppEndpoint endpoint, SmppConfiguration configuration) {
+        super(endpoint);
+        this.configuration = configuration;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Connecting to: " + getEndpoint().getConnectionString() + "...");
+        }
+
+        super.doStart();
+
+        session = createSMPPSession();
+        session.setEnquireLinkTimer(this.configuration.getEnquireLinkTimer());
+        session.setTransactionTimer(this.configuration.getTransactionTimer());
+        session.connectAndBind(
+                this.configuration.getHost(),
+                this.configuration.getPort(),
+                new BindParameter(
+                        BindType.BIND_TX,
+                        this.configuration.getSystemId(),
+                        this.configuration.getPassword(), 
+                        this.configuration.getSystemType(),
+                        TypeOfNumber.valueOf(configuration.getTypeOfNumber()),
+                        NumberingPlanIndicator.valueOf(configuration.getNumberingPlanIndicator()),
+                        ""));
+
+        LOG.info("Connected to: " + getEndpoint().getConnectionString());
+    }
+    
+    /**
+     * Factory method to easily instantiate a mock SMPPSession
+     * 
+     * @return the SMPPSession
+     */
+    SMPPSession createSMPPSession() {
+        return new SMPPSession();
+    }
+
+    public void process(Exchange exchange) throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Sending a short message for exchange id '"
+                    + exchange.getExchangeId() + "'...");
+        }
+
+        SubmitSm submitSm = getEndpoint().getBinding().createSubmitSm(exchange);
+        String messageId;
+        try {
+            messageId = doProcess(submitSm);
+        } catch (Exception e) {
+            // TODO: Add some DEBUG logging that we retry one more time
+            doStop();
+            doStart();
+            
+            messageId = doProcess(submitSm);
+        }
+
+        LOG.info("Sent a short message for exchange id '"
+                + exchange.getExchangeId() + "' and received message id '"
+                + messageId + "'");
+
+        if (exchange.getPattern().isOutCapable()) {
+            exchange.getOut().setHeader(SmppBinding.ID, messageId);
+        } else {
+            exchange.getIn().setHeader(SmppBinding.ID, messageId);
+        }
+    }
+
+    private String doProcess(SubmitSm submitSm) throws PDUException,
+            ResponseTimeoutException, InvalidResponseException,
+            NegativeResponseException, IOException {
+
+        String messageId = session.submitShortMessage(
+                submitSm.getServiceType(), 
+                TypeOfNumber.valueOf(submitSm.getSourceAddrTon()),
+                NumberingPlanIndicator.valueOf(submitSm.getSourceAddrNpi()),
+                submitSm.getSourceAddr(),
+                TypeOfNumber.valueOf(submitSm.getDestAddrTon()),
+                NumberingPlanIndicator.valueOf(submitSm.getDestAddrNpi()),
+                submitSm.getDestAddress(),
+                new ESMClass(),
+                submitSm.getProtocolId(),
+                submitSm.getPriorityFlag(),
+                submitSm.getScheduleDeliveryTime(),
+                submitSm.getValidityPeriod(),
+                new RegisteredDelivery(submitSm.getRegisteredDelivery()),
+                submitSm.getReplaceIfPresent(),
+                new GeneralDataCoding(
+                        false,
+                        false,
+                        MessageClass.CLASS1,
+                        Alphabet.ALPHA_DEFAULT),
+                (byte) 0,
+                submitSm.getShortMessage());
+
+        return messageId;
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Disconnecting from: " + getEndpoint().getConnectionString() + "...");
+        }
+
+        super.doStop();
+
+        if (session != null) {
+            session.close();
+            session = null;
+        }
+
+        LOG.info("Disconnected from: " + getEndpoint().getConnectionString());
+    }
+
+    @Override
+    public SmppEndpoint getEndpoint() {
+        return (SmppEndpoint) super.getEndpoint();
+    }
+
+    /**
+     * Returns the smppConfiguration for this producer
+     * 
+     * @return the configuration
+     */
+    public SmppConfiguration getConfiguration() {
+        return configuration;
+    }
+
+    @Override
+    public String toString() {
+        return "SmppProducer[" + getEndpoint().getConnectionString() + "]";
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppProducer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/apache/camel/component/smpp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/apache/camel/component/smpp?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/apache/camel/component/smpp (added)
+++ camel/trunk/components/camel-smpp/src/main/resources/META-INF/services/org/apache/camel/component/smpp Tue Dec  8 09:07:14 2009
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+class=org.apache.camel.component.smpp.SmppComponent
\ No newline at end of file

Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,207 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.DefaultExchange;
+import org.jsmpp.bean.AlertNotification;
+import org.jsmpp.bean.DeliverSm;
+import org.jsmpp.bean.NumberingPlanIndicator;
+import org.jsmpp.bean.SubmitSm;
+import org.jsmpp.bean.TypeOfNumber;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+
+/**
+ * JUnit test class for &lt;code&gt;org.apache.camel.component.smpp.SmppBinding&lt;/code&gt;
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppBindingTest {
+    
+    private SmppBinding binding;
+
+    @Before
+    public void setUp() {
+        binding = new SmppBinding() {
+            Date getCurrentDate() {
+                return new Date(1251666387000L);
+            }
+        };
+    }
+
+    @Test
+    public void emptyConstructorShouldSetTheSmppConfiguration() {
+        assertNotNull(binding.getConfiguration());
+    }
+
+    @Test
+    public void constructorSmppConfigurationShouldSetTheSmppConfiguration() {
+        SmppConfiguration configuration = new SmppConfiguration();
+        binding = new SmppBinding(configuration);
+        
+        assertSame(configuration, binding.getConfiguration());
+    }
+
+    @Test
+    public void createSubmitSmShouldCreateASubmitSmFromDefaults() throws UnsupportedEncodingException {
+        Exchange exchange = new DefaultExchange(new DefaultCamelContext());
+        exchange.getIn().setBody("Hello SMPP world!");
+        SubmitSm submitSm = binding.createSubmitSm(exchange);
+        
+        assertEquals("Hello SMPP world!", new String(submitSm.getShortMessage()));
+        assertEquals("1717", submitSm.getDestAddress());
+        assertEquals(0x00, submitSm.getDestAddrNpi());
+        assertEquals(0x00, submitSm.getDestAddrTon());
+        assertEquals(0x01, submitSm.getPriorityFlag());
+        assertEquals(0x00, submitSm.getProtocolId());
+        assertEquals(0x01, submitSm.getRegisteredDelivery());
+        assertEquals(0x00, submitSm.getReplaceIfPresent());
+        assertEquals("090830230627004+", submitSm.getScheduleDeliveryTime());
+        assertEquals("CMT", submitSm.getServiceType());
+        assertEquals("1616", submitSm.getSourceAddr());
+        assertEquals(0x00, submitSm.getSourceAddrNpi());
+        assertEquals(0x00, submitSm.getSourceAddrTon());
+        assertNull(submitSm.getValidityPeriod());
+        // not relevant
+        //assertEquals(0, submitSm.getCommandId());
+        //assertEquals(0, submitSm.getCommandStatus());
+        //assertEquals(0, submitSm.getSequenceNumber());
+    }
+    
+    @Test
+    public void createSubmitSmShouldCreateASubmitSmFromHeaders() throws UnsupportedEncodingException {
+        Exchange exchange = new DefaultExchange(new DefaultCamelContext());
+        exchange.getIn().setBody("Hello SMPP world!");
+        exchange.getIn().setHeader(SmppBinding.DEST_ADDR, "1919");
+        exchange.getIn().setHeader(SmppBinding.DEST_ADDR_NPI, NumberingPlanIndicator.NATIONAL.value());
+        exchange.getIn().setHeader(SmppBinding.DEST_ADDR_TON, TypeOfNumber.NATIONAL.value());
+        exchange.getIn().setHeader(SmppBinding.PRIORITY_FLAG, (byte) 0);
+        exchange.getIn().setHeader(SmppBinding.PROTOCOL_ID, (byte) 1);
+        exchange.getIn().setHeader(SmppBinding.REGISTERED_DELIVERY, (byte) 0);
+        exchange.getIn().setHeader(SmppBinding.REPLACE_IF_PRESENT_FLAG, (byte) 1);
+        exchange.getIn().setHeader(SmppBinding.SCHEDULE_DELIVERY_TIME, new Date(1251753000000L));
+        exchange.getIn().setHeader(SmppBinding.SERVICE_TYPE, "XXX");
+        exchange.getIn().setHeader(SmppBinding.VALIDITY_PERIOD, new Date(1251753600000L));
+        exchange.getIn().setHeader(SmppBinding.SOURCE_ADDR, "1818");
+        exchange.getIn().setHeader(SmppBinding.SOURCE_ADDR_NPI, NumberingPlanIndicator.NATIONAL.value());
+        exchange.getIn().setHeader(SmppBinding.SOURCE_ADDR_TON, TypeOfNumber.NATIONAL.value());
+        SubmitSm submitSm = binding.createSubmitSm(exchange);
+        
+        assertEquals("Hello SMPP world!", new String(submitSm.getShortMessage()));
+        assertEquals("1919", submitSm.getDestAddress());
+        assertEquals(0x08, submitSm.getDestAddrNpi());
+        assertEquals(0x02, submitSm.getDestAddrTon());
+        assertEquals(0x00, submitSm.getPriorityFlag());
+        assertEquals(0x01, submitSm.getProtocolId());
+        assertEquals(0x00, submitSm.getRegisteredDelivery());
+        assertEquals(0x01, submitSm.getReplaceIfPresent());
+        assertEquals("090831231000004+", submitSm.getScheduleDeliveryTime());
+        assertEquals("XXX", submitSm.getServiceType());
+        assertEquals("1818", submitSm.getSourceAddr());
+        assertEquals(0x08, submitSm.getSourceAddrNpi());
+        assertEquals(0x02, submitSm.getSourceAddrTon());
+        assertEquals("090831232000004+", submitSm.getValidityPeriod());
+        // not relevant
+        //assertEquals(0, submitSm.getCommandId());
+        //assertEquals(0, submitSm.getCommandStatus());
+        //assertEquals(0, submitSm.getSequenceNumber());
+    }
+
+    @Test
+    public void createSmppMessageFromAlertNotificationShouldReturnASmppMessage() {
+        AlertNotification alertNotification = new AlertNotification();
+        alertNotification.setCommandId(1);
+        alertNotification.setSequenceNumber(1);
+        alertNotification.setSourceAddr("1616");
+        alertNotification.setSourceAddrNpi(NumberingPlanIndicator.NATIONAL.value());
+        alertNotification.setSourceAddrTon(TypeOfNumber.NATIONAL.value());
+        alertNotification.setEsmeAddr("1717");
+        alertNotification.setEsmeAddrNpi(NumberingPlanIndicator.NATIONAL.value());
+        alertNotification.setEsmeAddrTon(TypeOfNumber.NATIONAL.value());
+        SmppMessage smppMessage = binding.createSmppMessage(alertNotification);
+        
+        assertNull(smppMessage.getBody());
+        assertEquals(9, smppMessage.getHeaders().size());
+        assertEquals(1, smppMessage.getHeader(SmppBinding.SEQUENCE_NUMBER));
+        assertEquals(1, smppMessage.getHeader(SmppBinding.COMMAND_ID));
+        assertEquals(0, smppMessage.getHeader(SmppBinding.COMMAND_STATUS));
+        assertEquals("1616", smppMessage.getHeader(SmppBinding.SOURCE_ADDR));
+        assertEquals((byte) 8, smppMessage.getHeader(SmppBinding.SOURCE_ADDR_NPI));
+        assertEquals((byte) 8, smppMessage.getHeader(SmppBinding.SOURCE_ADDR_TON));
+        assertEquals("1717", smppMessage.getHeader(SmppBinding.ESME_ADDR));
+        assertEquals((byte) 8, smppMessage.getHeader(SmppBinding.ESME_ADDR_NPI));
+        assertEquals((byte) 8, smppMessage.getHeader(SmppBinding.ESME_ADDR_TON));
+    }
+
+    @Test
+    public void createSmppMessageFromDeliveryReceiptShouldReturnASmppMessage() throws Exception {
+        DeliverSm deliverSm = new DeliverSm();
+        deliverSm.setSmscDeliveryReceipt();
+        deliverSm.setShortMessage("id:2 sub:001 dlvrd:001 submit date:0908312310 done date:0908312311 stat:DELIVRD err:xxx Text:Hello SMPP world!".getBytes());
+        SmppMessage smppMessage = binding.createSmppMessage(deliverSm);
+        
+        assertEquals("Hello SMPP world!", smppMessage.getBody());
+        assertEquals(6, smppMessage.getHeaders().size());
+        assertEquals("2", smppMessage.getHeader(SmppBinding.ID));
+        assertEquals(1, smppMessage.getHeader(SmppBinding.DELIVERED));
+        assertEquals(new Date(1251753060000L), smppMessage.getHeader(SmppBinding.DONE_DATE));
+        assertEquals("xxx", smppMessage.getHeader(SmppBinding.ERROR));
+        assertEquals(new Date(1251753000000L), smppMessage.getHeader(SmppBinding.SUBMIT_DATE));
+        assertEquals(1, smppMessage.getHeader(SmppBinding.SUBMITTED));
+    }
+    
+    @Test
+    public void createSmppMessageFromDeliverSmShouldReturnASmppMessage() throws Exception {
+        DeliverSm deliverSm = new DeliverSm();
+        deliverSm.setShortMessage("Hello SMPP world!".getBytes());
+        deliverSm.setSequenceNumber(1);
+        deliverSm.setCommandId(1);
+        deliverSm.setSourceAddr("1818");
+        deliverSm.setDestAddress("1919");
+        deliverSm.setScheduleDeliveryTime("090831230627004+");
+        deliverSm.setValidityPeriod("090901230627004+");
+        SmppMessage smppMessage = binding.createSmppMessage(deliverSm);
+        
+        assertEquals("Hello SMPP world!", smppMessage.getBody());
+        assertEquals(6, smppMessage.getHeaders().size());
+        assertEquals(1, smppMessage.getHeader(SmppBinding.SEQUENCE_NUMBER));
+        assertEquals(1, smppMessage.getHeader(SmppBinding.COMMAND_ID));
+        assertEquals("1818", smppMessage.getHeader(SmppBinding.SOURCE_ADDR));
+        assertEquals("1919", smppMessage.getHeader(SmppBinding.DEST_ADDR));
+        assertEquals("090831230627004+", smppMessage.getHeader(SmppBinding.SCHEDULE_DELIVERY_TIME));
+        assertEquals("090901230627004+", smppMessage.getHeader(SmppBinding.VALIDITY_PERIOD));
+    }
+
+    @Test
+    public void getterShouldReturnTheSetValues() {
+        SmppConfiguration configuration = new SmppConfiguration();
+        binding.setConfiguration(configuration);
+        
+        assertSame(configuration, binding.getConfiguration());
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,143 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * JUnit test class for &lt;code&gt;org.apache.camel.component.smpp.SmppComponent&lt;/code&gt;
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppComponentTest {
+    
+    private SmppComponent component;
+
+    @Before
+    public void setUp() {
+        component = new SmppComponent();
+    }
+
+    @Test
+    public void constructorSmppConfigurationShouldSetTheConfiguration() {
+        SmppConfiguration configuration = new SmppConfiguration();
+        component = new SmppComponent(configuration);
+        
+        assertSame(configuration, component.getConfiguration());
+    }
+
+    @Test
+    public void constructorCamelContextShouldSetTheContext() {
+        CamelContext context = new DefaultCamelContext();
+        component = new SmppComponent(context);
+        
+        assertSame(context, component.getCamelContext());
+    }
+
+    @Test
+    public void createEndpointStringStringMapShouldReturnASmppEndpoint() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        component = new SmppComponent(context);
+        Map&lt;String, String&gt; parameters = new HashMap&lt;String, String&gt;();
+        parameters.put("password", "secret");
+        Endpoint endpoint = component.createEndpoint("smpp://smppclient@localhost:2775", "?password=secret", parameters);
+        SmppEndpoint smppEndpoint = (SmppEndpoint) endpoint;
+        
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getEndpointUri());
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getEndpointKey());
+        assertSame(component, smppEndpoint.getComponent());
+        assertNotNull(smppEndpoint.getConfiguration());
+        assertEquals("secret", smppEndpoint.getConfiguration().getPassword());
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getConnectionString());
+        assertEquals(ExchangePattern.InOnly, smppEndpoint.getExchangePattern());
+        assertTrue(smppEndpoint.getBinding() instanceof SmppBinding);
+        assertNotNull(smppEndpoint.getCamelContext());
+    }
+    
+    @Test
+    public void createEndpointStringStringMapWithoutACamelContextShouldReturnASmppEndpoint() throws Exception {
+        Map&lt;String, String&gt; parameters = new HashMap&lt;String, String&gt;();
+        parameters.put("password", "secret");
+        Endpoint endpoint = component.createEndpoint("smpp://smppclient@localhost:2775", "?password=secret", parameters);
+        SmppEndpoint smppEndpoint = (SmppEndpoint) endpoint;
+        
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getEndpointUri());
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getEndpointKey());
+        assertSame(component, smppEndpoint.getComponent());
+        assertNotNull(smppEndpoint.getConfiguration());
+        assertEquals("secret", smppEndpoint.getConfiguration().getPassword());
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getConnectionString());
+        assertEquals(ExchangePattern.InOnly, smppEndpoint.getExchangePattern());
+        assertTrue(smppEndpoint.getBinding() instanceof SmppBinding);
+        assertNull(smppEndpoint.getCamelContext());
+    }
+
+    @Test
+    public void createEndpointSmppConfigurationShouldReturnASmppEndpoint() throws Exception {
+        SmppConfiguration configuration = new SmppConfiguration();
+        Endpoint endpoint = component.createEndpoint(configuration);
+        SmppEndpoint smppEndpoint = (SmppEndpoint) endpoint;
+        
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getEndpointUri());
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getEndpointKey());
+        assertSame(component, smppEndpoint.getComponent());
+        assertSame(configuration, smppEndpoint.getConfiguration());
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getConnectionString());
+        assertEquals(ExchangePattern.InOnly, smppEndpoint.getExchangePattern());
+        assertTrue(smppEndpoint.getBinding() instanceof SmppBinding);
+        assertNull(smppEndpoint.getCamelContext());
+    }
+
+    @Test
+    public void createEndpointStringSmppConfigurationShouldReturnASmppEndpoint() throws Exception {
+        SmppConfiguration configuration = new SmppConfiguration();
+        Endpoint endpoint = component.createEndpoint("smpp://smppclient@localhost:2775?password=password", configuration);
+        SmppEndpoint smppEndpoint = (SmppEndpoint) endpoint;
+        
+        assertEquals("smpp://smppclient@localhost:2775?password=password", smppEndpoint.getEndpointUri());
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getEndpointKey());
+        assertSame(component, smppEndpoint.getComponent());
+        assertSame(configuration, smppEndpoint.getConfiguration());
+        assertEquals("smpp://smppclient@localhost:2775", smppEndpoint.getConnectionString());
+        assertEquals(ExchangePattern.InOnly, smppEndpoint.getExchangePattern());
+        assertTrue(smppEndpoint.getBinding() instanceof SmppBinding);
+        assertNull(smppEndpoint.getCamelContext());
+    }
+
+    @Test
+    public void getterShouldReturnTheSetValues() {
+        SmppConfiguration configuration = new SmppConfiguration();
+        component.setConfiguration(configuration);
+        
+        assertSame(configuration, component.getConfiguration());
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java?rev=888296&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java (added)
+++ camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java Tue Dec  8 09:07:14 2009
@@ -0,0 +1,157 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.smpp;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.jsmpp.bean.NumberingPlanIndicator;
+import org.jsmpp.bean.SMSCDeliveryReceipt;
+import org.jsmpp.bean.TypeOfNumber;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * JUnit test class for &lt;code&gt;org.apache.camel.component.smpp.SmppConfiguration&lt;/code&gt;
+ * 
+ * @version $Revision$
+ * @author muellerc
+ */
+public class SmppConfigurationTest {
+    
+    private SmppConfiguration configuration;
+
+    @Before
+    public void setUp() {
+        configuration = new SmppConfiguration();
+    }
+
+    @Test
+    public void getterShouldReturnTheDefaultValues() {
+        assertEquals("1717", configuration.getDestAddr());
+        assertEquals(0x00, configuration.getDestAddrNpi());
+        assertEquals(0x00, configuration.getDestAddrTon());
+        assertEquals(new Integer(5000), configuration.getEnquireLinkTimer());
+        assertEquals("localhost", configuration.getHost());
+        assertEquals("password", configuration.getPassword());
+        assertEquals(new Integer(2775), configuration.getPort());
+        assertEquals(0x01, configuration.getPriorityFlag());
+        assertEquals(0x00, configuration.getProtocolId());
+        assertEquals(0x01, configuration.getRegisteredDelivery());
+        assertEquals(0x00, configuration.getReplaceIfPresentFlag());
+        assertEquals("CMT", configuration.getServiceType());
+        assertEquals("1616", configuration.getSourceAddr());
+        assertEquals(0x00, configuration.getSourceAddrNpi());
+        assertEquals(0x00, configuration.getSourceAddrTon());
+        assertEquals("smppclient", configuration.getSystemId());
+        assertEquals("cp", configuration.getSystemType());
+        assertEquals(new Integer(10000), configuration.getTransactionTimer());
+        assertEquals("ISO-8859-1", configuration.getEncoding());
+        assertEquals(0x00, configuration.getNumberingPlanIndicator());
+        assertEquals(0x00, configuration.getTypeOfNumber());
+    }
+    
+    @Test
+    public void getterShouldReturnTheSetValues() {
+        setNoneDefaultValues(configuration);
+        
+        assertEquals("1919", configuration.getDestAddr());
+        assertEquals(0x08, configuration.getDestAddrNpi());
+        assertEquals(0x02, configuration.getDestAddrTon());
+        assertEquals(new Integer(5001), configuration.getEnquireLinkTimer());
+        assertEquals("127.0.0.1", configuration.getHost());
+        assertEquals("secret", configuration.getPassword());
+        assertEquals(new Integer(2776), configuration.getPort());
+        assertEquals(0x00, configuration.getPriorityFlag());
+        assertEquals(0x01, configuration.getProtocolId());
+        assertEquals(0x00, configuration.getRegisteredDelivery());
+        assertEquals(0x01, configuration.getReplaceIfPresentFlag());
+        assertEquals("XXX", configuration.getServiceType());
+        assertEquals("1818", configuration.getSourceAddr());
+        assertEquals(0x08, configuration.getSourceAddrNpi());
+        assertEquals(0x02, configuration.getSourceAddrTon());
+        assertEquals("client", configuration.getSystemId());
+        assertEquals("xx", configuration.getSystemType());
+        assertEquals(new Integer(10001), configuration.getTransactionTimer());
+        assertEquals("UTF-8", configuration.getEncoding());
+        assertEquals(0x08, configuration.getNumberingPlanIndicator());
+        assertEquals(0x02, configuration.getTypeOfNumber());
+    }
+
+    @Test
+    public void getterShouldReturnTheConfigureValuesFromURI() throws URISyntaxException {
+        configuration.configureFromURI(new URI("smpp://client@127.0.0.1:2776"));
+        
+        assertEquals("127.0.0.1", configuration.getHost());
+        assertEquals(new Integer(2776), configuration.getPort());
+        assertEquals("client", configuration.getSystemId());
+    }
+    
+    @Test
+    public void cloneShouldReturnAnEqualInstance() {
+        setNoneDefaultValues(configuration);
+        SmppConfiguration config = configuration.copy();
+        
+        assertEquals(config.getDestAddr(), configuration.getDestAddr());
+        assertEquals(config.getDestAddrNpi(), configuration.getDestAddrNpi());
+        assertEquals(config.getDestAddrTon(), configuration.getDestAddrTon());
+        assertEquals(config.getEnquireLinkTimer(), configuration.getEnquireLinkTimer());
+        assertEquals(config.getHost(), configuration.getHost());
+        assertEquals(config.getPassword(), configuration.getPassword());
+        assertEquals(config.getPort(), configuration.getPort());
+        assertEquals(config.getPriorityFlag(), configuration.getPriorityFlag());
+        assertEquals(config.getProtocolId(), configuration.getProtocolId());
+        assertEquals(config.getRegisteredDelivery(), configuration.getRegisteredDelivery());
+        assertEquals(config.getReplaceIfPresentFlag(), configuration.getReplaceIfPresentFlag());
+        assertEquals(config.getServiceType(), configuration.getServiceType());
+        assertEquals(config.getSourceAddr(), configuration.getSourceAddr());
+        assertEquals(config.getSourceAddrNpi(), configuration.getSourceAddrNpi());
+        assertEquals(config.getSourceAddrTon(), configuration.getSourceAddrTon());
+        assertEquals(config.getSystemId(), configuration.getSystemId());
+        assertEquals(config.getSystemType(), configuration.getSystemType());
+        assertEquals(config.getTransactionTimer(), configuration.getTransactionTimer());
+        assertEquals(config.getEncoding(), configuration.getEncoding());
+        assertEquals(config.getNumberingPlanIndicator(), configuration.getNumberingPlanIndicator());
+        assertEquals(config.getTypeOfNumber(), configuration.getTypeOfNumber());
+    }
+
+    private void setNoneDefaultValues(SmppConfiguration config) {
+        config.setDestAddr("1919");
+        config.setDestAddrNpi(NumberingPlanIndicator.NATIONAL.value());
+        config.setDestAddrTon(TypeOfNumber.NATIONAL.value());
+        config.setEnquireLinkTimer(new Integer(5001));
+        config.setHost("127.0.0.1");
+        config.setPassword("secret");
+        config.setPort(new Integer(2776));
+        config.setPriorityFlag((byte) 0);
+        config.setProtocolId((byte) 1);
+        config.setRegisteredDelivery(SMSCDeliveryReceipt.DEFAULT.value());
+        config.setReplaceIfPresentFlag((byte) 1);
+        config.setServiceType("XXX");
+        config.setSourceAddr("1818");
+        config.setSourceAddrNpi(NumberingPlanIndicator.NATIONAL.value());
+        config.setSourceAddrTon(TypeOfNumber.NATIONAL.value());
+        config.setSystemId("client");
+        config.setSystemType("xx");
+        config.setTransactionTimer(new Integer(10001));
+        config.setEncoding("UTF-8");
+        config.setNumberingPlanIndicator(NumberingPlanIndicator.NATIONAL.value());
+        config.setTypeOfNumber(TypeOfNumber.NATIONAL.value());
+    }
+}

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date




</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Camel 2.2.0 Release</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c813164657.1406.1260258780017.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c813164657-1406-1260258780017-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T07:53:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;Camel
2.2.0 Release&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h1&gt;&lt;a name="Camel2.2.0Release-Camel2.2.0release%28currentlyinprogress%29"&gt;&lt;/a&gt;Camel
2.2.0 release (currently in progress)&lt;/h1&gt;

&lt;div style="padding-right:20px;float:left;margin-left:-20px;"&gt;&lt;p&gt;&lt;img src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"
align="absmiddle" border="0" /&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div style="min-height:200px"&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-NewandNoteworthy"&gt;&lt;/a&gt;New and Noteworthy&lt;/h2&gt;

&lt;p&gt;Welcome to the 2.2.0 release which approx XXX issues resolved (new features, improvements
and bug fixes such as...)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Routing+Slip" title="Routing Slip"&gt;Routing
Slip&lt;/a&gt; now breaks when an exception occurred&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;MINA&lt;/a&gt; now
supports easier configuration of multiple custom codecs, which is needed when working with
SSL.&lt;/li&gt;
	&lt;li&gt;Improved &lt;a href="/confluence/display/CAMEL/TransactionErrorHandler" title="TransactionErrorHandler"&gt;TransactionErrorHandler&lt;/a&gt;
two fold by reducing complexity of internal logic in Camel when working with transactions.
And added better support for using multiple transactions in multiple routes. See more at section
&lt;em&gt;Using multiple routes with different propagation behaviors&lt;/em&gt; at &lt;a href="/confluence/display/CAMEL/Transactional+Client"
title="Transactional Client"&gt;Transactional Client&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Recipient+List" title="Recipient List"&gt;Recipient
List&lt;/a&gt; now supports &lt;tt&gt;parallelProcessing&lt;/tt&gt;, &lt;tt&gt;stopOnException&lt;/tt&gt;
and references for &lt;tt&gt;AggregationStrategy&lt;/tt&gt; and thread pools. This applies
to the &lt;tt&gt;@RecipientList&lt;/tt&gt; annotation as well.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
	&lt;li&gt;Cleanup of spring jar dependencies.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File
Language&lt;/a&gt; is now merged directly into &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language which among others makes &lt;a href="/confluence/display/CAMEL/Content+Based+Router"
title="Content Based Router"&gt;Content Based Router&lt;/a&gt; in Spring XML using file language
syntax easier.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewEnterpriseIntegrationPatterns"&gt;&lt;/a&gt;New
&lt;a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration
Patterns"&gt;Enterprise Integration Patterns&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewComponents"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Components"
title="Components"&gt;Components&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDSL"&gt;&lt;/a&gt;New DSL&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;markRollbackOnlyLast&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewAnnotations"&gt;&lt;/a&gt;New Annotations&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDataFormatsDataFormat"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Data+Format"
title="Data Format"&gt;Data Formats&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewLanguages"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Languages"
title="Languages"&gt;Languages&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewExamples"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Examples"
title="Examples"&gt;Examples&lt;/a&gt;&lt;/h3&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-APIbreaking"&gt;&lt;/a&gt;API breaking&lt;/h2&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-KnownIssues"&gt;&lt;/a&gt;Known Issues&lt;/h2&gt;

&lt;p&gt;See known issues from previous releases.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Importantchangestoconsiderwhenupgrading"&gt;&lt;/a&gt;Important
changes to consider when upgrading&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-Springjardependencieshavebeencutdownincamelcore."&gt;&lt;/a&gt;Spring
jar dependencies have been cut down in camel-core.&lt;/h3&gt;
&lt;p&gt;The &lt;tt&gt;pom.xml&lt;/tt&gt; file for &lt;b&gt;camel-core&lt;/b&gt; have cut
down number of spring jar dependencies to allow Camel to easily run without any Spring .jars
at all. However this affects you if you use maven and use camel-core without camel-spring
or spring at all. If you want to use JMX with Camel then you need to add the following 4 spring
jars required: &lt;tt&gt;spring-core.jar, spring-beans.jar, spring-context.jar, spring-aop.jar&lt;/tt&gt;.
With maven you only need to depend on &lt;tt&gt;spring-context&lt;/tt&gt; and &lt;tt&gt;spring-aop&lt;/tt&gt;
as they will bring in the other two jars.&lt;/p&gt;

&lt;p&gt;See also &lt;a href="/confluence/display/CAMEL/Camel+jar+dependencies" title="Camel
jar dependencies"&gt;Camel jar dependencies&lt;/a&gt; and &lt;a href="/confluence/display/CAMEL/Camel+JMX"
title="Camel JMX"&gt;Camel JMX&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-GettingtheDistributions"&gt;&lt;/a&gt;Getting the
Distributions&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-BinaryDistributions"&gt;&lt;/a&gt;Binary Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Windows Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip"
rel="nofollow"&gt;apache-camel-2.2.0.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Unix/Linux/Cygwin Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;The above
URLs use redirection&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The above URLs use the Apache Mirror system
to redirect you to a suitable mirror for your download. Some users have experienced issues
with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to
work for you from the above URL then try using &lt;a href="http://www.mozilla.com/en-US/firefox/"
rel="nofollow"&gt;FireFox&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SourceDistributions"&gt;&lt;/a&gt;Source Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Windows &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Unix/Linux/Cygwin &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-GettingtheBinariesusingMaven2"&gt;&lt;/a&gt;Getting
the Binaries using Maven 2&lt;/h3&gt;

&lt;p&gt;To use this release in your maven project, the proper dependency configuration that
you should use in your &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html"
rel="nofollow"&gt;Maven POM&lt;/a&gt; is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
&lt;span class="code-tag"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span
class="code-tag"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-core&lt;span class="code-tag"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class="code-tag"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SVNTagCheckout"&gt;&lt;/a&gt;SVN Tag Checkout&lt;/h3&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
svn co http:&lt;span class="code-comment"&gt;//svn.apache.org/repos/asf/camel/tags/camel-2.2.0&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Changelog"&gt;&lt;/a&gt;Changelog&lt;/h2&gt;

&lt;p&gt;For a more detailed view of new features and bug fixes, see the:&lt;br/&gt;
TODO: Fix for 2.2.0&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://issues.apache.org/activemq/secure/ReleaseNote.jspa?projectId=11020&amp;amp;styleName=Html&amp;amp;version=11900"
rel="nofollow"&gt;release notes for 2.2.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9011430&amp;revisedVersion=9&amp;originalVersion=8"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Camel 2.2.0 Release</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c554788859.1404.1260258720019.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c554788859-1404-1260258720019-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T07:52:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;Camel
2.2.0 Release&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h1&gt;&lt;a name="Camel2.2.0Release-Camel2.2.0release%28currentlyinprogress%29"&gt;&lt;/a&gt;Camel
2.2.0 release (currently in progress)&lt;/h1&gt;

&lt;div style="padding-right:20px;float:left;margin-left:-20px;"&gt;&lt;p&gt;&lt;img src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"
align="absmiddle" border="0" /&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div style="min-height:200px"&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-NewandNoteworthy"&gt;&lt;/a&gt;New and Noteworthy&lt;/h2&gt;

&lt;p&gt;Welcome to the 2.2.0 release which approx XXX issues resolved (new features, improvements
and bug fixes such as...)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Routing+Slip" title="Routing Slip"&gt;Routing
Slip&lt;/a&gt; now breaks when an exception occurred&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;MINA&lt;/a&gt; now
supports easier configuration of multiple custom codecs, which is needed when working with
SSL.&lt;/li&gt;
	&lt;li&gt;Improved &lt;a href="/confluence/display/CAMEL/TransactionErrorHandler" title="TransactionErrorHandler"&gt;TransactionErrorHandler&lt;/a&gt;
two fold by reducing complexity of internal logic in Camel when working with transactions.
And added better support for using multiple transactions in multiple routes. See more at section
&lt;em&gt;Using multiple routes with different propagation behaviors&lt;/em&gt; at &lt;a href="/confluence/display/CAMEL/Transactional+Client"
title="Transactional Client"&gt;Transactional Client&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Recipient+List" title="Recipient List"&gt;Recipient
List&lt;/a&gt; now supports &lt;tt&gt;parallelProcessing&lt;/tt&gt;, &lt;tt&gt;stopOnException&lt;/tt&gt;
and references for &lt;tt&gt;AggregationStrategy&lt;/tt&gt; and thread pools. This applies
to the &lt;tt&gt;@RecipientList&lt;/tt&gt; annotation as well.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
	&lt;li&gt;Cleanup of spring jar dependencies.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File
Language&lt;/a&gt; is now merged directly into &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language which among others makes &lt;a href="/confluence/pages/createpage.action?spaceKey=CAMEL&amp;amp;title=Content+Based+Routing&amp;amp;linkCreation=true&amp;amp;fromPageId=9011430"
class="createlink"&gt;Content Based Routing&lt;/a&gt; in Spring XML using file language syntax
easier.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewEnterpriseIntegrationPatterns"&gt;&lt;/a&gt;New
&lt;a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration
Patterns"&gt;Enterprise Integration Patterns&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewComponents"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Components"
title="Components"&gt;Components&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDSL"&gt;&lt;/a&gt;New DSL&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;markRollbackOnlyLast&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewAnnotations"&gt;&lt;/a&gt;New Annotations&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDataFormatsDataFormat"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Data+Format"
title="Data Format"&gt;Data Formats&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewLanguages"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Languages"
title="Languages"&gt;Languages&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewExamples"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Examples"
title="Examples"&gt;Examples&lt;/a&gt;&lt;/h3&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-APIbreaking"&gt;&lt;/a&gt;API breaking&lt;/h2&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-KnownIssues"&gt;&lt;/a&gt;Known Issues&lt;/h2&gt;

&lt;p&gt;See known issues from previous releases.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Importantchangestoconsiderwhenupgrading"&gt;&lt;/a&gt;Important
changes to consider when upgrading&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-Springjardependencieshavebeencutdownincamelcore."&gt;&lt;/a&gt;Spring
jar dependencies have been cut down in camel-core.&lt;/h3&gt;
&lt;p&gt;The &lt;tt&gt;pom.xml&lt;/tt&gt; file for &lt;b&gt;camel-core&lt;/b&gt; have cut
down number of spring jar dependencies to allow Camel to easily run without any Spring .jars
at all. However this affects you if you use maven and use camel-core without camel-spring
or spring at all. If you want to use JMX with Camel then you need to add the following 4 spring
jars required: &lt;tt&gt;spring-core.jar, spring-beans.jar, spring-context.jar, spring-aop.jar&lt;/tt&gt;.
With maven you only need to depend on &lt;tt&gt;spring-context&lt;/tt&gt; and &lt;tt&gt;spring-aop&lt;/tt&gt;
as they will bring in the other two jars.&lt;/p&gt;

&lt;p&gt;See also &lt;a href="/confluence/display/CAMEL/Camel+jar+dependencies" title="Camel
jar dependencies"&gt;Camel jar dependencies&lt;/a&gt; and &lt;a href="/confluence/display/CAMEL/Camel+JMX"
title="Camel JMX"&gt;Camel JMX&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-GettingtheDistributions"&gt;&lt;/a&gt;Getting the
Distributions&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-BinaryDistributions"&gt;&lt;/a&gt;Binary Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Windows Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip"
rel="nofollow"&gt;apache-camel-2.2.0.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Unix/Linux/Cygwin Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;The above
URLs use redirection&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The above URLs use the Apache Mirror system
to redirect you to a suitable mirror for your download. Some users have experienced issues
with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to
work for you from the above URL then try using &lt;a href="http://www.mozilla.com/en-US/firefox/"
rel="nofollow"&gt;FireFox&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SourceDistributions"&gt;&lt;/a&gt;Source Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Windows &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Unix/Linux/Cygwin &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-GettingtheBinariesusingMaven2"&gt;&lt;/a&gt;Getting
the Binaries using Maven 2&lt;/h3&gt;

&lt;p&gt;To use this release in your maven project, the proper dependency configuration that
you should use in your &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html"
rel="nofollow"&gt;Maven POM&lt;/a&gt; is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
&lt;span class="code-tag"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span
class="code-tag"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-core&lt;span class="code-tag"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class="code-tag"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SVNTagCheckout"&gt;&lt;/a&gt;SVN Tag Checkout&lt;/h3&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
svn co http:&lt;span class="code-comment"&gt;//svn.apache.org/repos/asf/camel/tags/camel-2.2.0&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Changelog"&gt;&lt;/a&gt;Changelog&lt;/h2&gt;

&lt;p&gt;For a more detailed view of new features and bug fixes, see the:&lt;br/&gt;
TODO: Fix for 2.2.0&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://issues.apache.org/activemq/secure/ReleaseNote.jspa?projectId=11020&amp;amp;styleName=Html&amp;amp;version=11900"
rel="nofollow"&gt;release notes for 2.2.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9011430&amp;revisedVersion=8&amp;originalVersion=7"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; File Language</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c471700598.1402.1260258600022.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c471700598-1402-1260258600022-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T07:50:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/File+Language"&gt;File
Language&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h2&gt;&lt;a name="FileLanguage-FileExpressionLanguage"&gt;&lt;/a&gt;File Expression
Language&lt;/h2&gt;

&lt;p&gt;&lt;b&gt;Available as of Camel 1.5&lt;/b&gt;&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;File language
is now merged with Simple language&lt;/b&gt;&lt;br /&gt;&lt;p&gt;From Camel 2.2 onwards, the
file language is now merged with &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt;
language which means you can use all the file syntax directly within the simple language.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The File Expression Language is an extension to the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language, adding file related capabilities. These capabilities
is related to common use cases working with file path and names. The goal is to allow expression
to be used with the &lt;a href="/confluence/display/CAMEL/File" title="File"&gt;File&lt;/a&gt;
and &lt;a href="/confluence/display/CAMEL/FTP" title="FTP"&gt;FTP&lt;/a&gt; components for
setting dynamic file patterns for both consumer and producer. &lt;/p&gt;

&lt;h3&gt;&lt;a name="FileLanguage-Syntax"&gt;&lt;/a&gt;Syntax&lt;/h3&gt;
&lt;p&gt;This language is an &lt;b&gt;extension&lt;/b&gt; to the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language so the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; syntax applies also. So the table below only lists the
additional. &lt;br/&gt;
As opposed to &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt;
language &lt;a href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File
Language&lt;/a&gt; also supports &lt;a href="/confluence/display/CAMEL/Constant" title="Constant"&gt;Constant&lt;/a&gt;
expressions so you can enter a fixed filename.&lt;/p&gt;

&lt;p&gt;All the file tokens uses the same expression name as the method on the &lt;tt&gt;java.io.File&lt;/tt&gt;
object, for instance &lt;tt&gt;&lt;a href="file:absolute" rel="nofollow"&gt;file:absolute&lt;/a&gt;&lt;/tt&gt;
refers to the &lt;tt&gt;java.io.File.getAbsolute()&lt;/tt&gt; method. Notice that not all
expressions is supported by the current Exchange. For instance the &lt;a href="/confluence/display/CAMEL/FTP"
title="FTP"&gt;FTP&lt;/a&gt; component supports some of the options, where as the &lt;a href="/confluence/display/CAMEL/File"
title="File"&gt;File&lt;/a&gt; component support all of them.&lt;/p&gt;

&lt;div class="confluenceTableSmall"&gt;&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Expression &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Type &lt;/th&gt;
&lt;th class='confluenceTh'&gt; File Consumer &lt;/th&gt;
&lt;th class='confluenceTh'&gt; File Producer &lt;/th&gt;
&lt;th class='confluenceTh'&gt; FTP Consumer &lt;/th&gt;
&lt;th class='confluenceTh'&gt; FTP Producer &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name" rel="nofollow"&gt;file:name&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file name (is relative to the starting directory,
see note below) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name.noext" rel="nofollow"&gt;file:name.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file name with no extension (is relative to
the starting directory, see note below) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname" rel="nofollow"&gt;file:onlyname&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 2.0: refers to the file name only with no leading paths.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname.noext" rel="nofollow"&gt;file:onlyname.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 2.0: refers to the file name only with no extension
and with no leading paths. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:ext" rel="nofollow"&gt;file:ext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 1.6.1/Camel 2.0: refers to the file extension only &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:parent" rel="nofollow"&gt;file:parent&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file parent &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:path" rel="nofollow"&gt;file:path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file path &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute" rel="nofollow"&gt;file:absolute&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; Boolean &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 2.0: refers to whether the file is regarded as absolute
or relative &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute.path" rel="nofollow"&gt;file:absolute.path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the absolute file path &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:length" rel="nofollow"&gt;file:length&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; Long &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file length returned as a Long type &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:modified" rel="nofollow"&gt;file:modified&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; Date &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 2.0: refers to the file last modified returned as a
Date type &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; date:&lt;em&gt;command:pattern&lt;/em&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; for date formatting using the &lt;tt&gt;java.text.SimepleDataFormat&lt;/tt&gt;
patterns. Is an &lt;b&gt;extension&lt;/b&gt; to the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language. Additional command is: &lt;b&gt;file&lt;/b&gt;
(consumers only) for the last modified timestamp of the file. Notice: all the commands from
the &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt; language
can also be used. &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="FileLanguage-Filetokenexample"&gt;&lt;/a&gt;File token example&lt;/h3&gt;

&lt;h4&gt;&lt;a name="FileLanguage-Relativepaths"&gt;&lt;/a&gt;Relative paths&lt;/h4&gt;
&lt;p&gt;We have a &lt;tt&gt;java.io.File&lt;/tt&gt; handle for the file &lt;tt&gt;hello.txt&lt;/tt&gt;
in the following &lt;b&gt;relative&lt;/b&gt; directory: &lt;tt&gt;.\filelanguage\test&lt;/tt&gt;.
And we configure out endpoint to use this starting directory &lt;tt&gt;.\filelanguage&lt;/tt&gt;.
The the file tokens will return as:&lt;/p&gt;
&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Expression &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Returns &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name" rel="nofollow"&gt;file:name&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; test\hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name.noext" rel="nofollow"&gt;file:name.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; test\hello &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname" rel="nofollow"&gt;file:onlyname&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname.noext" rel="nofollow"&gt;file:onlyname.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; hello &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:ext" rel="nofollow"&gt;file:ext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:parent" rel="nofollow"&gt;file:parent&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; filelanguage\test &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:path" rel="nofollow"&gt;file:path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; filelanguage\test\hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute" rel="nofollow"&gt;file:absolute&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; false &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute.path" rel="nofollow"&gt;file:absolute.path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; \workspace\camel\camel-core\target\filelanguage\test\hello.txt
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h4&gt;&lt;a name="FileLanguage-Absolutepaths"&gt;&lt;/a&gt;Absolute paths&lt;/h4&gt;
&lt;p&gt;We have a &lt;tt&gt;java.io.File&lt;/tt&gt; handle for the file &lt;tt&gt;hello.txt&lt;/tt&gt;
in the following &lt;b&gt;absolute&lt;/b&gt; directory: &lt;tt&gt;\workspace\camel\camel-core\target\filelanguage\test&lt;/tt&gt;.
And we configure out endpoint to use the absolute starting directory &lt;tt&gt;\workspace\camel\camel-core\target\filelanguage&lt;/tt&gt;.
The the file tokens will return as:&lt;/p&gt;
&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Expression &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Returns &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name" rel="nofollow"&gt;file:name&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; test\hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name.noext" rel="nofollow"&gt;file:name.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; test\hello &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname" rel="nofollow"&gt;file:onlyname&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname.noext" rel="nofollow"&gt;file:onlyname.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; hello &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:ext" rel="nofollow"&gt;file:ext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:parent" rel="nofollow"&gt;file:parent&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; \workspace\camel\camel-core\target\filelanguage\test &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:path" rel="nofollow"&gt;file:path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; \workspace\camel\camel-core\target\filelanguage\test\hello.txt
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute" rel="nofollow"&gt;file:absolute&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; true &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute.path" rel="nofollow"&gt;file:absolute.path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; \workspace\camel\camel-core\target\filelanguage\test\hello.txt
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="FileLanguage-Samples"&gt;&lt;/a&gt;Samples&lt;/h3&gt;
&lt;p&gt;You can enter a fixed &lt;a href="/confluence/display/CAMEL/Constant" title="Constant"&gt;Constant&lt;/a&gt;
expression such as &lt;tt&gt;myfile.txt&lt;/tt&gt;:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"myfile.txt"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Lets assume we use the file consumer to read files and want to move the read files
to backup folder with the current date as a sub folder. This can be archived using an expression
like:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"backup/${date:now:yyyyMMdd}/${file:name.noext}.bak"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;relative folder names is also supported so suppose the backup folder should be a
sibling folder then you can append .. as:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"../backup/${date:now:yyyyMMdd}/${file:name.noext}.bak"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As this is an extension to the &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt;
language we have access to all the goodies from this language also, so in this use case we
want to use the in.header.type as a parameter in the dynamic expression:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"../backup/${date:now:yyyyMMdd}/type-${in.header.type}/backup-of-${file:name.noext}.bak"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you have a custom Date you want to use in the expression then Camel supports retrieving
dates from the message header.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"orders/order-${in.header.customerId}-${date:in.header.orderDate:yyyyMMdd}.xml"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And finally we can also use a bean expression to invoke a POJO class that generates
some String output (or convertible to String) to be used:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"uniquefile-${bean:myguidgenerator.generateid}.txt"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And of course all this can be combined in one expression where you can use the &lt;a
href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File Language&lt;/a&gt;,
&lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt; and the &lt;a
href="/confluence/display/CAMEL/Bean" title="Bean"&gt;Bean&lt;/a&gt; language in one combined
expression. This is pretty powerful for those common file path patterns.&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='tipMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/check.gif" width="16" height="16"
align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Can be used in Spring
XML&lt;/b&gt;&lt;br /&gt;&lt;p&gt;In Camel 2.2 you can use the &lt;a href="/confluence/display/CAMEL/File+Language"
title="File Language"&gt;File Language&lt;/a&gt; directly from the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language which makes a &lt;a href="/confluence/display/CAMEL/Content+Based+Router"
title="Content Based Router"&gt;Content Based Router&lt;/a&gt; more easy to do in Spring XML,
where we can route based on file extensions as shown below:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
  &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"file://input/orders"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="code-tag"&gt;&amp;lt;choice&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;when&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;simple&amp;gt;&lt;/span&gt;${file:ext} ==
'txt'&lt;span class="code-tag"&gt;&amp;lt;/simple&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"bean:orderService?method=handleTextFiles"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;/when&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;when&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;simple&amp;gt;&lt;/span&gt;${file:ext} ==
'xml'&lt;span class="code-tag"&gt;&amp;lt;/simple&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"bean:orderService?method=handleXmlFiles"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;/when&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;otherwise&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"bean:orderService?method=handleOtherFiles"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;/otherwise&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;/choice&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; 


&lt;h3&gt;&lt;a name="FileLanguage-Dependencies"&gt;&lt;/a&gt;Dependencies&lt;/h3&gt;
&lt;p&gt;The File language is part of &lt;b&gt;camel-core&lt;/b&gt;.&lt;/p&gt;
     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/File+Language"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=95383&amp;revisedVersion=31&amp;originalVersion=30"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/File+Language?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Simple</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c1985575592.1400.1260258360017.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c1985575592-1400-1260258360017-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T07:46:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Simple"&gt;Simple&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h2&gt;&lt;a name="Simple-SimpleExpressionLanguage"&gt;&lt;/a&gt;Simple Expression
Language&lt;/h2&gt;

&lt;p&gt;The Simple Expression Language is a really simple language you can use. Its primarily
intended for being a really small and simple language for testing without requiring any new
dependencies or knowledge of &lt;a href="/confluence/display/CAMEL/XPath" title="XPath"&gt;XPath&lt;/a&gt;;
so its ideal for testing in camel-core. However for real world use cases you are generally
recommended to choose a more expressive and powerful language such as: &lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Bean+Language" title="Bean Language"&gt;Bean
Language&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/EL" title="EL"&gt;EL&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/OGNL" title="OGNL"&gt;OGNL&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;one of the supported &lt;a href="/confluence/display/CAMEL/Scripting+Languages"
title="Scripting Languages"&gt;Scripting Languages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The simple language uses &lt;tt&gt;${body&lt;/tt&gt;} placeholders for complex expressions
where the expression contains constant literals. The ${ } placeholders can be omitted if the
expression is only the token itself.&lt;/p&gt;

&lt;p&gt;To get the body of the in message: &lt;tt&gt;"body"&lt;/tt&gt;, or &lt;tt&gt;"in.body"&lt;/tt&gt;
or &lt;tt&gt;"${body}"&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;A complex expression must use ${ } placeholders, such as: &lt;tt&gt;"Hello ${in.header.name}
how are you?"&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;You can have multiple tokens in the same expression: &lt;tt&gt;"Hello ${in.header.name}
this is ${in.header.me} speaking"&lt;/tt&gt;.&lt;br/&gt;
However you can &lt;b&gt;not&lt;/b&gt; nest tokens (i.e. having another ${ } placeholder in
an existing, is not allowed).&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;File language
is now merged with Simple language&lt;/b&gt;&lt;br /&gt;&lt;p&gt;From Camel 2.2 onwards, the
&lt;a href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File Language&lt;/a&gt;
is now merged with &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt;
language which means you can use all the file syntax directly within the simple language.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Simple-Variables"&gt;&lt;/a&gt;Variables&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Variable &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Type &lt;/th&gt;
&lt;th class='confluenceTh'&gt;  Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; id &lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; the input message id &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; body &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; the input body &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; in.body &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; the input body &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; out.body &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; the output body &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; header.foo &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refer to the input foo header &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; headers.foo &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refer to the input foo header &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; in.header.foo &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refer to the input foo header &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; in.headers.foo &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refer to the input foo header &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; out.header.foo &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refer to the out header foo &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; out.headers.foo &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refer to the out header foo &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; property.foo &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refer to the foo property on the exchange &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; sys.foo &lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refer to the system property &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; exception.message &lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;New in Camel 2.0.&lt;/b&gt; Refer to the exception.messsage
on the exchange, is &lt;b&gt;null&lt;/b&gt; if no exception set on exchange &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; date:&lt;em&gt;command:pattern&lt;/em&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;New in Camel 1.5.&lt;/b&gt; Date formatting using
the &lt;tt&gt;java.text.SimepleDataFormat&lt;/tt&gt; patterns. Supported commands are: &lt;b&gt;now&lt;/b&gt;
for current timestamp, &lt;b&gt;in.header.xxx&lt;/b&gt; or &lt;b&gt;header.xxx&lt;/b&gt; to
use the Date object in the IN header with the key xxx. &lt;b&gt;out.header.xxx&lt;/b&gt; to
use the Date object in the OUT header with the key xxx.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; bean:&lt;em&gt;bean expression&lt;/em&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Object &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;New in Camel 1.5.&lt;/b&gt; Invoking a bean expression
using the &lt;a href="/confluence/display/CAMEL/Bean" title="Bean"&gt;Bean&lt;/a&gt; language.
Specifying a method name you must use dot as separator. In Camel 2.0 we also support the ?method=methodname
syntax that is used by the &lt;a href="/confluence/display/CAMEL/Bean" title="Bean"&gt;Bean&lt;/a&gt;
component. &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="Simple-Operatorsupport"&gt;&lt;/a&gt;Operator support&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Avaiable as of Camel 2.0&lt;/b&gt;&lt;br/&gt;
We added a basic set of operators supported in the simple language in Camel 2.0. The parser
is limited to only support a single operator. &lt;/p&gt;

&lt;p&gt;To enable it the left value must be enclosed in ${ }. The syntax is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
${leftValue} OP rightValue
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Where the &lt;tt&gt;rightValue&lt;/tt&gt; can be a String literal enclosed in &lt;tt&gt;'
'&lt;/tt&gt;, &lt;tt&gt;null&lt;/tt&gt;, a constant value or another expression enclosed in
${ }.&lt;br/&gt;
Camel will automatically type convert the rightValue type to the leftValue type, so its able
to eg. convert a string into a numeric so you can use &amp;gt; comparison for numeric values.&lt;/p&gt;

&lt;p&gt;The following operators is supported:&lt;/p&gt;
&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Operator &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; == &lt;/td&gt;
&lt;td class='confluenceTd'&gt; equals &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &amp;gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; greather than &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &amp;gt;= &lt;/td&gt;
&lt;td class='confluenceTd'&gt; greather than or equals &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &amp;lt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; less than &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &amp;lt;= &lt;/td&gt;
&lt;td class='confluenceTd'&gt; less than or equals &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; != &lt;/td&gt;
&lt;td class='confluenceTd'&gt; not equals &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; contains &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For testing if contains in a string based value &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; not contains &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For testinf if not contains in a string based value &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; regex &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For matching against a given regular expression pattern defined
as a String value &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; not regex &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For not matching against a given regular expression pattern
defined as a String value &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; in &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For matching if in a set of values, each element must be separated
by comma. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; not in &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For matching if not in a set of values, each element must
be separated by comma. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; is &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For matching if the left hand side type is an instanceof the
value. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; not is &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For matching if the left hand side type is not an instanceof
the value. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; range &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For matching if the left hand side is within a range of values
defined as numbers: &lt;tt&gt;from..to&lt;/tt&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; not range &lt;/td&gt;
&lt;td class='confluenceTd'&gt; For matching if the left hand side is not within a range of
values defined as numbers: &lt;tt&gt;from..to&lt;/tt&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;And the following operators can be used to group expressions:&lt;/p&gt;
&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Operator &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; and &lt;/td&gt;
&lt;td class='confluenceTd'&gt; and is used to group two expressions &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; or &lt;/td&gt;
&lt;td class='confluenceTd'&gt; or is used to group two expressions &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;b&gt;Notice:&lt;/b&gt; Currently &lt;tt&gt;and&lt;/tt&gt; or &lt;tt&gt;or&lt;/tt&gt;
can only be used once in a simple language expression. This might change in the future.&lt;/p&gt;

&lt;p&gt;The syntax for AND is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
${leftValue} OP rightValue and ${leftValue} OP rightValue 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And the syntax for OR is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
${leftValue} OP rightValue or ${leftValue} OP rightValue 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Some examples:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.foo} == 'foo'"&lt;/span&gt;)

&lt;span class="code-comment"&gt;// ' ' can be omitted
&lt;/span&gt;simple(&lt;span class="code-quote"&gt;"${in.header.foo} == foo"&lt;/span&gt;)

&lt;span class="code-comment"&gt;// here Camel will type convert '100' into the type of in.header.bar
and &lt;span class="code-keyword"&gt;if&lt;/span&gt; its an &lt;span class="code-object"&gt;Integer&lt;/span&gt;
'100' will also be converter to an &lt;span class="code-object"&gt;Integer&lt;/span&gt;
&lt;/span&gt;simple(&lt;span class="code-quote"&gt;"${in.header.bar} == '100'"&lt;/span&gt;)

simple(&lt;span class="code-quote"&gt;"${in.header.bar} == 100"&lt;/span&gt;)

&lt;span class="code-comment"&gt;// 100 will be converter to the type of in.header.bar so
we can &lt;span class="code-keyword"&gt;do&lt;/span&gt; &amp;gt; comparison
&lt;/span&gt;simple(&lt;span class="code-quote"&gt;"${in.header.bar} &amp;gt; 100"&lt;/span&gt;)

&lt;span class="code-comment"&gt;// testing &lt;span class="code-keyword"&gt;for&lt;/span&gt;
&lt;span class="code-keyword"&gt;null&lt;/span&gt;
&lt;/span&gt;simple(&lt;span class="code-quote"&gt;"${in.header.baz} == &lt;span class="code-keyword"&gt;null&lt;/span&gt;"&lt;/span&gt;)

&lt;span class="code-comment"&gt;// testing &lt;span class="code-keyword"&gt;for&lt;/span&gt;
not &lt;span class="code-keyword"&gt;null&lt;/span&gt;
&lt;/span&gt;simple(&lt;span class="code-quote"&gt;"${in.header.baz} != &lt;span class="code-keyword"&gt;null&lt;/span&gt;"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And a bit more advanced example where the right value is another expression&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.date} == ${date:now:yyyyMMdd}"&lt;/span&gt;)

simple(&lt;span class="code-quote"&gt;"${in.header.type} == ${bean:orderService?method=getOrderType}"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And an example with contains, testing if the title contains the word Camel&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.title} contains 'Camel'"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And an example with regex, testing if the number header is a 4 digit value:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.number} regex '\d{4}'"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And finally an example if the header equals any of the values in the list. Each element
must be separated by comma, and no space around.&lt;br/&gt;
This also works for numbers etc, as Camel will convert each element into the type of the left
hand side.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.type} in 'gold,silver'"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And for all the last 3 we also support the negate test using not:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.type} not in 'gold,silver'"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And you can test for if the type is a certain instance, eg for instance a String&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.type} is 'java.lang.&lt;span class="code-object"&gt;String&lt;/span&gt;'"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We have added a shorthand for all &lt;tt&gt;java.lang&lt;/tt&gt; types so you can
write it as:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.type} is &lt;span class="code-object"&gt;String&lt;/span&gt;"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Ranges is also supported. The range interval requires numbers and both from and end
is inclusive. For instance to test whether a value is between 100 and 199:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.number} range 100..199"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Notice we use &lt;tt&gt;..&lt;/tt&gt; in the range without spaces. Its based on the
same syntax as Groovy.&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='tipMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/check.gif" width="16" height="16"
align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Can be used in Spring
XML&lt;/b&gt;&lt;br /&gt;&lt;p&gt;As the Spring XML does not have all the power as the Java
DSL with all its various builder methods, you had to resort to use some other languages&lt;br/&gt;
for testing with simple operators. Now you can do this with the simple language. In the sample
below we want to test if the header is a widget order: &lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
    &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"seda:orders"&lt;/span&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;filter&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;simple&amp;gt;&lt;/span&gt;${in.header.type}
== 'widget'&lt;span class="code-tag"&gt;&amp;lt;/simple&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"bean:orderService?method=handleWidget"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;/filter&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;/from&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; 

&lt;h4&gt;&lt;a name="Simple-Usingand%2For"&gt;&lt;/a&gt;Using and / or&lt;/h4&gt;
&lt;p&gt;If you have two expressions you can combine them with the &lt;tt&gt;and&lt;/tt&gt;
or &lt;tt&gt;or&lt;/tt&gt; operator.&lt;br/&gt;
For instance:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.title} contains 'Camel' and ${in.header.type'
== 'gold'"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And of course the &lt;tt&gt;or&lt;/tt&gt; is also supported. The sample example would
be:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.title} contains 'Camel' or ${in.header.type'
== 'gold'"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;Notice:&lt;/b&gt; Currently &lt;tt&gt;and&lt;/tt&gt; or &lt;tt&gt;or&lt;/tt&gt;
can only be used &lt;b&gt;once&lt;/b&gt; in a simple language expression. This might change
in the future.&lt;br/&gt;
So you &lt;b&gt;cannot&lt;/b&gt; do:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
simple(&lt;span class="code-quote"&gt;"${in.header.title} contains 'Camel' and ${in.header.type'
== 'gold' and ${in.header.number} range 100..200"&lt;/span&gt;)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Simple-Samples"&gt;&lt;/a&gt;Samples&lt;/h3&gt;
&lt;p&gt;In the Spring XML sample below we filter based on a header value:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
    &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"seda:orders"&lt;/span&gt;&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;filter&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;simple&amp;gt;&lt;/span&gt;in.header.foo&lt;span
class="code-tag"&gt;&amp;lt;/simple&amp;gt;&lt;/span&gt;
           &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"mock:fooOrders"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
       &lt;span class="code-tag"&gt;&amp;lt;/filter&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;/from&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The Simple language can be used for the predicate test above in the &lt;a href="/confluence/display/CAMEL/Message+Filter"
title="Message Filter"&gt;Message Filter&lt;/a&gt; pattern, where we test if the in message
has a &lt;tt&gt;foo&lt;/tt&gt; header (a header with the key &lt;tt&gt;foo&lt;/tt&gt; exists).
If the expression evaluates to &lt;b&gt;true&lt;/b&gt; then the message is routed to the &lt;tt&gt;mock:foo&lt;/tt&gt;
endpoint, otherwise its lost in the deep blue sea &lt;img class="emoticon" src="/confluence/images/icons/emoticons/wink.gif"
height="20" width="20" align="absmiddle" alt="" border="0"/&gt;.&lt;/p&gt;

&lt;p&gt;The same example in Java DSL:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
    from(&lt;span class="code-quote"&gt;"seda:orders"&lt;/span&gt;)
        .filter().simple(&lt;span class="code-quote"&gt;"in.header.foo"&lt;/span&gt;).to(&lt;span
class="code-quote"&gt;"seda:fooOrders"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can also use the simple language for simple text concatenations such as:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
   from(&lt;span class="code-quote"&gt;"direct:hello"&lt;/span&gt;).transform().simple(&lt;span
class="code-quote"&gt;"Hello ${in.header.user} how are you?"&lt;/span&gt;).to(&lt;span class="code-quote"&gt;"mock:reply"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Notice that we must use ${ } placeholders in the expression now to let Camel be able
to parse it correctly. &lt;/p&gt;

&lt;p&gt;And this sample uses the date command to output current date.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
   from(&lt;span class="code-quote"&gt;"direct:hello"&lt;/span&gt;).transform().simple(&lt;span
class="code-quote"&gt;"The today is ${date:now:yyyyMMdd} and its a great day."&lt;/span&gt;).to(&lt;span
class="code-quote"&gt;"mock:reply"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And in the sample below we invoke the bean language to invoke a method on a bean
to be included in the returned string:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
   from(&lt;span class="code-quote"&gt;"direct:order"&lt;/span&gt;).transform().simple(&lt;span
class="code-quote"&gt;"OrderId: ${bean:orderIdGenerator}"&lt;/span&gt;).to(&lt;span class="code-quote"&gt;"mock:reply"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Where &lt;tt&gt;orderIdGenerator&lt;/tt&gt; is the id of the bean registered in the
&lt;a href="/confluence/display/CAMEL/Registry" title="Registry"&gt;Registry&lt;/a&gt;. If
using Spring then its the Spring bean id.&lt;/p&gt;

&lt;p&gt;If we want to declare which method to invoke on the order id generator bean we must
prepend &lt;tt&gt;.method name&lt;/tt&gt; such as below where we invoke the &lt;tt&gt;generateId&lt;/tt&gt;
method.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
   from(&lt;span class="code-quote"&gt;"direct:order"&lt;/span&gt;).transform().simple(&lt;span
class="code-quote"&gt;"OrderId: ${bean:orderIdGenerator.generateId}"&lt;/span&gt;).to(&lt;span
class="code-quote"&gt;"mock:reply"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And in Camel 2.0 we can use the &lt;tt&gt;?method=methodname&lt;/tt&gt; option that
we are familiar with the &lt;a href="/confluence/display/CAMEL/Bean" title="Bean"&gt;Bean&lt;/a&gt;
component itself:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
   from(&lt;span class="code-quote"&gt;"direct:order"&lt;/span&gt;).transform().simple(&lt;span
class="code-quote"&gt;"OrderId: ${bean:orderIdGenerator?method=generateId}"&lt;/span&gt;).to(&lt;span
class="code-quote"&gt;"mock:reply"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Simple-Dependencies"&gt;&lt;/a&gt;Dependencies&lt;/h3&gt;
&lt;p&gt;The Bean language is part of &lt;b&gt;camel-core&lt;/b&gt;.&lt;/p&gt;
     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Simple"&gt;View Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=70160&amp;revisedVersion=26&amp;originalVersion=25"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Simple?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; File Language</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c1415483109.1398.1260258300019.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c1415483109-1398-1260258300019-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T07:45:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/File+Language"&gt;File
Language&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h2&gt;&lt;a name="FileLanguage-FileExpressionLanguage"&gt;&lt;/a&gt;File Expression
Language&lt;/h2&gt;

&lt;p&gt;&lt;b&gt;Available as of Camel 1.5&lt;/b&gt;&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;File language
is now merged with Simple language&lt;/b&gt;&lt;br /&gt;&lt;p&gt;From Camel 2.2 onwards, the
file language is now merged with &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt;
language which means you can use all the file syntax directly within the simple language.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The File Expression Language is an extension to the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language, adding file related capabilities. These capabilities
is related to common use cases working with file path and names. The goal is to allow expression
to be used with the &lt;a href="/confluence/display/CAMEL/File" title="File"&gt;File&lt;/a&gt;
and &lt;a href="/confluence/display/CAMEL/FTP" title="FTP"&gt;FTP&lt;/a&gt; components for
setting dynamic file patterns for both consumer and producer. &lt;/p&gt;

&lt;h3&gt;&lt;a name="FileLanguage-Syntax"&gt;&lt;/a&gt;Syntax&lt;/h3&gt;
&lt;p&gt;This language is an &lt;b&gt;extension&lt;/b&gt; to the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language so the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; syntax applies also. So the table below only lists the
additional. &lt;br/&gt;
As opposed to &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt;
language &lt;a href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File
Language&lt;/a&gt; also supports &lt;a href="/confluence/display/CAMEL/Constant" title="Constant"&gt;Constant&lt;/a&gt;
expressions so you can enter a fixed filename.&lt;/p&gt;

&lt;p&gt;All the file tokens uses the same expression name as the method on the &lt;tt&gt;java.io.File&lt;/tt&gt;
object, for instance &lt;tt&gt;&lt;a href="file:absolute" rel="nofollow"&gt;file:absolute&lt;/a&gt;&lt;/tt&gt;
refers to the &lt;tt&gt;java.io.File.getAbsolute()&lt;/tt&gt; method. Notice that not all
expressions is supported by the current Exchange. For instance the &lt;a href="/confluence/display/CAMEL/FTP"
title="FTP"&gt;FTP&lt;/a&gt; component supports some of the options, where as the &lt;a href="/confluence/display/CAMEL/File"
title="File"&gt;File&lt;/a&gt; component support all of them.&lt;/p&gt;

&lt;div class="confluenceTableSmall"&gt;&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Expression &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Type &lt;/th&gt;
&lt;th class='confluenceTh'&gt; File Consumer &lt;/th&gt;
&lt;th class='confluenceTh'&gt; File Producer &lt;/th&gt;
&lt;th class='confluenceTh'&gt; FTP Consumer &lt;/th&gt;
&lt;th class='confluenceTh'&gt; FTP Producer &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name" rel="nofollow"&gt;file:name&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file name (is relative to the starting directory,
see note below) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name.noext" rel="nofollow"&gt;file:name.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file name with no extension (is relative to
the starting directory, see note below) &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname" rel="nofollow"&gt;file:onlyname&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 2.0: refers to the file name only with no leading paths.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname.noext" rel="nofollow"&gt;file:onlyname.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 2.0: refers to the file name only with no extension
and with no leading paths. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:ext" rel="nofollow"&gt;file:ext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 1.6.1/Camel 2.0: refers to the file extension only &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:parent" rel="nofollow"&gt;file:parent&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file parent &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:path" rel="nofollow"&gt;file:path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file path &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute" rel="nofollow"&gt;file:absolute&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; Boolean &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 2.0: refers to whether the file is regarded as absolute
or relative &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute.path" rel="nofollow"&gt;file:absolute.path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the absolute file path &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:length" rel="nofollow"&gt;file:length&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; Long &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; refers to the file length returned as a Long type &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:modified" rel="nofollow"&gt;file:modified&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; Date &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; no &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Camel 2.0: refers to the file last modified returned as a
Date type &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; date:&lt;em&gt;command:pattern&lt;/em&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; String &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; yes &lt;/td&gt;
&lt;td class='confluenceTd'&gt; for date formatting using the &lt;tt&gt;java.text.SimepleDataFormat&lt;/tt&gt;
patterns. Is an &lt;b&gt;extension&lt;/b&gt; to the &lt;a href="/confluence/display/CAMEL/Simple"
title="Simple"&gt;Simple&lt;/a&gt; language. Additional command is: &lt;b&gt;file&lt;/b&gt;
(consumers only) for the last modified timestamp of the file. Notice: all the commands from
the &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt; language
can also be used. &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="FileLanguage-Filetokenexample"&gt;&lt;/a&gt;File token example&lt;/h3&gt;

&lt;h4&gt;&lt;a name="FileLanguage-Relativepaths"&gt;&lt;/a&gt;Relative paths&lt;/h4&gt;
&lt;p&gt;We have a &lt;tt&gt;java.io.File&lt;/tt&gt; handle for the file &lt;tt&gt;hello.txt&lt;/tt&gt;
in the following &lt;b&gt;relative&lt;/b&gt; directory: &lt;tt&gt;.\filelanguage\test&lt;/tt&gt;.
And we configure out endpoint to use this starting directory &lt;tt&gt;.\filelanguage&lt;/tt&gt;.
The the file tokens will return as:&lt;/p&gt;
&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Expression &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Returns &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name" rel="nofollow"&gt;file:name&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; test\hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name.noext" rel="nofollow"&gt;file:name.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; test\hello &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname" rel="nofollow"&gt;file:onlyname&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname.noext" rel="nofollow"&gt;file:onlyname.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; hello &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:ext" rel="nofollow"&gt;file:ext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:parent" rel="nofollow"&gt;file:parent&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; filelanguage\test &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:path" rel="nofollow"&gt;file:path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; filelanguage\test\hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute" rel="nofollow"&gt;file:absolute&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; false &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute.path" rel="nofollow"&gt;file:absolute.path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; \workspace\camel\camel-core\target\filelanguage\test\hello.txt
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h4&gt;&lt;a name="FileLanguage-Absolutepaths"&gt;&lt;/a&gt;Absolute paths&lt;/h4&gt;
&lt;p&gt;We have a &lt;tt&gt;java.io.File&lt;/tt&gt; handle for the file &lt;tt&gt;hello.txt&lt;/tt&gt;
in the following &lt;b&gt;absolute&lt;/b&gt; directory: &lt;tt&gt;\workspace\camel\camel-core\target\filelanguage\test&lt;/tt&gt;.
And we configure out endpoint to use the absolute starting directory &lt;tt&gt;\workspace\camel\camel-core\target\filelanguage&lt;/tt&gt;.
The the file tokens will return as:&lt;/p&gt;
&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Expression &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Returns &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name" rel="nofollow"&gt;file:name&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; test\hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:name.noext" rel="nofollow"&gt;file:name.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; test\hello &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname" rel="nofollow"&gt;file:onlyname&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; hello.txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:onlyname.noext" rel="nofollow"&gt;file:onlyname.noext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; hello &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:ext" rel="nofollow"&gt;file:ext&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; txt &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:parent" rel="nofollow"&gt;file:parent&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; \workspace\camel\camel-core\target\filelanguage\test &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:path" rel="nofollow"&gt;file:path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; \workspace\camel\camel-core\target\filelanguage\test\hello.txt
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute" rel="nofollow"&gt;file:absolute&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; true &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="file:absolute.path" rel="nofollow"&gt;file:absolute.path&lt;/a&gt;
&lt;/td&gt;
&lt;td class='confluenceTd'&gt; \workspace\camel\camel-core\target\filelanguage\test\hello.txt
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="FileLanguage-Samples"&gt;&lt;/a&gt;Samples&lt;/h3&gt;
&lt;p&gt;You can enter a fixed &lt;a href="/confluence/display/CAMEL/Constant" title="Constant"&gt;Constant&lt;/a&gt;
expression such as &lt;tt&gt;myfile.txt&lt;/tt&gt;:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"myfile.txt"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Lets assume we use the file consumer to read files and want to move the read files
to backup folder with the current date as a sub folder. This can be archived using an expression
like:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"backup/${date:now:yyyyMMdd}/${file:name.noext}.bak"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;relative folder names is also supported so suppose the backup folder should be a
sibling folder then you can append .. as:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"../backup/${date:now:yyyyMMdd}/${file:name.noext}.bak"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As this is an extension to the &lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt;
language we have access to all the goodies from this language also, so in this use case we
want to use the in.header.type as a parameter in the dynamic expression:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"../backup/${date:now:yyyyMMdd}/type-${in.header.type}/backup-of-${file:name.noext}.bak"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you have a custom Date you want to use in the expression then Camel supports retrieving
dates from the message header.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"orders/order-${in.header.customerId}-${date:in.header.orderDate:yyyyMMdd}.xml"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And finally we can also use a bean expression to invoke a POJO class that generates
some String output (or convertible to String) to be used:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
fileName=&lt;span class="code-quote"&gt;"uniquefile-${bean:myguidgenerator.generateid}.txt"&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And of course all this can be combined in one expression where you can use the &lt;a
href="/confluence/display/CAMEL/File+Language" title="File Language"&gt;File Language&lt;/a&gt;,
&lt;a href="/confluence/display/CAMEL/Simple" title="Simple"&gt;Simple&lt;/a&gt; and the &lt;a
href="/confluence/display/CAMEL/Bean" title="Bean"&gt;Bean&lt;/a&gt; language in one combined
expression. This is pretty powerful for those common file path patterns.&lt;/p&gt;

&lt;h3&gt;&lt;a name="FileLanguage-Dependencies"&gt;&lt;/a&gt;Dependencies&lt;/h3&gt;
&lt;p&gt;The File language is part of &lt;b&gt;camel-core&lt;/b&gt;.&lt;/p&gt;
     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/File+Language"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=95383&amp;revisedVersion=30&amp;originalVersion=29"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/File+Language?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888284 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/language/simple/ camel-core/src/main/java/org/apache/camel/processor/interceptor/ camel-core/src/main/resources/META-INF...</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091208074225.428E323888DD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091208074225-428E323888DD@eris-apache-org%3e</id>
<updated>2009-12-08T07:42:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Tue Dec  8 07:42:23 2009
New Revision: 888284

URL: http://svn.apache.org/viewvc?rev=888284&amp;view=rev
Log:
CAMEL-2226: File language now merged into Simple language by default. This improves CBR with
files etc.

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileLanguageCBRTest.java
  (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileLanguageCBRTest.java
  (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/file/SpringFileLanguageCBRTest.xml
      - copied, changed from r888103, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/aopafter.xml
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FileExpressionBuilder.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/FileLanguage.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceEventMessage.java
    camel/trunk/camel-core/src/main/resources/META-INF/services/org/apache/camel/language/file
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentAggregateBatchConsumerTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java Tue
Dec  8 07:42:23 2009
@@ -36,6 +36,7 @@
 import org.apache.camel.language.bean.BeanLanguage;
 import org.apache.camel.spi.Language;
 import org.apache.camel.util.ExchangeHelper;
+import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.ObjectHelper;
 
 /**
@@ -624,7 +625,7 @@
 
     /**
      * Returns an expression which converts the given expression to the given type the type
-     * expression is evaluted to
+     * expression is evaluated to
      */
     public static Expression convertToExpression(final Expression expression, final Expression
type) {
         return new ExpressionAdapter() {
@@ -852,13 +853,18 @@
                     String key = command.substring(command.lastIndexOf('.') + 1);
                     date = exchange.getIn().getHeader(key, Date.class);
                     if (date == null) {
-                        throw new IllegalArgumentException("Cannot find java.util.Date object
at " + command);
+                        throw new IllegalArgumentException("Cannot find java.util.Date object
at command: " + command);
                     }
                 } else if (command.startsWith("out.header.")) {
                     String key = command.substring(command.lastIndexOf('.') + 1);
                     date = exchange.getOut().getHeader(key, Date.class);
                     if (date == null) {
-                        throw new IllegalArgumentException("Cannot find java.util.Date object
at " + command);
+                        throw new IllegalArgumentException("Cannot find java.util.Date object
at command: " + command);
+                    }
+                } else if ("file".equals(command)) {
+                    date = exchange.getIn().getHeader("CamelFileLastModified", Date.class);
+                    if (date == null) {
+                        throw new IllegalArgumentException("Cannot find CamelFileLastModified
header at command: " + command);
                     }
                 } else {
                     throw new IllegalArgumentException("Command not supported for dateExpression:
" + command);
@@ -956,4 +962,160 @@
             }
         };
     }
+
+    public static Expression fileNameExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                return exchange.getIn().getHeader(Exchange.FILE_NAME, String.class);
+            }
+
+            @Override
+            public String toString() {
+                return "file:name";
+            }
+        };
+    }
+
+    public static Expression fileOnlyNameExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                String answer = exchange.getIn().getHeader(Exchange.FILE_NAME_ONLY, String.class);
+                if (answer == null) {
+                    answer = exchange.getIn().getHeader(Exchange.FILE_NAME, String.class);
+                    answer = FileUtil.stripPath(answer);
+                }
+                return answer;
+            }
+
+            @Override
+            public String toString() {
+                return "file:onlyname";
+            }
+        };
+    }
+
+    public static Expression fileNameNoExtensionExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                String name = exchange.getIn().getHeader(Exchange.FILE_NAME, String.class);
+                return FileUtil.stripExt(name);
+            }
+
+            @Override
+            public String toString() {
+                return "file:name.noext";
+            }
+        };
+    }
+
+    public static Expression fileOnlyNameNoExtensionExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                String name = fileOnlyNameExpression().evaluate(exchange, String.class);
+                return FileUtil.stripExt(name);
+            }
+
+            @Override
+            public String toString() {
+                return "file:onlyname.noext";
+            }
+        };
+    }
+
+    public static Expression fileExtensionExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                String name = exchange.getIn().getHeader(Exchange.FILE_NAME, String.class);
+                if (name != null) {
+                    return name.substring(name.lastIndexOf('.') + 1);
+                } else {
+                    return null;
+                }
+            }
+
+            @Override
+            public String toString() {
+                return "file:ext";
+            }
+        };
+    }
+
+    public static Expression fileParentExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                return exchange.getIn().getHeader("CamelFileParent", String.class);
+            }
+
+            @Override
+            public String toString() {
+                return "file:parent";
+            }
+        };
+    }
+
+    public static Expression filePathExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                return exchange.getIn().getHeader("CamelFilePath", String.class);
+            }
+
+            @Override
+            public String toString() {
+                return "file:path";
+            }
+        };
+    }
+
+    public static Expression fileAbsolutePathExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                return exchange.getIn().getHeader("CamelFileAbsolutePath", String.class);
+            }
+
+            @Override
+            public String toString() {
+                return "file:absolute.path";
+            }
+        };
+    }
+
+    public static Expression fileAbsoluteExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                return exchange.getIn().getHeader("CamelFileAbsolute", Boolean.class);
+            }
+
+            @Override
+            public String toString() {
+                return "file:absolute";
+            }
+        };
+    }
+
+    public static Expression fileSizeExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                return exchange.getIn().getHeader("CamelFileLength", Long.class);
+            }
+
+            @Override
+            public String toString() {
+                return "file:length";
+            }
+        };
+    }
+
+    public static Expression fileLastModifiedExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                return exchange.getIn().getHeader("CamelFileLastModified", Date.class);
+            }
+
+            @Override
+            public String toString() {
+                return "file:modified";
+            }
+        };
+    }
+
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FileExpressionBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FileExpressionBuilder.java?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FileExpressionBuilder.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/FileExpressionBuilder.java
Tue Dec  8 07:42:23 2009
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.builder;
 
 import java.text.SimpleDateFormat;
@@ -33,7 +32,9 @@
  * This expression expects the headers from the {@link org.apache.camel.language.simple.FileLanguage}
on the &lt;b&gt;IN&lt;/b&gt; message.
  *
  * @see org.apache.camel.language.simple.FileLanguage
+ * @deprecated will be removed in Camel 2.3
  */
+@Deprecated
 public final class FileExpressionBuilder {
 
     private FileExpressionBuilder() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/FileLanguage.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/FileLanguage.java?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/FileLanguage.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/FileLanguage.java
Tue Dec  8 07:42:23 2009
@@ -17,9 +17,6 @@
 package org.apache.camel.language.simple;
 
 import org.apache.camel.Expression;
-import org.apache.camel.ExpressionIllegalSyntaxException;
-import org.apache.camel.builder.FileExpressionBuilder;
-import org.apache.camel.util.ObjectHelper;
 
 /**
  * File language is an extension to Simple language to add file specific expressions.
@@ -51,59 +48,18 @@
  *
  * @see org.apache.camel.language.simple.SimpleLanguage
  * @see org.apache.camel.language.bean.BeanLanguage
+ * @deprecated file language is now included as standard in simple language, will be removed
in Camel 2.4
  */
+@Deprecated
 public class FileLanguage extends SimpleLanguageSupport {
 
     private static final SimpleLanguage SIMPLE = new SimpleLanguage();
 
     public static Expression file(String expression) {
-        FileLanguage language = new FileLanguage();
-        return language.createExpression(expression);
+        return SimpleLanguage.simple(expression);
     }
 
     protected Expression createSimpleExpression(String expression, boolean strict) {
-
-        // file: prefix
-        String remainder = ifStartsWithReturnRemainder("file:", expression);
-        if (remainder != null) {
-            if (ObjectHelper.equal(remainder, "name")) {
-                return FileExpressionBuilder.fileNameExpression();
-            } else if (ObjectHelper.equal(remainder, "name.noext")) {
-                return FileExpressionBuilder.fileNameNoExtensionExpression();
-            } else if (ObjectHelper.equal(remainder, "onlyname")) {
-                return FileExpressionBuilder.fileOnlyNameExpression();
-            } else if (ObjectHelper.equal(remainder, "onlyname.noext")) {
-                return FileExpressionBuilder.fileOnlyNameNoExtensionExpression();
-            } else if (ObjectHelper.equal(remainder, "ext")) {
-                return FileExpressionBuilder.fileExtensionExpression();
-            } else if (ObjectHelper.equal(remainder, "parent")) {
-                return FileExpressionBuilder.fileParentExpression();
-            } else if (ObjectHelper.equal(remainder, "path")) {
-                return FileExpressionBuilder.filePathExpression();
-            } else if (ObjectHelper.equal(remainder, "absolute")) {
-                return FileExpressionBuilder.fileAbsoluteExpression();
-            } else if (ObjectHelper.equal(remainder, "absolute.path")) {
-                return FileExpressionBuilder.fileAbsolutePathExpression();
-            } else if (ObjectHelper.equal(remainder, "length")) {
-                return FileExpressionBuilder.fileSizeExpression();
-            } else if (ObjectHelper.equal(remainder, "modified")) {
-                return FileExpressionBuilder.fileLastModifiedExpression();
-            }
-        }
-
-        // date: prefix
-        remainder = ifStartsWithReturnRemainder("date:", expression);
-        if (remainder != null) {
-            String[] parts = remainder.split(":");
-            if (parts.length != 2) {
-                throw new ExpressionIllegalSyntaxException("Valid syntax: ${date:command:pattern}
was: " + expression);
-            }
-            String command = parts[0];
-            String pattern = parts[1];
-            return FileExpressionBuilder.dateExpression(command, pattern);
-        }
-
-        // fallback to simple language if not file specific
         return SIMPLE.createSimpleExpression(expression, strict);
     }
 

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/language/simple/SimpleLanguage.java
Tue Dec  8 07:42:23 2009
@@ -42,14 +42,39 @@
  * &lt;li&gt;bean:&amp;lt;bean expression&amp;gt; to invoke a bean using the
  * {@link org.apache.camel.language.bean.BeanLanguage BeanLanguage}&lt;/li&gt;
  * &lt;/ul&gt;
+ * &lt;p/&gt;
+ * The simple language now also includes file language out of the box which means the following
expression is also
+ * supported:
+ * &lt;ul&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:name&lt;/tt&gt; to access the file name (is relative, see note
below))&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:name.noext&lt;/tt&gt; to access the file name with no extension&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:ext&lt;/tt&gt; to access the file extension&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:onlyname&lt;/tt&gt; to access the file name (no paths)&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:onlyname.noext&lt;/tt&gt; to access the file name (no paths)
with no extension &lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:parent&lt;/tt&gt; to access the parent file name&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:path&lt;/tt&gt; to access the file path name&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:absolute&lt;/tt&gt; is the file regarded as absolute or relative&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:absolute.path&lt;/tt&gt; to access the absolute file path name&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:length&lt;/tt&gt; to access the file length as a Long type&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;file:modified&lt;/tt&gt; to access the file last modified as a Date
type&lt;/li&gt;
+ *   &lt;li&gt;&lt;tt&gt;date:&amp;lt;command&amp;gt;:&amp;lt;pattern&amp;gt;&lt;/tt&gt;
for date formatting using the {@link java.text.SimpleDateFormat} patterns.
+ *     Additional Supported commands are: &lt;tt&gt;file&lt;/tt&gt; for the last modified
timestamp of the file.
+ *     All the commands from {@link SimpleLanguage} is also available.
+ *   &lt;/li&gt;
+ * &lt;/ul&gt;
+ * The &lt;b&gt;relative&lt;/b&gt; file is the filename with the starting directory clipped,
as opposed to &lt;b&gt;path&lt;/b&gt; that will
+ * return the full path including the starting directory.
+ * &lt;br/&gt;
+ * The &lt;b&gt;only&lt;/b&gt; file is the filename only with all paths clipped.
  *
  * @version $Revision$
  */
 public class SimpleLanguage extends SimpleLanguageSupport {
 
+    private static final SimpleLanguage SIMPLE = new SimpleLanguage();
+
     public static Expression simple(String expression) {
-        SimpleLanguage language = new SimpleLanguage();
-        return language.createExpression(expression);
+        return SIMPLE.createExpression(expression);
     }
 
     protected Expression createSimpleExpression(String expression, boolean strict) {
@@ -99,6 +124,34 @@
             return ExpressionBuilder.systemPropertyExpression(remainder);
         }
 
+        // file: prefix
+        remainder = ifStartsWithReturnRemainder("file:", expression);
+        if (remainder != null) {
+            if (ObjectHelper.equal(remainder, "name")) {
+                return ExpressionBuilder.fileNameExpression();
+            } else if (ObjectHelper.equal(remainder, "name.noext")) {
+                return ExpressionBuilder.fileNameNoExtensionExpression();
+            } else if (ObjectHelper.equal(remainder, "onlyname")) {
+                return ExpressionBuilder.fileOnlyNameExpression();
+            } else if (ObjectHelper.equal(remainder, "onlyname.noext")) {
+                return ExpressionBuilder.fileOnlyNameNoExtensionExpression();
+            } else if (ObjectHelper.equal(remainder, "ext")) {
+                return ExpressionBuilder.fileExtensionExpression();
+            } else if (ObjectHelper.equal(remainder, "parent")) {
+                return ExpressionBuilder.fileParentExpression();
+            } else if (ObjectHelper.equal(remainder, "path")) {
+                return ExpressionBuilder.filePathExpression();
+            } else if (ObjectHelper.equal(remainder, "absolute")) {
+                return ExpressionBuilder.fileAbsoluteExpression();
+            } else if (ObjectHelper.equal(remainder, "absolute.path")) {
+                return ExpressionBuilder.fileAbsolutePathExpression();
+            } else if (ObjectHelper.equal(remainder, "length")) {
+                return ExpressionBuilder.fileSizeExpression();
+            } else if (ObjectHelper.equal(remainder, "modified")) {
+                return ExpressionBuilder.fileLastModifiedExpression();
+            }
+        }
+
         // date: prefix
         remainder = ifStartsWithReturnRemainder("date:", expression);
         if (remainder != null) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceEventMessage.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceEventMessage.java?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceEventMessage.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceEventMessage.java
Tue Dec  8 07:42:23 2009
@@ -19,14 +19,14 @@
 import java.util.Date;
 
 /**
- * A trace event message that contains decomposited information about the traced
+ * A trace event message that contains decomposed information about the traced
  * {@link org.apache.camel.Exchange} at the point of interception. The information is stored
as snapshot copies
  * using String types.
  */
 public interface TraceEventMessage {
 
     /**
-     * Gets the timestamp when the interception occured
+     * Gets the timestamp when the interception occurred
      */
     Date getTimestamp();
 
@@ -39,14 +39,14 @@
      * Gets the previous node.
      * &lt;p/&gt;
      * Will return &lt;tt&gt;null&lt;/tt&gt; if this is the first node, then you can use
the from endpoint uri
-     * instread to indicate the start
+     * instead to indicate the start
      */
     String getPreviousNode();
 
     /**
      * Gets the current node that just have been intercepted and processed
      * &lt;p/&gt;
-     * Is never null.
+     * Is never &lt;tt&gt;null&lt;/tt&gt;.
      */
     String getToNode();
 

Modified: camel/trunk/camel-core/src/main/resources/META-INF/services/org/apache/camel/language/file
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/resources/META-INF/services/org/apache/camel/language/file?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/resources/META-INF/services/org/apache/camel/language/file
(original)
+++ camel/trunk/camel-core/src/main/resources/META-INF/services/org/apache/camel/language/file
Tue Dec  8 07:42:23 2009
@@ -15,4 +15,4 @@
 # limitations under the License.
 #
 
-class=org.apache.camel.language.simple.FileLanguage
\ No newline at end of file
+class=org.apache.camel.language.simple.SimpleLanguage
\ No newline at end of file

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentAggregateBatchConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentAggregateBatchConsumerTest.java?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentAggregateBatchConsumerTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentAggregateBatchConsumerTest.java
Tue Dec  8 07:42:23 2009
@@ -20,7 +20,7 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.camel.language.simple.FileLanguage.file;
+import static org.apache.camel.language.simple.SimpleLanguage.simple;
 
 /**
  * File being processed sync vs async to demonstrate the time difference.
@@ -36,7 +36,7 @@
             @Override
             public void configure() throws Exception {
                 from("file://target/concurrent?delay=60000&amp;initialDelay=2500")
-                    .setHeader("id", file("${file:onlyname.noext}"))
+                    .setHeader("id", simple("${file:onlyname.noext}"))
                     .threads(20)
                     .beanRef("business")
                     .aggregate(header("country"), new MyBusinessTotal()).batchSizeFromConsumer().batchTimeout(60000).to("mock:result");
@@ -59,7 +59,7 @@
             @Override
             public void configure() throws Exception {
                 from("file://target/concurrent?delay=60000&amp;initialDelay=2500")
-                    .setHeader("id", file("${file:onlyname.noext}"))
+                    .setHeader("id", simple("${file:onlyname.noext}"))
                     .beanRef("business")
                     .aggregate(header("country"), new MyBusinessTotal()).batchSizeFromConsumer().batchTimeout(60000).to("mock:result");
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentTest.java?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentTest.java
Tue Dec  8 07:42:23 2009
@@ -32,7 +32,7 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.camel.language.simple.FileLanguage.file;
+import static org.apache.camel.language.simple.SimpleLanguage.simple;
 
 /**
  * File being processed sync vs async to demonstrate the time difference.
@@ -65,7 +65,7 @@
             @Override
             public void configure() throws Exception {
                 from("file://target/concurrent?delay=60000&amp;initialDelay=2500")
-                    .setHeader("id", file("${file:onlyname.noext}"))
+                    .setHeader("id", simple("${file:onlyname.noext}"))
                     .threads(20)
                     .beanRef("business")
                     .aggregate(header("country"), new MyBusinessTotal()).batchSize(10).batchTimeout(60000).to("mock:result");
@@ -88,7 +88,7 @@
             @Override
             public void configure() throws Exception {
                 from("file://target/concurrent?delay=60000&amp;initialDelay=2500")
-                    .setHeader("id", file("${file:onlyname.noext}"))
+                    .setHeader("id", simple("${file:onlyname.noext}"))
                     .beanRef("business")
                     .aggregate(header("country"), new MyBusinessTotal()).batchSize(10).batchTimeout(60000).to("mock:result");
             }

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileLanguageCBRTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileLanguageCBRTest.java?rev=888284&amp;view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileLanguageCBRTest.java
(added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileLanguageCBRTest.java
Tue Dec  8 07:42:23 2009
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.file;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ * @version $Revision$
+ */
+public class FileLanguageCBRTest extends ContextTestSupport {
+
+    @Override
+    protected void setUp() throws Exception {
+        deleteDirectory("target/cbr");
+        super.setUp();
+    }
+
+    public void testTxt() throws Exception {
+        getMockEndpoint("mock:txt").expectedMessageCount(1);
+        getMockEndpoint("mock:dat").expectedMessageCount(0);
+        getMockEndpoint("mock:other").expectedMessageCount(0);
+
+        template.sendBodyAndHeader("file://target/cbr", "Hello World", Exchange.FILE_NAME,
"hello.txt");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testDat() throws Exception {
+        getMockEndpoint("mock:txt").expectedMessageCount(0);
+        getMockEndpoint("mock:dat").expectedMessageCount(1);
+        getMockEndpoint("mock:other").expectedMessageCount(0);
+
+        template.sendBodyAndHeader("file://target/cbr", "Bye World", Exchange.FILE_NAME,
"bye.dat");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testOther() throws Exception {
+        getMockEndpoint("mock:txt").expectedMessageCount(0);
+        getMockEndpoint("mock:dat").expectedMessageCount(0);
+        getMockEndpoint("mock:other").expectedMessageCount(1);
+
+        template.sendBodyAndHeader("file://target/cbr", "Hi World", Exchange.FILE_NAME, "hi.foo");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("file://target/cbr?delete=true")
+                    .convertBodyTo(String.class)
+                    .choice()
+                        .when().simple("${file:ext} == 'txt'").to("mock:txt")
+                        .when().simple("${file:ext} == 'dat'").to("mock:dat")
+                        .otherwise().to("mock:other");
+            }
+        };
+    }
+}

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileLanguageCBRTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileLanguageCBRTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java?rev=888284&amp;r1=888283&amp;r2=888284&amp;view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/language/FileLanguageTest.java Tue
Dec  8 07:42:23 2009
@@ -29,7 +29,7 @@
 import org.apache.camel.component.file.FileEndpoint;
 import org.apache.camel.component.file.GenericFile;
 import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.language.simple.FileLanguage;
+import org.apache.camel.language.simple.SimpleLanguage;
 
 /**
  * Unit test for File Language.
@@ -71,7 +71,7 @@
         assertExpression("${file:length}", file.length());
 
         // modified is a Date object
-        Date modified = FileLanguage.file("file:modified").evaluate(exchange, Date.class);
+        Date modified = SimpleLanguage.simple("file:modified").evaluate(exchange, Date.class);
         assertEquals(new Date(file.lastModified()), modified);
     }
 

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileLanguageCBRTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileLanguageCBRTest.java?rev=888284&amp;view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileLanguageCBRTest.java
(added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileLanguageCBRTest.java
Tue Dec  8 07:42:23 2009
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.spring.file;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.spring.SpringTestSupport;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringFileLanguageCBRTest extends SpringTestSupport {
+
+    @Override
+    protected AbstractXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/camel/spring/file/SpringFileLanguageCBRTest.xml");
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        deleteDirectory("target/cbr");
+        super.setUp();
+    }
+
+    public void testTxt() throws Exception {
+        getMockEndpoint("mock:txt").expectedMessageCount(1);
+        getMockEndpoint("mock:dat").expectedMessageCount(0);
+        getMockEndpoint("mock:other").expectedMessageCount(0);
+
+        template.sendBodyAndHeader("file://target/cbr", "Hello World", Exchange.FILE_NAME,
"hello.txt");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testDat() throws Exception {
+        getMockEndpoint("mock:txt").expectedMessageCount(0);
+        getMockEndpoint("mock:dat").expectedMessageCount(1);
+        getMockEndpoint("mock:other").expectedMessageCount(0);
+
+        template.sendBodyAndHeader("file://target/cbr", "Bye World", Exchange.FILE_NAME,
"bye.dat");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testOther() throws Exception {
+        getMockEndpoint("mock:txt").expectedMessageCount(0);
+        getMockEndpoint("mock:dat").expectedMessageCount(0);
+        getMockEndpoint("mock:other").expectedMessageCount(1);
+
+        template.sendBodyAndHeader("file://target/cbr", "Hi World", Exchange.FILE_NAME, "hi.foo");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileLanguageCBRTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileLanguageCBRTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/file/SpringFileLanguageCBRTest.xml
(from r888103, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/aopafter.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/file/SpringFileLanguageCBRTest.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/file/SpringFileLanguageCBRTest.xml&amp;p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/aopafter.xml&amp;r1=888103&amp;r2=888284&amp;rev=888284&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/aopafter.xml
(original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/file/SpringFileLanguageCBRTest.xml
Tue Dec  8 07:42:23 2009
@@ -25,11 +25,20 @@
     &lt;!-- START SNIPPET: e1 --&gt;
     &lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
         &lt;route&gt;
-            &lt;from uri="direct:start"/&gt;
-            &lt;aop afterUri="mock:after"&gt;
-                &lt;transform&gt;&lt;constant&gt;Bye World&lt;/constant&gt;&lt;/transform&gt;
-                &lt;to uri="mock:result"/&gt;
-            &lt;/aop&gt;
+            &lt;from uri="file://target/cbr?delete=true"/&gt;
+            &lt;choice&gt;
+                &lt;when&gt;
+                    &lt;simple&gt;${file:ext} == 'txt'&lt;/simple&gt;
+                    &lt;to uri="mock:txt"/&gt;
+                &lt;/when&gt;
+                &lt;when&gt;
+                    &lt;simple&gt;${file:ext} == 'dat'&lt;/simple&gt;
+                    &lt;to uri="mock:dat"/&gt;
+                &lt;/when&gt;
+                &lt;otherwise&gt;
+                    &lt;to uri="mock:other"/&gt;
+                &lt;/otherwise&gt;
+            &lt;/choice&gt;
         &lt;/route&gt;
     &lt;/camelContext&gt;
     &lt;!-- END SNIPPET: e1 --&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Camel 2.2.0 Release</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c1756630396.1396.1260257940023.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c1756630396-1396-1260257940023-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T07:39:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;Camel
2.2.0 Release&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h1&gt;&lt;a name="Camel2.2.0Release-Camel2.2.0release%28currentlyinprogress%29"&gt;&lt;/a&gt;Camel
2.2.0 release (currently in progress)&lt;/h1&gt;

&lt;div style="padding-right:20px;float:left;margin-left:-20px;"&gt;&lt;p&gt;&lt;img src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"
align="absmiddle" border="0" /&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div style="min-height:200px"&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-NewandNoteworthy"&gt;&lt;/a&gt;New and Noteworthy&lt;/h2&gt;

&lt;p&gt;Welcome to the 2.2.0 release which approx XXX issues resolved (new features, improvements
and bug fixes such as...)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Routing+Slip" title="Routing Slip"&gt;Routing
Slip&lt;/a&gt; now breaks when an exception occurred&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;MINA&lt;/a&gt; now
supports easier configuration of multiple custom codecs, which is needed when working with
SSL.&lt;/li&gt;
	&lt;li&gt;Improved &lt;a href="/confluence/display/CAMEL/TransactionErrorHandler" title="TransactionErrorHandler"&gt;TransactionErrorHandler&lt;/a&gt;
two fold by reducing complexity of internal logic in Camel when working with transactions.
And added better support for using multiple transactions in multiple routes. See more at section
&lt;em&gt;Using multiple routes with different propagation behaviors&lt;/em&gt; at &lt;a href="/confluence/display/CAMEL/Transactional+Client"
title="Transactional Client"&gt;Transactional Client&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Recipient+List" title="Recipient List"&gt;Recipient
List&lt;/a&gt; now supports &lt;tt&gt;parallelProcessing&lt;/tt&gt;, &lt;tt&gt;stopOnException&lt;/tt&gt;
and references for &lt;tt&gt;AggregationStrategy&lt;/tt&gt; and thread pools. This applies
to the &lt;tt&gt;@RecipientList&lt;/tt&gt; annotation as well.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
	&lt;li&gt;Cleanup of spring jar dependencies.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewEnterpriseIntegrationPatterns"&gt;&lt;/a&gt;New
&lt;a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration
Patterns"&gt;Enterprise Integration Patterns&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewComponents"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Components"
title="Components"&gt;Components&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDSL"&gt;&lt;/a&gt;New DSL&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;markRollbackOnlyLast&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewAnnotations"&gt;&lt;/a&gt;New Annotations&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDataFormatsDataFormat"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Data+Format"
title="Data Format"&gt;Data Formats&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewLanguages"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Languages"
title="Languages"&gt;Languages&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewExamples"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Examples"
title="Examples"&gt;Examples&lt;/a&gt;&lt;/h3&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-APIbreaking"&gt;&lt;/a&gt;API breaking&lt;/h2&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-KnownIssues"&gt;&lt;/a&gt;Known Issues&lt;/h2&gt;

&lt;p&gt;See known issues from previous releases.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Importantchangestoconsiderwhenupgrading"&gt;&lt;/a&gt;Important
changes to consider when upgrading&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-Springjardependencieshavebeencutdownincamelcore."&gt;&lt;/a&gt;Spring
jar dependencies have been cut down in camel-core.&lt;/h3&gt;
&lt;p&gt;The &lt;tt&gt;pom.xml&lt;/tt&gt; file for &lt;b&gt;camel-core&lt;/b&gt; have cut
down number of spring jar dependencies to allow Camel to easily run without any Spring .jars
at all. However this affects you if you use maven and use camel-core without camel-spring
or spring at all. If you want to use JMX with Camel then you need to add the following 4 spring
jars required: &lt;tt&gt;spring-core.jar, spring-beans.jar, spring-context.jar, spring-aop.jar&lt;/tt&gt;.
With maven you only need to depend on &lt;tt&gt;spring-context&lt;/tt&gt; and &lt;tt&gt;spring-aop&lt;/tt&gt;
as they will bring in the other two jars.&lt;/p&gt;

&lt;p&gt;See also &lt;a href="/confluence/display/CAMEL/Camel+jar+dependencies" title="Camel
jar dependencies"&gt;Camel jar dependencies&lt;/a&gt; and &lt;a href="/confluence/display/CAMEL/Camel+JMX"
title="Camel JMX"&gt;Camel JMX&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-GettingtheDistributions"&gt;&lt;/a&gt;Getting the
Distributions&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-BinaryDistributions"&gt;&lt;/a&gt;Binary Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Windows Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip"
rel="nofollow"&gt;apache-camel-2.2.0.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Unix/Linux/Cygwin Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;The above
URLs use redirection&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The above URLs use the Apache Mirror system
to redirect you to a suitable mirror for your download. Some users have experienced issues
with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to
work for you from the above URL then try using &lt;a href="http://www.mozilla.com/en-US/firefox/"
rel="nofollow"&gt;FireFox&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SourceDistributions"&gt;&lt;/a&gt;Source Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Windows &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Unix/Linux/Cygwin &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-GettingtheBinariesusingMaven2"&gt;&lt;/a&gt;Getting
the Binaries using Maven 2&lt;/h3&gt;

&lt;p&gt;To use this release in your maven project, the proper dependency configuration that
you should use in your &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html"
rel="nofollow"&gt;Maven POM&lt;/a&gt; is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
&lt;span class="code-tag"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span
class="code-tag"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-core&lt;span class="code-tag"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class="code-tag"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SVNTagCheckout"&gt;&lt;/a&gt;SVN Tag Checkout&lt;/h3&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
svn co http:&lt;span class="code-comment"&gt;//svn.apache.org/repos/asf/camel/tags/camel-2.2.0&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Changelog"&gt;&lt;/a&gt;Changelog&lt;/h2&gt;

&lt;p&gt;For a more detailed view of new features and bug fixes, see the:&lt;br/&gt;
TODO: Fix for 2.2.0&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://issues.apache.org/activemq/secure/ReleaseNote.jspa?projectId=11020&amp;amp;styleName=Html&amp;amp;version=11900"
rel="nofollow"&gt;release notes for 2.2.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9011430&amp;revisedVersion=7&amp;originalVersion=6"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888283 - in /camel/trunk/components: camel-spring/pom.xml camel-test/pom.xml</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091208073052.5A36F23888DD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091208073052-5A36F23888DD@eris-apache-org%3e</id>
<updated>2009-12-08T07:30:52Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Tue Dec  8 07:30:51 2009
New Revision: 888283

URL: http://svn.apache.org/viewvc?rev=888283&amp;view=rev
Log:
Cleanup of spring jar deps.

Modified:
    camel/trunk/components/camel-spring/pom.xml
    camel/trunk/components/camel-test/pom.xml

Modified: camel/trunk/components/camel-spring/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/pom.xml?rev=888283&amp;r1=888282&amp;r2=888283&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-spring/pom.xml (original)
+++ camel/trunk/components/camel-spring/pom.xml Tue Dec  8 07:30:51 2009
@@ -65,6 +65,10 @@
     &lt;/dependency&gt;
     &lt;dependency&gt;
       &lt;groupId&gt;org.springframework&lt;/groupId&gt;
+      &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
       &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
     &lt;/dependency&gt;
 
@@ -76,11 +80,6 @@
     &lt;/dependency&gt;
     &lt;dependency&gt;
       &lt;groupId&gt;org.springframework&lt;/groupId&gt;
-      &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
       &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
       &lt;scope&gt;test&lt;/scope&gt;
     &lt;/dependency&gt;

Modified: camel/trunk/components/camel-test/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/pom.xml?rev=888283&amp;r1=888282&amp;r2=888283&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-test/pom.xml (original)
+++ camel/trunk/components/camel-test/pom.xml Tue Dec  8 07:30:51 2009
@@ -60,12 +60,6 @@
       &lt;artifactId&gt;log4j&lt;/artifactId&gt;
       &lt;scope&gt;test&lt;/scope&gt;
     &lt;/dependency&gt;
-    &lt;!-- needed for unit test as Spring JMX stuff deps on AopUtil --&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
-      &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
 
   &lt;/dependencies&gt;
 




</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Camel jar dependencies</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c1990869712.1394.1260257220023.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c1990869712-1394-1260257220023-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T07:27:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
    &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+jar+dependencies"&gt;Camel
jar dependencies&lt;/a&gt;&lt;/h2&gt;
    &lt;h4&gt;Page  &lt;b&gt;added&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
         &lt;br/&gt;
    &lt;div class="notificationGreySide"&gt;
         &lt;h2&gt;&lt;a name="Cameljardependencies-Cameljardependencies"&gt;&lt;/a&gt;Camel
jar dependencies&lt;/h2&gt;

&lt;p&gt;Camel core itself is lightweight and can run with a few .jars.&lt;/p&gt;

&lt;h3&gt;&lt;a name="Cameljardependencies-camelcoredependenciesforCamel2.0orlower"&gt;&lt;/a&gt;camel-core
dependencies for Camel 2.0 or lower&lt;/h3&gt;
&lt;ul class="alternate" type="square"&gt;
	&lt;li&gt;commons-logging-api.jar - API for commons logging&lt;/li&gt;
	&lt;li&gt;JAXB 2.1.x - XML stuff - Is provided in the JDK core from Java 1.6 onwards&lt;/li&gt;
	&lt;li&gt;activation.jar - For Attachments support - Is provided in the JDK core from Java
1.6 onwards&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Cameljardependencies-camelcoredependenciesforCamel2.1onwards"&gt;&lt;/a&gt;camel-core
dependencies for Camel 2.1 onwards&lt;/h3&gt;
&lt;ul class="alternate" type="square"&gt;
	&lt;li&gt;commons-logging-api-1.1.jar - API for commons logging&lt;/li&gt;
	&lt;li&gt;commons-management-1.0.jar - API for JMX&lt;/li&gt;
	&lt;li&gt;JAXB 2.1.x - XML stuff - Is provided in the JDK core from Java 1.6 onwards&lt;/li&gt;
	&lt;li&gt;activation-1.1.jar - For Attachments support - Is provided in the JDK core from
Java 1.6 onwards&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Cameljardependencies-OptionaldependenciesforJMX"&gt;&lt;/a&gt;Optional
dependencies for JMX&lt;/h3&gt;
&lt;ul class="alternate" type="square"&gt;
	&lt;li&gt;spring-core.jar, spring-beans.jar, spring-context.jar, spring-aop.jar - All 4 jars
needed to use JMX with Camel.&lt;/li&gt;
&lt;/ul&gt;


    &lt;/div&gt;
    &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+jar+dependencies"&gt;View
Online&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+jar+dependencies?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
           &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Camel JMX</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c1630523307.1392.1260256740026.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c1630523307-1392-1260256740026-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-08T07:19:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+JMX"&gt;Camel
JMX&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~davsclaus"&gt;Claus
Ibsen&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h2&gt;&lt;a name="CamelJMX-CamelJMX"&gt;&lt;/a&gt;Camel JMX&lt;/h2&gt;

&lt;p&gt;Apache Camel has extensive support for JMX to allow you to monitor and control the
Camel managed objects a JMX client.&lt;/p&gt;

&lt;div&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-CamelJMX'&gt;Camel JMX&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-SpringDependency'&gt;Spring Dependency&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-UsingJMXtomanageApacheCamel'&gt;Using JMX to manage Apache
Camel&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-DisablingJMXinstrumentationagentinCamel'&gt;Disabling
JMX instrumentation agent in Camel&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-LocatingaMBeanServerintheJavaVM'&gt;Locating a MBeanServer
in the Java VM&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-CreatingJMXRMIConnectorServer'&gt;Creating JMX RMI Connector
Server&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-JMXServiceURL'&gt;JMX Service URL&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-UsingJConsoletomonitorCamel'&gt;Using JConsole to monitor
Camel&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-TheSystemPropertiesforCamelJMXsupport'&gt;The SystemProperties
for Camel JMX support&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-JMXinsideanApplicationServer'&gt;JMX inside an Application
Server&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-JBossAS4'&gt;JBoss AS 4&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-WebSphere'&gt;WebSphere&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-AdvancedJMXConfiguration'&gt;Advanced JMX Configuration&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-Example%3A'&gt;Example:&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-jmxAgentPropertiesReference'&gt;jmxAgent Properties Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-RegisteringyourownManagedEndpoints'&gt;Registering your
own Managed Endpoints&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-ProgrammingyourownManagedServices'&gt;Programming your
own Managed Services&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-ManagementNamingStrategy'&gt;ManagementNamingStrategy&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-ManagementStrategy'&gt;ManagementStrategy&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-Configuringlevelofgranularityforperformancestatistics'&gt;Configuring
level of granularity for performance statistics&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-Whichendpointsareregistered'&gt;Which endpoints are registered&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-Whichprocessorsareregistered'&gt;Which processors are
registered&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href='#CamelJMX-SeeAlso'&gt;See Also&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="CamelJMX-SpringDependency"&gt;&lt;/a&gt;Spring Dependency&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;spring-context.jar, spring-aop.jar, spring-beans.jar, spring-core.jar&lt;/b&gt;
is needed on the classpath by Camel to be able to use JMX instrumentation. If these .jars
is &lt;b&gt;not&lt;/b&gt; on the classpath Camel will fallback to non JMX mode. This situation
is logged at &lt;tt&gt;WARN&lt;/tt&gt; level using logger name &lt;tt&gt;org.apache.camel.impl.DefaultCamelContext&lt;/tt&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-UsingJMXtomanageApacheCamel"&gt;&lt;/a&gt;Using JMX to manage
Apache Camel&lt;/h3&gt;

&lt;div class='panelMacro'&gt;&lt;table class='warningMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Some platforms
do not allow access to its platform mbean server&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The Oracle
OC4J J2EE application server will not allow Camel to access the platform mbean server. You
can identify this in the log as Camel will log a WARNING.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
xxx xx, xxxx xx:xx:xx xx org.apache.camel.management.InstrumentationLifecycleStrategy onContextStart
WARNING: Could not register CamelContext MBean
java.lang.SecurityException: Unauthorized access from application: xx to MBean: java.lang:type=ClassLoading
        at oracle.oc4j.admin.jmx.shared.UserMBeanServer.checkRegisterAccess(UserMBeanServer.java:873)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;To resolve this you should disable the JMX agent in Camel, see section &lt;em&gt;Disabling
JMX instrumentation agent in Camel&lt;/em&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;By default, JMX instrumentation agent is enabled in Camel which means that Camel
runtime creates and registers MBean management objects with a MBeanServer instance in the
VM. This allows Camel users instantly obtain insights into how Camel routes perform down to
the individual processor's level.&lt;/p&gt;

&lt;p&gt;The supported types of management objects are &lt;a href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/management/ManagedEndpoint.html"
rel="nofollow"&gt;endpoint &lt;/a&gt;, &lt;a href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/management/ManagedRoute.html"
rel="nofollow"&gt;route&lt;/a&gt;, &lt;a href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/management/ManagedService.html"
rel="nofollow"&gt;service&lt;/a&gt;, and &lt;a href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/management/PerformanceCounter.html"
rel="nofollow"&gt;processor&lt;/a&gt;. Some of these management objects also expose lifecycle
operations in addition to performance counter attributes.&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/management/DefaultManagementNamingStrategy.html"
rel="nofollow"&gt;DefaultManagementNamingStrategy&lt;/a&gt; is the default naming strategy
which builds object names used for MBean registration. By default, &lt;b&gt;org.apache.camel&lt;/b&gt;
is the domain name for all object names created by CamelNamingStrategy. The domain name of
the MBean object can be configured by Java VM system property:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
-Dorg.apache.camel.jmx.mbeanObjectDomainName=your.domain.name
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or, by adding a &lt;b&gt;jmxAgent&lt;/b&gt; element inside the camelContext element
in Spring configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; mbeanObjectDomainName=&lt;span
class="code-quote"&gt;"your.domain.name"&lt;/span&gt;/&amp;gt;
    ...
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Spring configuration always takes precedence over system properties when they both
present. It is true for all of JMX related configurations.&lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-DisablingJMXinstrumentationagentinCamel"&gt;&lt;/a&gt;Disabling
JMX instrumentation agent in Camel&lt;/h3&gt;

&lt;p&gt;You can disable JMX instrumentation agent by setting Java VM system property as follow.
The property value is treated as boolean.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
-Dorg.apache.camel.jmx.disabled=True
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or, by adding a &lt;b&gt;jmxAgent&lt;/b&gt; element inside the camelContext element
in Spring configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; disabled=&lt;span
class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt;/&amp;gt;
    ...
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or in Camel 2.1 its a bit easier (not having to use JVM system property) if using
pure Java as you can disable it as follows:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
CamelContext camel = &lt;span class="code-keyword"&gt;new&lt;/span&gt; DefaultCamelContext();
camel.disableJMX();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="CamelJMX-LocatingaMBeanServerintheJavaVM"&gt;&lt;/a&gt;Locating a MBeanServer
in the Java VM&lt;/h3&gt;

&lt;p&gt;Each CamelContext can have an instance of &lt;a href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/spi/InstrumentationAgent.html"
rel="nofollow"&gt;InstrumentationAgent&lt;/a&gt; wrapped insider the &lt;a href="http://activemq.apache.org/camel/maven/camel-core/apidocs/org/apache/camel/management/InstrumentationLifecycleStrategy.html"
rel="nofollow"&gt;InstrumentationLifecycleStrategy&lt;/a&gt;. The InstrumentationAgent is
the object that interfaces with a &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServer.html"
rel="nofollow"&gt;MBeanServer&lt;/a&gt; to register/unregister Camel MBeans. Multiple CamelContexts/InstrumentationAgents
can/should share a MBeanServer. By default, Camel runtime picks the first MBeanServer returned
by &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServerFactory.html#findMBeanServer(java.lang.String)"
rel="nofollow"&gt;MBeanServerFactory.findMBeanServer method&lt;/a&gt; that matches the default
domain name of &lt;b&gt;org.apache.camel&lt;/b&gt;.&amp;nbsp; You may want to change the default
domain name to match the MBeanServer instance that you are already using in your application.&amp;nbsp;
Especially, if your MBeanServer is attached to a JMX connector server, you will not need to
create a connector server in Camel.&lt;/p&gt;

&lt;p&gt;You can configure the matching default domain name via system property.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
-Dorg.apache.camel.jmx.mbeanServerDefaultDomain=&amp;lt;your.domain.name&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or, by adding a &lt;b&gt;jmxAgent&lt;/b&gt; element inside the camelContext element
in Spring configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; mbeanServerDefaultDomain=&lt;span
class="code-quote"&gt;"your.domain.name"&lt;/span&gt;/&amp;gt;
    ...
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If no matching MBeanServer can be found, a new one is created and the new MBeanServer's
default domain name is set according to the default and configuration as mentioned above.&lt;/p&gt;

&lt;p&gt;It is also possible to use the &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/ManagementFactory.html#getPlatformMBeanServer()"
rel="nofollow"&gt;PlatformMBeanServer&lt;/a&gt; when it is desirable to manage JVM MBeans&amp;nbsp;by
setting the system property.&amp;nbsp; The MBeanServer default domain name configuration is
ignored as it is not applicable.&amp;nbsp; &lt;b&gt;Starting in next release (1.5), the default
value of usePlatformMBeanServer will be changed to "True".&amp;nbsp; You can set the property
to "False" to disable using platform MBean server.&lt;/b&gt;&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
-Dorg.apache.camel.jmx.usePlatformMBeanServer=True
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or, by adding a &lt;b&gt;jmxAgent&lt;/b&gt; element inside the camelContext element
in Spring configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; usePlatformMBeanServer=&lt;span
class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt;/&amp;gt;
    ...
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="CamelJMX-CreatingJMXRMIConnectorServer"&gt;&lt;/a&gt;Creating JMX RMI
Connector Server&lt;/h3&gt;

&lt;p&gt;JMX connector server enables MBeans to be remotely managed by a JMX client such as
JConsole.&amp;nbsp; Camel JMX RMI connector server can be optionally turned on by setting
system property and the MBeanServer used by Camel is attached to that connector server.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
-Dorg.apache.camel.jmx.createRmiConnector=True
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or, by adding a &lt;b&gt;jmxAgent&lt;/b&gt; element inside the camelContext element
in Spring configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; createConnector=&lt;span
class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt;/&amp;gt;
    ...
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="CamelJMX-JMXServiceURL"&gt;&lt;/a&gt;JMX Service URL&lt;/h3&gt;

&lt;p&gt;The default JMX Service URL has the format:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
service:jmx:rmi:&lt;span class="code-comment"&gt;///jndi/rmi://localhost:&amp;lt;registryPort&amp;gt;/&amp;lt;serviceUrlPath&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;registryPort&lt;/em&gt; is the RMI registry port and the default value
is &lt;b&gt;1099&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;You can set the RMI registry port by system property.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
-Dorg.apache.camel.jmx.rmiConnector.registryPort=&amp;lt;port number&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or, by adding a &lt;b&gt;jmxAgent&lt;/b&gt; element inside the camelContext element
in Spring configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; createConnector=&lt;span
class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt; registryPort=&lt;span
class="code-quote"&gt;"port number"&lt;/span&gt;/&amp;gt;
    ...
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;serviceUrlPath&lt;/em&gt; is the path name in the URL and the default value
is &lt;b&gt;/jmxrmi/camel&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;You can set the service URL path by system property.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
-Dorg.apache.camel.jmx.serviceUrlPath=&amp;lt;path&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or, by adding a &lt;b&gt;jmxAgent&lt;/b&gt; element inside the camelContext element
in Spring configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; createConnector=&lt;span
class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt; serviceUrlPath=&lt;span
class="code-quote"&gt;"path"&lt;/span&gt;/&amp;gt;
    ...
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;By default, RMI server object listens on a dynamically generated port which can be
a problem for connection established through a firewall. In such situation, RMI connection
port can be explicitly set by the system property.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
-Dorg.apache.camel.jmx.rmiConnector.connectorPort=&amp;lt;port number&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or, by adding a &lt;b&gt;jmxAgent&lt;/b&gt; element inside the camelContext element
in Spring configuration:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//activemq.apache.org/camel/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; createConnector=&lt;span
class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt; connectorPort=&lt;span
class="code-quote"&gt;"port number"&lt;/span&gt;/&amp;gt;
    ...
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;When the connector port option is set, the JMX service URL will become:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
service:jmx:rmi:&lt;span class="code-comment"&gt;//localhost:&amp;lt;connectorPort&amp;gt;/jndi/rmi://localhost:&amp;lt;registryPort&amp;gt;/&amp;lt;serviceUrlPath&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="CamelJMX-UsingJConsoletomonitorCamel"&gt;&lt;/a&gt;Using JConsole to
monitor Camel&lt;/h3&gt;

&lt;p&gt;The CamelContext should appear in the list of local connections, if you are running
JConsole on the same host as Camel.&lt;/p&gt;

&lt;p&gt;To connect to a remote Camel instance, or if the local process does not show up,
use Remote Process option, and enter an URL. Here is an example localhost URL:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
service:jmx:rmi:&lt;span class="code-comment"&gt;///jndi/rmi://localhost:1099/jmxrmi/camel&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Using the Apache Camel which Jconsole&lt;br/&gt;
&lt;a class="confluence-thumbnail-link 910x679" href='http://cwiki.apache.org/confluence/download/attachments/85697/camel-jmx.png'&gt;&lt;img
src="/confluence/download/thumbnails/85697/camel-jmx.png" align="absmiddle" border="0" title="updated
version after fix for camel-865" /&gt;&lt;/a&gt;&lt;br/&gt;
&amp;nbsp;&lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-TheSystemPropertiesforCamelJMXsupport"&gt;&lt;/a&gt;The SystemProperties
for Camel JMX support&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Property Name &lt;/th&gt;
&lt;th class='confluenceTh'&gt; value &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx &lt;/td&gt;
&lt;td class='confluenceTd'&gt; true or false &lt;/td&gt;
&lt;td class='confluenceTd'&gt; if is true , it will enable jmx feature in Camel &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;See more system properties in this section below: &lt;em&gt;jmxAgent Properties Reference&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-JMXinsideanApplicationServer"&gt;&lt;/a&gt;JMX inside an Application
Server&lt;/h3&gt;

&lt;h4&gt;&lt;a name="CamelJMX-JBossAS4"&gt;&lt;/a&gt;JBoss AS 4&lt;/h4&gt;

&lt;p&gt;By default JBoss creates its own MBean server.  To allow Camel to expose to the same
server follow these steps:&lt;/p&gt;

&lt;p&gt;1. Tell Camel to use the Platform MBean Server (This defaults to true in Camel 1.5)&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camel:camelContext id=&lt;span class="code-quote"&gt;"camelContext"&lt;/span&gt;&amp;gt;
  &amp;lt;camel:jmxAgent id=&lt;span class="code-quote"&gt;"jmxAgent"&lt;/span&gt; mbeanObjectDomainName=&lt;span
class="code-quote"&gt;"org.yourname"&lt;/span&gt; usePlatformMBeanServer=&lt;span class="code-quote"&gt;"&lt;span
class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt;  /&amp;gt;
&amp;lt;/camel:camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;2. Alter your JBoss instance to use the Platform MBean server.&lt;br/&gt;
Add the following property to your JAVA_OPTS by editing run.sh or run.conf {{ -Djboss.platform.mbeanserver
}} See &lt;a href="http://wiki.jboss.org/wiki/JBossMBeansInJConsole" rel="nofollow"&gt;http://wiki.jboss.org/wiki/JBossMBeansInJConsole&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a name="CamelJMX-WebSphere"&gt;&lt;/a&gt;WebSphere&lt;/h4&gt;

&lt;p&gt;Alter the mbeanServerDefaultDomain to be "WebSphere"&lt;/p&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camel:jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; createConnector=&lt;span
class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt; mbeanObjectDomainName=&lt;span
class="code-quote"&gt;"org.yourname"&lt;/span&gt; mbeanServerDefaultDomain=&lt;span class="code-quote"&gt;"WebSphere"&lt;/span&gt;/&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;h3&gt;&lt;a name="CamelJMX-AdvancedJMXConfiguration"&gt;&lt;/a&gt;Advanced JMX Configuration&lt;/h3&gt;

&lt;p&gt;The spring configuration file allows you to configure how Camel is exposed to JMX
for management. In some cases, you could specify more information here, like the connector's
port or the path name.&lt;/p&gt;

&lt;h4&gt;&lt;a name="CamelJMX-Example%3A"&gt;&lt;/a&gt;Example:&lt;/h4&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt; xmlns=&lt;span
class="code-quote"&gt;"http:&lt;span class="code-comment"&gt;//camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;
&lt;/span&gt;  &amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt; createConnector=&lt;span
class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt; registryPort=&lt;span
class="code-quote"&gt;"2000"&lt;/span&gt; mbeanServerDefaultDomain=&lt;span class="code-quote"&gt;"org.apache.camel.test"&lt;/span&gt;/&amp;gt;
    &amp;lt;route&amp;gt;
      &amp;lt;from uri=&lt;span class="code-quote"&gt;"seda:start"&lt;/span&gt;/&amp;gt;
      &amp;lt;to uri=&lt;span class="code-quote"&gt;"mock:result"&lt;/span&gt;/&amp;gt;
    &amp;lt;/route&amp;gt;
&amp;lt;/camelContext&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If you wish to change the Java 5 JMX settings you can use various &lt;a href="http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#properties"
rel="nofollow"&gt;JMX system properties&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example you can enable remote JMX connections to the Sun JMX connector, via setting
the following environment variable (using &lt;b&gt;set&lt;/b&gt; or &lt;b&gt;export&lt;/b&gt;
depending on your platform). These settings only configure the Sun JMX connector within Java
1.5+, not the JMX connector that Camel creates by default.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
SUNJMX=-Dcom.sun.management.jmxremote=&lt;span class="code-keyword"&gt;true&lt;/span&gt; -Dcom.sun.management.jmxremote.port=1616
\
-Dcom.sun.management.jmxremote.authenticate=&lt;span class="code-keyword"&gt;false&lt;/span&gt;
-Dcom.sun.management.jmxremote.ssl=&lt;span class="code-keyword"&gt;false&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(The SUNJMX environment variable is simple used by the startup script for Camel,
as additional startup parameters for the JVM. If you start Camel directly, you'll have to
pass these parameters yourself.)&lt;/p&gt;

&lt;h4&gt;&lt;a name="CamelJMX-jmxAgentPropertiesReference"&gt;&lt;/a&gt;jmxAgent Properties
Reference&lt;/h4&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Spring property &lt;/th&gt;
&lt;th class='confluenceTh'&gt; System property &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Default Value &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; id &lt;/td&gt;
&lt;td class='confluenceTd'&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class='confluenceTd'&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class='confluenceTd'&gt; The JMX agent name, and it is not optional &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; usePlatformMBeanServer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx.usePlatformMBeanServer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; false, true - Release 1.5 or later &lt;/td&gt;
&lt;td class='confluenceTd'&gt; If true then it will use the plateform MBean server form the
JVM &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; mbeanServerDefaultDomain &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx.mbeanServerDefaultDomain &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The default JMX domain of the MBeanServer &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; mbeanObjectDomainName &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx.mbeanObjectDomainName &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The JMX domain that all objects names will use &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; createConnector &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx.createRmiConnect &lt;/td&gt;
&lt;td class='confluenceTd'&gt; false &lt;/td&gt;
&lt;td class='confluenceTd'&gt; If we should create a JMX connector (to allow remote management)
for the MBeanServer &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; registryPort &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx.rmiConnector.registryPort &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 1099 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The port that the JMX RMI registry will use &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; connectorPort &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx.rmiConnector.connectorPort &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &amp;#45;1 (dynamic) &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The port that the JMX RMI server will use &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; serviceUrlPath &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx.serviceUrlPath &lt;/td&gt;
&lt;td class='confluenceTd'&gt; /jmxrmi/camel &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The path that JMX connector will be registered under &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; onlyRegisterProcessorWithCustomId &lt;/td&gt;
&lt;td class='confluenceTd'&gt; org.apache.camel.jmx.onlyRegisterProcessorWithCustomId &lt;/td&gt;
&lt;td class='confluenceTd'&gt; false &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;Camel 2.0:&lt;/b&gt; If this option is enabled then
only processors with a custom id set will be registered. This allows you to filer out unwanted
processors in the JMX console. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; statisticsLevel &lt;/td&gt;
&lt;td class='confluenceTd'&gt;&amp;nbsp;&lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;All&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;Camel 2.1:&lt;/b&gt; Configures the level for whether
performance statistics is enabled for the mbean. See section &lt;em&gt;Configuring level of
granularity for performance statistics&lt;/em&gt; for more details. &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="CamelJMX-RegisteringyourownManagedEndpoints"&gt;&lt;/a&gt;Registering
your own Managed Endpoints&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Available as of Camel 2.0&lt;/b&gt;&lt;br/&gt;
You can decorate your own endpoints with spring managed annotations &lt;b&gt;@ManagedResource&lt;/b&gt;
to allow to register them in the Camel mbean server and thus access your custom mbeans using
JMX.&lt;br/&gt;
&lt;b&gt;Notice:&lt;/b&gt; in &lt;b&gt;Camel 2.1&lt;/b&gt; we have changed this to apply other
than just endpoints but then you need to implement the interface &lt;tt&gt;org.apache.camel.spi.ManagementAware&lt;/tt&gt;
as well. More about this later.&lt;/p&gt;

&lt;p&gt;For example we have the following custom endpoint where we define some options to
be managed:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;@ManagedResource(description = &lt;span class="code-quote"&gt;"Our
custom managed endpoint"&lt;/span&gt;)
&lt;span class="code-keyword"&gt;public&lt;/span&gt; class CustomEndpoint &lt;span class="code-keyword"&gt;extends&lt;/span&gt;
MockEndpoint &lt;span class="code-keyword"&gt;implements&lt;/span&gt; ManagementAware&amp;lt;CustomEndpoint&amp;gt;
{

    &lt;span class="code-keyword"&gt;public&lt;/span&gt; CustomEndpoint(&lt;span class="code-keyword"&gt;final&lt;/span&gt;
&lt;span class="code-object"&gt;String&lt;/span&gt; endpointUri, &lt;span class="code-keyword"&gt;final&lt;/span&gt;
Component component) {
        &lt;span class="code-keyword"&gt;super&lt;/span&gt;(endpointUri, component);
    }

    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-object"&gt;Object&lt;/span&gt;
getManagedObject(CustomEndpoint object) {
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;this&lt;/span&gt;;
    }

    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-object"&gt;boolean&lt;/span&gt;
isSingleton() {
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;true&lt;/span&gt;;
    }

    &lt;span class="code-keyword"&gt;protected&lt;/span&gt; &lt;span class="code-object"&gt;String&lt;/span&gt;
createEndpointUri() {
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-quote"&gt;"custom"&lt;/span&gt;;
    }

    @ManagedAttribute
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-object"&gt;String&lt;/span&gt;
getFoo() {
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-quote"&gt;"bar"&lt;/span&gt;;
    }

    @ManagedAttribute
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-object"&gt;String&lt;/span&gt;
getEndpointUri() {
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;super&lt;/span&gt;.getEndpointUri();
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="CamelJMX-ProgrammingyourownManagedServices"&gt;&lt;/a&gt;Programming
your own Managed Services&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Available as of Camel 2.1&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Camel now offers to use your own mbeans when registering services for management.
What that means is for example you can develop a custom Camel component and have it expose
mbeans for endpoints, consumers and producers etc. All you need to do is to implement the
interface &lt;tt&gt;org.apache.camel.spi.ManagementAware&lt;/tt&gt; and return the managed
object Camel should use.&lt;/p&gt;

&lt;p&gt;Now before you think oh boys the JMX API is really painful and terrible, then yeah
you are right. Lucky for us Spring though too and they created a range of annotations you
can use to export management on an existing bean. That means that you often use that and just
return &lt;tt&gt;this&lt;/tt&gt; in the &lt;tt&gt;getManagedObject&lt;/tt&gt; from the &lt;tt&gt;ManagementAware&lt;/tt&gt;
interface. For an example see the code example above with the &lt;tt&gt;CustomEndpoint&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;Now in Camel 2.1 you can do this for all the objects that Camel registers for management
which are quite a bunch, but not all. &lt;/p&gt;

&lt;p&gt;For services which do not implement this &lt;tt&gt;ManagementAware&lt;/tt&gt; interface
then Camel will fallback to using default wrappers as defined in the table below:&lt;/p&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Type &lt;/th&gt;
&lt;th class='confluenceTh'&gt; MBean wrapper &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; CamelContext &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedCamelContext &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Component &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedComponent &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Endpoint &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedEndpoint &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Consumer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedConsumer &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Producer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedProducer &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Route &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedRoute &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Processor &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedProcessor &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Tracer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedTracer &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Service &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedService &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;In addition to that there are some extended wrappers for specialized types such as&lt;/p&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Type &lt;/th&gt;
&lt;th class='confluenceTh'&gt; MBean wrapper &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; ScheduledPollConsumer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedScheduledPollConsumer &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; BrowsableEndpoint &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedBrowseableEndpoint &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Throttler &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedThrottler &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Delayer &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedDelayer &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; SendProcessor &lt;/td&gt;
&lt;td class='confluenceTd'&gt; ManagedSendProcessor &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;And in the future we will add additional wrappers for more EIP patterns.&lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-ManagementNamingStrategy"&gt;&lt;/a&gt;ManagementNamingStrategy&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Available as of Camel 2.1&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Camel provides a pluggable API for naming strategy by &lt;tt&gt;org.apache.camel.spi.ManagementNamingStrategy&lt;/tt&gt;.
A default implementation is used to compute the mbean names that all mbeans are registered
with. &lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-ManagementStrategy"&gt;&lt;/a&gt;ManagementStrategy&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Available as of Camel 2.1&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Camel now provides a totally pluggable management strategy that allows you to be
100% in control of management. It is a rich interface with many methods for management. Not
only for adding and removing managed objects from the mbean server but also event notification
is provided as well using the &lt;tt&gt;org.apache.camel.spi.EventNotifier&lt;/tt&gt; API.
What it does for example is to easier provide an adapter for other management products. In
additional it also allows you to provide more details and features that are provided out of
the box at Apache.&lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-Configuringlevelofgranularityforperformancestatistics"&gt;&lt;/a&gt;Configuring
level of granularity for performance statistics&lt;/h3&gt;
&lt;p&gt;&lt;b&gt;Available as of Camel 2.1&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;You can now set a pre set level whether performance statistics is enabled or not
when Camel start ups. The levels are&lt;/p&gt;
&lt;ul class="alternate" type="square"&gt;
	&lt;li&gt;&lt;tt&gt;All&lt;/tt&gt; &lt;b&gt;default&lt;/b&gt; - Camel will enable statistics
for both routes and processors (fine grained)&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;RoutesOnly&lt;/tt&gt; - Camel will only enable statistics for routes
(coarse grained)&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;Off&lt;/tt&gt; - Camel will not enable statistics for any.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;At runtime you can always use the management console (such as jconsole) to change
on a given route or processor whether its statistics are enabled or not.&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;What does
statistics enabled mean?&lt;/b&gt;&lt;br /&gt;&lt;p&gt;Statistics enabled means that Camel
will do fine grained performance statistics for that particular mbean. The statistics you
can see are many such as: number of exchanges completed/failed, last/total/mina/max/mean processing
time, first/last failed time etc.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Using Java DSL you set this level by:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
  &lt;span class="code-comment"&gt;// only enable routes when Camel starts
&lt;/span&gt;  context.getManagementStrategy().setSatisticsLevel(ManagementStatisticsLevel.RoutesOnly);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And from Spring DSL you do:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
    &lt;span class="code-tag"&gt;&amp;lt;camelContext id=&lt;span class="code-quote"&gt;"camel"&lt;/span&gt;
xmlns=&lt;span class="code-quote"&gt;"http://camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="code-tag"&gt;&amp;lt;jmxAgent id=&lt;span class="code-quote"&gt;"agent"&lt;/span&gt;
statisticsLevel=&lt;span class="code-quote"&gt;"RoutesOnly"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
     ...
    &lt;span class="code-tag"&gt;&amp;lt;/camelContext&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="CamelJMX-Whichendpointsareregistered"&gt;&lt;/a&gt;Which endpoints are
registered&lt;/h3&gt;
&lt;p&gt;In &lt;b&gt;Camel 2.1&lt;/b&gt; onwards &lt;b&gt;only&lt;/b&gt; &lt;tt&gt;singleton&lt;/tt&gt;
endpoints are registered as the overhead for non singleton will be substantial in cases where
thousands or millions of endpoints are used. This can happens when using a &lt;a href="/confluence/display/CAMEL/Recipient+List"
title="Recipient List"&gt;Recipient List&lt;/a&gt; EIP or from a &lt;tt&gt;ProducerTemplate&lt;/tt&gt;
that sends a lot of messages.&lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-Whichprocessorsareregistered"&gt;&lt;/a&gt;Which processors
are registered&lt;/h3&gt;
&lt;p&gt;See &lt;a href="/confluence/display/CAMEL/Why+is+my+processor+not+showing+up+in+JConsole"
title="Why is my processor not showing up in JConsole"&gt;this FAQ&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a name="CamelJMX-SeeAlso"&gt;&lt;/a&gt;See Also&lt;/h3&gt;
&lt;ul class="alternate" type="square"&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Management+Example" title="Management Example"&gt;Management
Example&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Why+is+my+processor+not+showing+up+in+JConsole"
title="Why is my processor not showing up in JConsole"&gt;Why is my processor not showing
up in JConsole&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+JMX"&gt;View Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=85697&amp;revisedVersion=32&amp;originalVersion=31"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+JMX?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r888278 - /camel/trunk/components/camel-test/pom.xml</title>
<author><name>davsclaus@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c20091208061834.36B5C2388882@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091208061834-36B5C2388882@eris-apache-org%3e</id>
<updated>2009-12-08T06:18:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: davsclaus
Date: Tue Dec  8 06:18:33 2009
New Revision: 888278

URL: http://svn.apache.org/viewvc?rev=888278&amp;view=rev
Log:
Added spring-aop to pom for testing

Modified:
    camel/trunk/components/camel-test/pom.xml

Modified: camel/trunk/components/camel-test/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/pom.xml?rev=888278&amp;r1=888277&amp;r2=888278&amp;view=diff
==============================================================================
--- camel/trunk/components/camel-test/pom.xml (original)
+++ camel/trunk/components/camel-test/pom.xml Tue Dec  8 06:18:33 2009
@@ -60,6 +60,12 @@
       &lt;artifactId&gt;log4j&lt;/artifactId&gt;
       &lt;scope&gt;test&lt;/scope&gt;
     &lt;/dependency&gt;
+    &lt;!-- needed for unit test as Spring JMX stuff deps on AopUtil --&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
+      &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
+      &lt;scope&gt;test&lt;/scope&gt;
+    &lt;/dependency&gt;
 
   &lt;/dependencies&gt;
 




</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; FTP2</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c2119480596.1279.1260226680025.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c2119480596-1279-1260226680025-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-07T22:58:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/FTP2"&gt;FTP2&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~muellerc"&gt;Christian
Mueller&lt;/a&gt;
    &lt;/h4&gt;
     added the ftps component documentation
          &lt;div id="versionComment" class="noteMacro" style="display:none; padding: 5px;"&gt;
     added the ftps component documentation&lt;br /&gt;
     &lt;/div&gt;
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h2&gt;&lt;a name="FTP2-FTP%2FSFTP%2FFTPSComponentCamel2.0onwards"&gt;&lt;/a&gt;FTP/SFTP/FTPS
Component - &lt;b&gt;Camel 2.0 onwards&lt;/b&gt;&lt;/h2&gt;

&lt;p&gt;This component provides access to remote file systems over the FTP and SFTP protocols.&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Using Camel
1.x&lt;/b&gt;&lt;br /&gt;&lt;p&gt;If you are using Camel 1.x then see this &lt;a href="/confluence/display/CAMEL/FTP"
title="FTP"&gt;link&lt;/a&gt; for documentation.&lt;br/&gt;
This page is only for Camel 2.0 or newer.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Using FTPS&lt;/b&gt;&lt;br
/&gt;&lt;p&gt;The FTPS component is only available in Camel 2.2 or newer.&lt;br/&gt;
FTPS (also known as FTP Secure) is an extension to FTP that adds support for the Transport
Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="FTP2-URIformat"&gt;&lt;/a&gt;URI format&lt;/h3&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
ftp:&lt;span class="code-comment"&gt;//[username@]hostname[:port]/directoryname[?options]
&lt;/span&gt;sftp:&lt;span class="code-comment"&gt;//[username@]hostname[:port]/directoryname[?options]
&lt;/span&gt;ftps:&lt;span class="code-comment"&gt;//[username@]hostname[:port]/directoryname[?options]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Where &lt;b&gt;directoryname&lt;/b&gt; represents the underlying directory. Can contain
nested folders.&lt;br/&gt;
The &lt;b&gt;username&lt;/b&gt; is currently only possible to provide in the hostname parameter.&lt;/p&gt;

&lt;p&gt;If no &lt;b&gt;username&lt;/b&gt; is provided, then &lt;tt&gt;anonymous&lt;/tt&gt;
login is attempted using no password.&lt;br/&gt;
If no &lt;b&gt;port&lt;/b&gt; number is provided, Camel will provide default values according
to the protocol (ftp = 21, sftp = 22, ftps = 2222).&lt;/p&gt;

&lt;p&gt;You can append query options to the URI in the following format, &lt;tt&gt;?option=value&amp;amp;option=value&amp;amp;...&lt;/tt&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a name="FTP2-URIOptions"&gt;&lt;/a&gt;URI Options&lt;/h3&gt;
&lt;p&gt;The options below are exclusive for the &lt;a href="/confluence/display/CAMEL/FTP2"
title="FTP2"&gt;FTP2&lt;/a&gt; component. &lt;/p&gt;
&lt;div class="confluenceTableSmall"&gt;&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Name &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Default Value &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;password&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Specifies the password to use to log in to the remote file
system. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;binary&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;false&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Specifies the file transfer mode, BINARY or ASCII. Default
is ASCII (&lt;tt&gt;false&lt;/tt&gt;). &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;localWorkDirectory&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; When consuming, a local work directory can be used to store
the remote file content directly in local files, to avoid loading the content into memory.
This is beneficial, if you consume a very big remote file and thus can conserve memory. See
below for more details. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;passiveMode&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;false&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTP and FTPS only&lt;/b&gt;: Specifies whether to
use passive mode connections. Default is active mode (&lt;tt&gt;false&lt;/tt&gt;). &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;securityProtocol&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;TLS&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS only:&lt;/b&gt; Sets the underlying security
protocol. The following values are defined:&lt;br clear="all" /&gt;
&lt;tt&gt;TLS&lt;/tt&gt;: Transport Layer Security&lt;br clear="all" /&gt;
&lt;tt&gt;SSL&lt;/tt&gt;: Secure Sockets Layer &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;isImplicit&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;false&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS only:&lt;/b&gt; Sets the security mode(implicit/explicit).
Default is explicit (&lt;tt&gt;false&lt;/tt&gt;). &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;knownHostsFile&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;SFTP only:&lt;/b&gt; Sets the &lt;tt&gt;known_hosts&lt;/tt&gt;
file, so that the SFTP endpoint can do host key verification. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;privateKeyFile&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;SFTP only:&lt;/b&gt; Set the private key file to
that the SFTP endpoint can do private key verification. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;privateKeyFilePassphrase&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;SFTP only:&lt;/b&gt; Set the private key file passphrase
to that the SFTP endpoint can do private key verification. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;maximumReconnectAttempts&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 3 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Specifies the maximum reconnect attempts Camel performs when
it tries to connect to the remote FTP server. Use 0 to disable this behavior. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;reconnectDelay&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; 1000 &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Delay in millis Camel will wait before performing a reconnect
attempt. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTP and FTPS Only:&lt;/b&gt; &lt;b&gt;Camel 2.1:&lt;/b&gt;
Allows you to use a custom &lt;tt&gt;org.apache.commons.net.ftp.FTPClient&lt;/tt&gt; instance.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClientConfig&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTP and FTPS Only:&lt;/b&gt; &lt;b&gt;Camel 2.1:&lt;/b&gt;
Allows you to use a custom &lt;tt&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/tt&gt;
instance. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.trustStore.file&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the trust store file, so
that the FTPS client can look up for trusted certificates. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.trustStore.type&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;JKS&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the trust store type. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.trustStore.algorithm&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;SunX509&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the trust store algorithm.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.trustStore.password&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the trust store password.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.keyStore.file&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the key store file, so
that the FTPS client can look up for the private certificate. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.keyStore.type&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;JKS&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the key store type. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.keyStore.algorithm&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;SunX509&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the key store algorithm.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.keyStore.password&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the key store password.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;ftpClient.keyStore.keyPassword&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;null&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;b&gt;FTPS Only:&lt;/b&gt; Sets the private key password.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;FTPS component
default trust store&lt;/b&gt;&lt;br /&gt;&lt;p&gt;By default, the FTPS component trust store
accept all certificates. If you only want trust selective certificates, you have to configure
the trust store with the &lt;tt&gt;ftpClient.trustStore.xxx&lt;/tt&gt; options or by configuring
a custom &lt;tt&gt;ftpClient&lt;/tt&gt;.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You can configure additional options on the &lt;tt&gt;ftpClient&lt;/tt&gt; and &lt;tt&gt;ftpClientConfig&lt;/tt&gt;
from the URI directly by using the &lt;tt&gt;ftpClient.&lt;/tt&gt; or &lt;tt&gt;ftpClientConfig.&lt;/tt&gt;
prefix.&lt;/p&gt;

&lt;p&gt;For example to set the &lt;tt&gt;setDataTimeout&lt;/tt&gt; on the &lt;tt&gt;FTPClient&lt;/tt&gt;
to 30 seconds you can do:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"ftp:&lt;span class="code-comment"&gt;//foo@myserver?password=secret&amp;amp;ftpClient.dataTimeout=30000"&lt;/span&gt;).to(&lt;span
class="code-quote"&gt;"bean:foo"&lt;/span&gt;);&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can mix and match and have use both prefixes, for example to configure date format
or timezones.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"ftp:&lt;span class="code-comment"&gt;//foo@myserver?password=secret&amp;amp;ftpClient.dataTimeout=30000&amp;amp;ftpClientConfig.serverLanguageCode=fr"&lt;/span&gt;).to(&lt;span
class="code-quote"&gt;"bean:foo"&lt;/span&gt;);&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can have as many of these options as you like.&lt;/p&gt;

&lt;p&gt;See the documentation of the &lt;a href="http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClientConfig.html"
rel="nofollow"&gt;Apache Commons FTP FTPClientConfig&lt;/a&gt; for possible options and more
details.&lt;br/&gt;
And as well for &lt;a href="http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html"
rel="nofollow"&gt;Apache Commons FTP FTPClient&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you do not like having many and long configuration in the url you can refer to
the &lt;tt&gt;ftpClient&lt;/tt&gt; or &lt;tt&gt;ftpClientConfig&lt;/tt&gt; to use by letting
Camel lookup in the &lt;a href="/confluence/display/CAMEL/Registry" title="Registry"&gt;Registry&lt;/a&gt;
for it.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
   &amp;lt;bean id=&lt;span class="code-quote"&gt;"myConfig"&lt;/span&gt; class=&lt;span class="code-quote"&gt;"org.apache.commons.net.ftp.FTPClientConfig"&lt;/span&gt;&amp;gt;
       &amp;lt;property name=&lt;span class="code-quote"&gt;"lenientFutureDates"&lt;/span&gt;
value=&lt;span class="code-quote"&gt;"&lt;span class="code-keyword"&gt;true&lt;/span&gt;"&lt;/span&gt;/&amp;gt;
       &amp;lt;property name=&lt;span class="code-quote"&gt;"serverLanguageCode"&lt;/span&gt;
value=&lt;span class="code-quote"&gt;"fr"&lt;/span&gt;/&amp;gt;
   &amp;lt;/bean&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And then let Camel lookup this bean when you use the # notation in the url.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"ftp:&lt;span class="code-comment"&gt;//foo@myserver?password=secret&amp;amp;ftpClientConfig=#myConfig"&lt;/span&gt;).to(&lt;span
class="code-quote"&gt;"bean:foo"&lt;/span&gt;);&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;h3&gt;&lt;a name="FTP2-MoreURIoptions"&gt;&lt;/a&gt;More URI options&lt;/h3&gt;
&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;See &lt;a
href="/confluence/display/CAMEL/File2" title="File2"&gt;File2&lt;/a&gt; as all the options
there also applies for this component.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;&lt;a name="FTP2-Examples"&gt;&lt;/a&gt;Examples&lt;/h4&gt;
&lt;p&gt;&lt;tt&gt;&lt;a href="ftp://someone@someftpserver.com/public/upload/images/holiday2008?password=secret&amp;amp;binary=true"
rel="nofollow"&gt;ftp://someone@someftpserver.com/public/upload/images/holiday2008?password=secret&amp;amp;binary=true&lt;/a&gt;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&lt;a href="ftp://someoneelse@someotherftpserver.co.uk:12049/reports/2008/password=secret&amp;amp;binary=false"
rel="nofollow"&gt;ftp://someoneelse@someotherftpserver.co.uk:12049/reports/2008/password=secret&amp;amp;binary=false&lt;/a&gt;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&lt;a href="ftp://publicftpserver.com/download" rel="nofollow"&gt;ftp://publicftpserver.com/download&lt;/a&gt;&lt;/tt&gt;&lt;/p&gt;

&lt;div class='panelMacro'&gt;&lt;table class='warningMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;FTP Consumer
does not support concurrency&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The FTP consumer (with the same
endpoint) does not support concurrency (the backing FTP client is not thread safe).&lt;br/&gt;
You can use multiple FTP consumers to poll from different endpoints. It is only a single endpoint
that does not support concurrent consumers.&lt;/p&gt;

&lt;p&gt;The FTP producer does &lt;b&gt;not&lt;/b&gt; have this issue, it supports concurrency.&lt;/p&gt;

&lt;p&gt;In the future we will &lt;a href="https://issues.apache.org/activemq/browse/CAMEL-1682"
rel="nofollow"&gt;add consumer pooling to Camel&lt;/a&gt; to allow this consumer to support
concurrency as well.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;div class='panelMacro'&gt;&lt;table class='tipMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/check.gif" width="16" height="16"
align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;More information&lt;/b&gt;&lt;br
/&gt;&lt;p&gt;This component is an extension of the &lt;a href="/confluence/display/CAMEL/File2"
title="File2"&gt;File2&lt;/a&gt; component. So there are more samples and details on the &lt;a
href="/confluence/display/CAMEL/File2" title="File2"&gt;File2&lt;/a&gt; component page.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="FTP2-Defaultwhenconsumingfiles"&gt;&lt;/a&gt;Default when consuming
files&lt;/h3&gt;
&lt;p&gt;The &lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP&lt;/a&gt; consumer
will by default leave the consumed files untouched on the remote FTP server. You have to configure
it explicit if you want it to delete the files or move them to another location. For example
you can use &lt;tt&gt;delete=true&lt;/tt&gt; to delete the files, or use &lt;tt&gt;move=.done&lt;/tt&gt;
to move the files into a hidden done sub directory.&lt;/p&gt;

&lt;p&gt;The regular &lt;a href="/confluence/display/CAMEL/File2" title="File2"&gt;File&lt;/a&gt;
consumer is different as it will by default move files to a &lt;tt&gt;.camel&lt;/tt&gt; sub
directory. The reason Camel does &lt;b&gt;not&lt;/b&gt; do this by default for the FTP consumer
is that it may lack permissions by default to be able to move or delete files.&lt;/p&gt;

&lt;h4&gt;&lt;a name="FTP2-limitations"&gt;&lt;/a&gt;limitations&lt;/h4&gt;
&lt;p&gt;The option &lt;b&gt;readLock&lt;/b&gt; can be used to force Camel &lt;b&gt;not&lt;/b&gt;
to consume files that is currently in the progress of being written. However, this option
is turned off by default, as it requires that the user has write access. There are other solutions
to avoid consuming files that are currently being written over FTP; for instance, you can
write to a temporary destination and move the file after it has been written. &lt;/p&gt;

&lt;p&gt;When moving files using &lt;tt&gt;move&lt;/tt&gt; or &lt;tt&gt;preMove&lt;/tt&gt;
option the files are restricted to the FTP_ROOT folder. That prevents you from moving files
outside the FTP area. If you want to move files to another area you can use soft links and
move files into a soft linked folder.&lt;/p&gt;

&lt;h3&gt;&lt;a name="FTP2-MessageHeaders"&gt;&lt;/a&gt;Message Headers&lt;/h3&gt;

&lt;p&gt;The following message headers can be used to affect the behavior of the component&lt;/p&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Header &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelFileName&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Specifies the output file name (relative to the endpoint directory)
to be used for the output message when sending to the endpoint. If this is not present and
no expression either, then a generated message ID is used as the filename instead.  &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelFileNameProduced&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The actual absolute filepath (path + name) for the output
file that was written. This header is set by Camel and its purpose is providing end-users
the name of the file that was written. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelFileBatchIndex&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Current index out of total number of files being consumed
in this batch. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelFileBatchSize&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Total number of files being consumed in this batch. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelFileHost&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; The remote hostname. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; &lt;tt&gt;CamelFileLocalWorkPath&lt;/tt&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; Path to the local work file, if local work directory is used.
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="FTP2-UsingLocalWorkDirectory"&gt;&lt;/a&gt;Using Local Work Directory&lt;/h3&gt;
&lt;p&gt;Camel supports consuming from remote FTP servers and downloading the files directly
into a local work directory. This avoids reading the entire remote file content into memory
as it is streamed directly into the local file using &lt;tt&gt;FileOutputStream&lt;/tt&gt;.
&lt;/p&gt;

&lt;p&gt;Camel will store to a local file with the same name as the remote file, though with
&lt;tt&gt;.inprogress&lt;/tt&gt; as extension while the file is being downloaded. Afterwards,
the file is renamed to remove the &lt;tt&gt;.inprogress&lt;/tt&gt; suffix. And finally, when
the &lt;a href="/confluence/display/CAMEL/Exchange" title="Exchange"&gt;Exchange&lt;/a&gt;
is complete the local file is deleted. &lt;/p&gt;

&lt;p&gt;So if you want to download files from a remote FTP server and store it as files then
you need to route to a file endpoint such as:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"ftp:&lt;span class="code-comment"&gt;//someone@someserver.com?password=secret&amp;amp;localWorkDirectory=/tmp"&lt;/span&gt;).to(&lt;span
class="code-quote"&gt;"file://inbox"&lt;/span&gt;);&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;div class='panelMacro'&gt;&lt;table class='tipMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/check.gif" width="16" height="16"
align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Optimization by renaming
work file&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The route above is ultra efficient as it avoids reading
the entire file content into memory. It will download the remote file directly to a local
file stream. The &lt;tt&gt;java.io.File&lt;/tt&gt; handle is then used as the &lt;a href="/confluence/display/CAMEL/Exchange"
title="Exchange"&gt;Exchange&lt;/a&gt; body. The file producer leverages this fact and can
work directly on the work file &lt;tt&gt;java.io.File&lt;/tt&gt; handle and perform a &lt;tt&gt;java.io.File.rename&lt;/tt&gt;
to the target filename. As Camel knows it's a local work file, it can optimize and use a rename
instead of a file copy, as the work file is meant to be deleted anyway.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="FTP2-Samples"&gt;&lt;/a&gt;Samples&lt;/h3&gt;

&lt;p&gt;In the sample below we set up Camel to download all the reports from the FTP server
once every hour (60 min) as BINARY content and store it as files on the local file system.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;&lt;span class="code-keyword"&gt;protected&lt;/span&gt; RouteBuilder
createRouteBuilder() &lt;span class="code-keyword"&gt;throws&lt;/span&gt; Exception {
    &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;new&lt;/span&gt;
RouteBuilder() {
        &lt;span class="code-keyword"&gt;public&lt;/span&gt; void configure() &lt;span class="code-keyword"&gt;throws&lt;/span&gt;
Exception {
            &lt;span class="code-comment"&gt;// we use a delay of 60 minutes (eg. once pr.
hour we poll the FTP server
&lt;/span&gt;            &lt;span class="code-object"&gt;long&lt;/span&gt; delay = 60 * 60
* 1000L;

            &lt;span class="code-comment"&gt;// from the given FTP server we poll (= download)
all the files
&lt;/span&gt;            &lt;span class="code-comment"&gt;// from the &lt;span class="code-keyword"&gt;public&lt;/span&gt;/reports
folder as BINARY types and store &lt;span class="code-keyword"&gt;this&lt;/span&gt; as files
&lt;/span&gt;            &lt;span class="code-comment"&gt;// in a local directory. Camel will
use the filenames from the FTPServer
&lt;/span&gt;
            &lt;span class="code-comment"&gt;// notice that the FTPConsumer properties must
be prefixed with &lt;span class="code-quote"&gt;"consumer."&lt;/span&gt; in the URL
&lt;/span&gt;            &lt;span class="code-comment"&gt;// the delay parameter is from the
FileConsumer component so we should use consumer.delay as
&lt;/span&gt;            &lt;span class="code-comment"&gt;// the URI parameter name. The FTP
Component is an extension of the File Component.
&lt;/span&gt;            from(&lt;span class="code-quote"&gt;"ftp:&lt;span class="code-comment"&gt;//scott@localhost/&lt;span
class="code-keyword"&gt;public&lt;/span&gt;/reports?password=tiger&amp;amp;binary=&lt;span
class="code-keyword"&gt;true&lt;/span&gt;&amp;amp;consumer.delay="&lt;/span&gt; + delay).
&lt;/span&gt;                    to(&lt;span class="code-quote"&gt;"file:&lt;span class="code-comment"&gt;//target/test-reports"&lt;/span&gt;);
&lt;/span&gt;        }
    };
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And the route using Spring DSL:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
  &lt;span class="code-tag"&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
     &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"ftp://scott@localhost/public/reports?password=tiger&amp;amp;amp;binary=true&amp;amp;amp;delay=60000"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
     &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"file://target/test-reports"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h4&gt;&lt;a name="FTP2-ConsumingaremoteFTPservertriggeredbyaroute"&gt;&lt;/a&gt;Consuming
a remote FTP server triggered by a route&lt;/h4&gt;
&lt;p&gt;The FTP consumer is built as a scheduled consumer to be used in the &lt;b&gt;from&lt;/b&gt;
route. However, if you want to start consuming from an FTP server triggered within a route.
&lt;/p&gt;

&lt;p&gt;Notice we use the &lt;a href="/confluence/display/CAMEL/Content+Enricher" title="Content
Enricher"&gt;Content Enricher&lt;/a&gt; EIP with the &lt;tt&gt;pollEnrich&lt;/tt&gt; DSL to
consume the FTP file:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"seda:start"&lt;/span&gt;)
   &lt;span class="code-comment"&gt;// set the filename in FILE_NAME header so Camel know
the name of the remote file to poll
&lt;/span&gt;   .setHeader(Exchange.FILE_NAME, header(&lt;span class="code-quote"&gt;"myfile"&lt;/span&gt;))
   .pollEnrich(&lt;span class="code-quote"&gt;"ftp:&lt;span class="code-comment"&gt;//admin@localhost:21/getme?password=admin&amp;amp;binary=&lt;span
class="code-keyword"&gt;false&lt;/span&gt;"&lt;/span&gt;)
&lt;/span&gt;   .to(&lt;span class="code-quote"&gt;"mock:result"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h4&gt;&lt;a name="FTP2-ConsumingaremoteFTPSserver%28implicitSSL%29andclientauthentication"&gt;&lt;/a&gt;Consuming
a remote FTPS server (implicit SSL) and client authentication&lt;/h4&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"ftps:&lt;span class="code-comment"&gt;//admin@localhost:2222/&lt;span
class="code-keyword"&gt;public&lt;/span&gt;/camel?password=admin&amp;amp;securityProtocol=SSL&amp;amp;isImplicit=&lt;span
class="code-keyword"&gt;true&lt;/span&gt;&amp;amp;ftpClient.keyStore.file=./src/test/resources/server.jks&amp;amp;ftpClient.keyStore.password=password&amp;amp;ftpClient.keyStore.keyPassword=password"&lt;/span&gt;)
&lt;/span&gt;  .to(&lt;span class="code-quote"&gt;"bean:foo"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h4&gt;&lt;a name="FTP2-ConsumingaremoteFTPSserver%28explicitTLS%29andacustomtruststoreconfiguration"&gt;&lt;/a&gt;Consuming
a remote FTPS server (explicit TLS) and a custom trust store configuration&lt;/h4&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
from(&lt;span class="code-quote"&gt;"ftps:&lt;span class="code-comment"&gt;//admin@localhost:2222/&lt;span
class="code-keyword"&gt;public&lt;/span&gt;/camel?password=admin&amp;amp;ftpClient.trustStore.file=./src/test/resources/server.jks&amp;amp;ftpClient.trustStore.password=password"&lt;/span&gt;)
&lt;/span&gt;  .to(&lt;span class="code-quote"&gt;"bean:foo"&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="FTP2-Filterusing%7B%7Borg.apache.camel.component.file.GenericFileFilter%7D%7D"&gt;&lt;/a&gt;Filter
using &lt;tt&gt;org.apache.camel.component.file.GenericFileFilter&lt;/tt&gt;&lt;/h3&gt;
&lt;p&gt;Camel supports pluggable filtering strategies. This strategy it to use the build
in &lt;tt&gt;org.apache.camel.component.file.GenericFileFilter&lt;/tt&gt; in Java. You can
then configure the endpoint with such a filter to skip certain filters before being processed.&lt;/p&gt;

&lt;p&gt;In the sample we have build our own filter that only accepts files starting with
report in the filename.&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;&lt;span class="code-keyword"&gt;public&lt;/span&gt; class MyFileFilter
&lt;span class="code-keyword"&gt;implements&lt;/span&gt; GenericFileFilter {

    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-object"&gt;boolean&lt;/span&gt;
accept(GenericFile file) {
        &lt;span class="code-comment"&gt;// we only want report files 
&lt;/span&gt;        &lt;span class="code-keyword"&gt;return&lt;/span&gt; file.getFileName().startsWith(&lt;span
class="code-quote"&gt;"report"&lt;/span&gt;);
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And then we can configure our route using the &lt;b&gt;filter&lt;/b&gt; attribute
to reference our filter (using &lt;tt&gt;&amp;#35;&lt;/tt&gt; notation) that we have defines
in the spring XML file:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
   &lt;span class="code-tag"&gt;&lt;span class="code-comment"&gt;&amp;lt;!-- define our sorter
as a plain spring bean --&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span class="code-tag"&gt;&amp;lt;bean id=&lt;span class="code-quote"&gt;"myFilter"&lt;/span&gt;
class=&lt;span class="code-quote"&gt;"com.mycompany.MyFileFilter"&lt;/span&gt;/&amp;gt;&lt;/span&gt;

  &lt;span class="code-tag"&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;from uri=&lt;span class="code-quote"&gt;"ftp://someuser@someftpserver.com?password=secret&amp;amp;amp;filter=#myFilter"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"bean:processInbox"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;h3&gt;&lt;a name="FTP2-FilteringusingANTpathmatcher"&gt;&lt;/a&gt;Filtering using ANT
path matcher&lt;/h3&gt;
&lt;p&gt;The ANT path matcher is a filter that is shipped out-of-the-box in the &lt;b&gt;camel-spring&lt;/b&gt;
jar. So you need to depend on &lt;b&gt;camel-spring&lt;/b&gt; if you are using Maven.&lt;br/&gt;
The reason is that we leverage Spring's &lt;a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/util/AntPathMatcher.html"
rel="nofollow"&gt;AntPathMatcher&lt;/a&gt; to do the actual matching.&lt;/p&gt;

&lt;p&gt;The file paths are matched with the following rules:&lt;/p&gt;
&lt;ul class="alternate" type="square"&gt;
	&lt;li&gt;&lt;tt&gt;?&lt;/tt&gt; matches one character&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;*&lt;/tt&gt; matches zero or more characters&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;**&lt;/tt&gt; matches zero or more directories in a path&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The sample below demonstrates how to use it:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;&lt;span class="code-tag"&gt;&amp;lt;camelContext xmlns=&lt;span
class="code-quote"&gt;"http://camel.apache.org/schema/spring"&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;template id=&lt;span class="code-quote"&gt;"camelTemplate"&lt;/span&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="code-tag"&gt;&lt;span class="code-comment"&gt;&amp;lt;!-- use myFilter
as filter to allow setting ANT paths for which files to scan for --&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;endpoint id=&lt;span class="code-quote"&gt;"myFTPEndpoint"&lt;/span&gt;
uri=&lt;span class="code-quote"&gt;"ftp://admin@localhost:20123/antpath?password=admin&amp;amp;amp;recursive=true&amp;amp;amp;delay=10000&amp;amp;amp;initialDelay=2000&amp;amp;amp;filter=#myAntFilter"&lt;/span&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="code-tag"&gt;&amp;lt;route&amp;gt;&lt;/span&gt;
        &lt;span class="code-tag"&gt;&amp;lt;from ref=&lt;span class="code-quote"&gt;"myFTPEndpoint"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="code-tag"&gt;&amp;lt;to uri=&lt;span class="code-quote"&gt;"mock:result"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;/route&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/camelContext&amp;gt;&lt;/span&gt;

&lt;span class="code-tag"&gt;&lt;span class="code-comment"&gt;&amp;lt;!-- we use the AntPathMatcherRemoteFileFilter
to use ant paths for includes and exlucde --&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;bean id=&lt;span class="code-quote"&gt;"myAntFilter"&lt;/span&gt;
class=&lt;span class="code-quote"&gt;"org.apache.camel.component.file.AntPathMatcherGenericFileFilter"&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&lt;span class="code-comment"&gt;&amp;lt;!-- include and
file in the subfolder that has day in the name --&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;property name=&lt;span class="code-quote"&gt;"includes"&lt;/span&gt;
value=&lt;span class="code-quote"&gt;"**/subfolder/**/*day*"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&lt;span class="code-comment"&gt;&amp;lt;!-- exclude all
files with bad in name or .xml files. Use comma to seperate multiple excludes --&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class="code-tag"&gt;&amp;lt;property name=&lt;span class="code-quote"&gt;"excludes"&lt;/span&gt;
value=&lt;span class="code-quote"&gt;"**/*bad*,**/*.xml"&lt;/span&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="FTP2-Debuglogging"&gt;&lt;/a&gt;Debug logging&lt;/h3&gt;
&lt;p&gt;This component has log level &lt;b&gt;TRACE&lt;/b&gt; that can be helpful if you
have problems.&lt;/p&gt;

&lt;h3&gt;&lt;a name="FTP2-SeeAlso"&gt;&lt;/a&gt;See Also&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel"&gt;Configuring
Camel&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Component" title="Component"&gt;Component&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Endpoint" title="Endpoint"&gt;Endpoint&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started"&gt;Getting
Started&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ul class="alternate" type="square"&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/File2" title="File2"&gt;File2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/FTP2"&gt;View Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=109470&amp;revisedVersion=28&amp;originalVersion=27"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/FTP2?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>[CONF] Apache Camel &gt; Camel 2.2.0 Release</title>
<author><name>confluence@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/camel-commits/200912.mbox/%3c258704675.1259.1260221940016.JavaMail.www-data@brutus%3e"/>
<id>urn:uuid:%3c258704675-1259-1260221940016-JavaMail-www-data@brutus%3e</id>
<updated>2009-12-07T21:39:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&lt;html&gt;
&lt;head&gt;
    &lt;base href="http://cwiki.apache.org/confluence"&gt;
            &lt;link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;amp;forWysiwyg=true"
type="text/css"&gt;
    &lt;/head&gt;
&lt;body style="background-color: white" bgcolor="white"&gt;
&lt;div id="pageContent"&gt;
&lt;div id="notificationFormat"&gt;
&lt;div class="wiki-content"&gt;
&lt;div class="email"&gt;
     &lt;h2&gt;&lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;Camel
2.2.0 Release&lt;/a&gt;&lt;/h2&gt;
     &lt;h4&gt;Page &lt;b&gt;edited&lt;/b&gt; by             &lt;a href="http://cwiki.apache.org/confluence/display/~muellerc"&gt;Christian
Mueller&lt;/a&gt;
    &lt;/h4&gt;
     
          &lt;br/&gt;
     &lt;div class="notificationGreySide"&gt;
         &lt;h1&gt;&lt;a name="Camel2.2.0Release-Camel2.2.0release%28currentlyinprogress%29"&gt;&lt;/a&gt;Camel
2.2.0 release (currently in progress)&lt;/h1&gt;

&lt;div style="padding-right:20px;float:left;margin-left:-20px;"&gt;&lt;p&gt;&lt;img src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"
align="absmiddle" border="0" /&gt;&lt;/p&gt;&lt;/div&gt;
&lt;div style="min-height:200px"&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-NewandNoteworthy"&gt;&lt;/a&gt;New and Noteworthy&lt;/h2&gt;

&lt;p&gt;Welcome to the 2.2.0 release which approx XXX issues resolved (new features, improvements
and bug fixes such as...)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Routing+Slip" title="Routing Slip"&gt;Routing
Slip&lt;/a&gt; now breaks when an exception occurred&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/MINA" title="MINA"&gt;MINA&lt;/a&gt; now
supports easier configuration of multiple custom codecs, which is needed when working with
SSL.&lt;/li&gt;
	&lt;li&gt;Improved &lt;a href="/confluence/display/CAMEL/TransactionErrorHandler" title="TransactionErrorHandler"&gt;TransactionErrorHandler&lt;/a&gt;
two fold by reducing complexity of internal logic in Camel when working with transactions.
And added better support for using multiple transactions in multiple routes. See more at section
&lt;em&gt;Using multiple routes with different propagation behaviors&lt;/em&gt; at &lt;a href="/confluence/display/CAMEL/Transactional+Client"
title="Transactional Client"&gt;Transactional Client&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/Recipient+List" title="Recipient List"&gt;Recipient
List&lt;/a&gt; now supports &lt;tt&gt;parallelProcessing&lt;/tt&gt;, &lt;tt&gt;stopOnException&lt;/tt&gt;
and references for &lt;tt&gt;AggregationStrategy&lt;/tt&gt; and thread pools. This applies
to the &lt;tt&gt;@RecipientList&lt;/tt&gt; annotation as well.&lt;/li&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
&lt;/ul&gt;



&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewEnterpriseIntegrationPatterns"&gt;&lt;/a&gt;New
&lt;a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns" title="Enterprise Integration
Patterns"&gt;Enterprise Integration Patterns&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewComponents"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Components"
title="Components"&gt;Components&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;a href="/confluence/display/CAMEL/FTP2" title="FTP2"&gt;FTP2&lt;/a&gt; component
now supports &lt;tt&gt;FTPS&lt;/tt&gt; (FTP over SSL/TLS)&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDSL"&gt;&lt;/a&gt;New DSL&lt;/h3&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;markRollbackOnlyLast&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewAnnotations"&gt;&lt;/a&gt;New Annotations&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewDataFormatsDataFormat"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Data+Format"
title="Data Format"&gt;Data Formats&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewLanguages"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Languages"
title="Languages"&gt;Languages&lt;/a&gt;&lt;/h3&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-NewExamples"&gt;&lt;/a&gt;New &lt;a href="/confluence/display/CAMEL/Examples"
title="Examples"&gt;Examples&lt;/a&gt;&lt;/h3&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-APIbreaking"&gt;&lt;/a&gt;API breaking&lt;/h2&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-KnownIssues"&gt;&lt;/a&gt;Known Issues&lt;/h2&gt;

&lt;p&gt;See known issues from previous releases.&lt;/p&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Importantchangestoconsiderwhenupgrading"&gt;&lt;/a&gt;Important
changes to consider when upgrading&lt;/h2&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-GettingtheDistributions"&gt;&lt;/a&gt;Getting the
Distributions&lt;/h2&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-BinaryDistributions"&gt;&lt;/a&gt;Binary Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Windows Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip"
rel="nofollow"&gt;apache-camel-2.2.0.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Unix/Linux/Cygwin Distribution &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class='panelMacro'&gt;&lt;table class='infoMacro'&gt;&lt;colgroup&gt;&lt;col width='24'&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tr&gt;&lt;td
valign='top'&gt;&lt;img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;The above
URLs use redirection&lt;/b&gt;&lt;br /&gt;&lt;p&gt;The above URLs use the Apache Mirror system
to redirect you to a suitable mirror for your download. Some users have experienced issues
with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to
work for you from the above URL then try using &lt;a href="http://www.mozilla.com/en-US/firefox/"
rel="nofollow"&gt;FireFox&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SourceDistributions"&gt;&lt;/a&gt;Source Distributions&lt;/h3&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class='confluenceTh'&gt; Description &lt;/th&gt;
&lt;th class='confluenceTh'&gt; Download Link &lt;/th&gt;
&lt;th class='confluenceTh'&gt; PGP Signature file of download &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Windows &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.zip.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.zip.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;table class='confluenceTable'&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class='confluenceTd'&gt; Source for Unix/Linux/Cygwin &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dyn/closer.cgi/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz&lt;/a&gt; &lt;/td&gt;
&lt;td class='confluenceTd'&gt; &lt;a href="http://www.apache.org/dist/activemq/apache-camel/2.2.0/apache-camel-2.2.0-src.tar.gz.asc"
rel="nofollow"&gt;apache-camel-2.2.0-src.tar.gz.asc&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-GettingtheBinariesusingMaven2"&gt;&lt;/a&gt;Getting
the Binaries using Maven 2&lt;/h3&gt;

&lt;p&gt;To use this release in your maven project, the proper dependency configuration that
you should use in your &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html"
rel="nofollow"&gt;Maven POM&lt;/a&gt; is:&lt;/p&gt;
&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-xml"&gt;
&lt;span class="code-tag"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.camel&lt;span
class="code-tag"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;camel-core&lt;span class="code-tag"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="code-tag"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;2.2.0&lt;span class="code-tag"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="code-tag"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3&gt;&lt;a name="Camel2.2.0Release-SVNTagCheckout"&gt;&lt;/a&gt;SVN Tag Checkout&lt;/h3&gt;

&lt;div class="code panel" style="border-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;
&lt;pre class="code-java"&gt;
svn co http:&lt;span class="code-comment"&gt;//svn.apache.org/repos/asf/camel/tags/camel-2.2.0&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;&lt;a name="Camel2.2.0Release-Changelog"&gt;&lt;/a&gt;Changelog&lt;/h2&gt;

&lt;p&gt;For a more detailed view of new features and bug fixes, see the:&lt;br/&gt;
TODO: Fix for 2.2.0&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://issues.apache.org/activemq/secure/ReleaseNote.jspa?projectId=11020&amp;amp;styleName=Html&amp;amp;version=11900"
rel="nofollow"&gt;release notes for 2.2.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

     &lt;/div&gt;
     &lt;div id="commentsSection" class="wiki-content pageSection"&gt;
       &lt;div style="float: right;"&gt;
            &lt;a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey"&gt;Change Notification Preferences&lt;/a&gt;
       &lt;/div&gt;

       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release"&gt;View
Online&lt;/a&gt;
       |
       &lt;a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=9011430&amp;revisedVersion=6&amp;originalVersion=5"&gt;View
Change&lt;/a&gt;
              |
       &lt;a href="http://cwiki.apache.org/confluence/display/CAMEL/Camel+2.2.0+Release?showComments=true&amp;amp;showCommentArea=true#addcomment"&gt;Add
Comment&lt;/a&gt;
            &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;


</pre>
</div>
</content>
</entry>
</feed>
