[CONF] Apache Camel Articles
Articles Page edited by Claus Ibsen Changes (1) ... * [Gotcha when using Camel Servlet|http://java.dzone.com/articles/gotcha-when-using-camel] \- A blog post with some advice when using the Camel Servlet component. * [Working with EMail attachments|http://jason-sherman.blogspot.se/2012/04/camel-working-with-email-attachments.html] \- by Jason Sherman, whom blogs about how to split emails with multiple attachments into multiple messages with a single attachment each, for further processing in Camel. * [Using Quartz, Camel and Spring for Distributed Service Orchestration|http://thinkinginsoftware.blogspot.se/2012/05/using-quartz-camel-and-spring-for.html] \- by Nestor Urquiza blogs about using Quartz and Camel to build a distributed solution running a clustered Camel application on multiple Tomcat instances. h3. Tooling / Combination with other Products ... Full Content See alsoSee also Camel User Stories. We have collected a number of links to external resources about Camel. The lists are ordered so the newest links are added to the bottom of each list. Articles on Apache Camel Introduction If you have never used or seen Camel before, then you should start with Apache Camel Tutorial Introduction to EIP, Routes, Components, Testing, and other Concepts an article by Kai Wähner, where he puts EIP and Camel into the big picture and gives a run down of the important Camel concepts. Demo source code can be downloaded at github to get started with your first Camel project easily. Some further simple introductory articles to learn the basics: Simple DSL OSGi bundle example by Andrej Koelewijn Realization of EAI Patterns with Apache Camel by Pascal Kolb at the Universität Stuttgart Navigating the Integration Landscape - Claus Ibsen on Apache Camel Claus Ibsen was interviewed at DZone discussing the integration landscape Enterprise Integration Pattern with Apache Camel 2.0 by Julien Dechmann, how to use Camel to split and transform CSV files to POJO and XML and sending to a JMS destination Camellos - Discovering Apache Camel by Gunnar Hillert. A very nice and short blog series about Camel showing its powers in a simple and intuitive way. First step with Apache Camel by Lukasz Budnik. Great first steps where Lukas does a fairly complex route as his first encounter with Camel. Devoxx talk about Apache Camel Impressions from the talk by Jos Nieuwenhuis LEGO Java: Apache Camel Context and Route Basics shows how to build integration applications using EIPs LEGO style. Building an application to parse HTML pages from web sites. LEGO® Java (II): Apache Camel Error Handling, Java Beans and Web Services part 2 of the LEGO Camel blog series. This time we covers error handling and using beans with Camel. Using Camel These examples show usage of several different components and other concepts such as error handling. A bit more meat: Camel applied : JMS to File by Mike McLean Matteo wrote a blog entry about using Camel with iBatis Using the Camel aggregator correctly by Torsten Mielke, a great blog entry how to use the Camel aggregator. Spring Remoting with JMS Example on Amin Abbaspour's Weblog Camel routes and HL7 by Roger Searjeant on using Camel and its HL7 support in the health care space. Leverage EIP with Apache Camel and Twitter by Bruno Borges Using RSS with Apache Camel by Jeroen Reijn Axis 2 ride with Camel how to use Axis 2 with Camel by Sagara A Camel based XML payload HTTP polling provider by Christopher Hunt to use Camel with AJAX. Interesting read. First steps with Apache Camel on Google App Engine by Martin Krasser posts his findings to get Camel running on the GAE. Camel, CXF and JMS by Example by Silvester van der Bijl. Good blog entry how to use CXF and Camel together. A simple file monitoring console with camel, cometd and jquery 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. Advanced Event Notification Framework with Apache Camel by Hendy showing how to use Camel for a lightweight even notification system. Camel IRC Message Route Example by James Carr. An IRC bot which can parse _javascript_ and Ruby expressions. A composite REST service using Apache Camel by Andrej Koelewijn. A blog entry how to expose a REST service and have Camel aggregate data from multiple sources to be returned. EDA events over system boundaries with Camel by Sculptur team blog. Dynamic FTP Client using Apache Camel and Spring by Mattias Severson, showing how to develop an FTP client that could transmit files to various FTP servers as a part of a delivery system in a Java enterprise application. Using Apache
svn commit: r819961 - in /websites/production/camel/content: articles.html cache/main.pageCache
Author: buildbot Date: Sat Jun 2 08:18:11 2012 New Revision: 819961 Log: Production update by buildbot for camel Modified: websites/production/camel/content/articles.html websites/production/camel/content/cache/main.pageCache Modified: websites/production/camel/content/articles.html == --- websites/production/camel/content/articles.html (original) +++ websites/production/camel/content/articles.html Sat Jun 2 08:18:11 2012 @@ -96,7 +96,7 @@ pThese examples show usage of several different components and other concepts such as error handling./p -ullia shape=rect class=external-link href=http://mikemclean.ca/muse/2009/05/a-bit-more-meat-camel-applied-jms-to-file/; rel=nofollowA bit more meat: Camel applied : JMS to File/a by Mike McLean/liliMatteo wrote a blog entry about a shape=rect class=external-link href=http://matteoredaelli.wordpress.com/2008/10/08/using-apache-camel-with-ibatis/; rel=nofollowusing Camel with iBatis/a/lilia shape=rect class=external-link href=http://tmielke.blogspot.com/2009/01/using-camel-aggregator-correctly.html; rel=nofollowUsing the Camel aggregator correctly/a by Torsten Mielke, a great blog entry how to use the Camel aggregator./lilia shape=rect class=external-link href=http://aminsblog.wordpress.com/2008/05/06/15/; rel=nofollowSpring Remoting with JMS Example/a on a shape=rect class=external-link href=http://searjeant.blogspot.com/2009/02/camel-routes-and-hl7.html; rel=nofollowAmin Abbaspour's Weblog/a/lilia sh ape=rect class=external-link href=http://searjeant.blogspot.com/2009/02/camel-routes-and-hl7.html; rel=nofollowCamel routes and HL7/a by Roger Searjeant on using Camel and its HL7 support in the health care space./lilia shape=rect class=external-link href=http://blog.brunoborges.com.br/2009/03/leverage-eip-with-apache-camel-and.html; rel=nofollowLeverage EIP with Apache Camel and Twitter/a by Bruno Borges/lilia shape=rect class=external-link href=http://blog.jeroenreijn.com/2009/03/apache-camel-open-source-integration.html; rel=nofollowUsing RSS with Apache Camel/a by Jeroen Reijn/lilia shape=rect class=external-link href=http://ssagara.blogspot.com/2009/04/axis2-ride-with-camel.html; rel=nofollowAxis 2 ride with Camel/a how to use Axis 2 with Camel by Sagara/lilia shape=rect class=external-link href=http://christopherhunt-software.blogspot.com/2009/07/camel-based-xml-payload-http-polling.html; rel=nofollowA Camel based XML payload HTTP polling provider/a by Christopher Hunt to use Camel with AJAX. Interesting read./lilia shape=rect class=external-link href=http://krasserm.blogspot.com/2009/10/first-steps-with-apache-camel-on-google.html; rel=nofollowFirst steps with Apache Camel on Google App Engine/a by Martin Krasser posts his findings to get Camel running on the GAE./lilia shape=rect class=external-link href=http://blog.software-art.nl/2009/11/15/camel-cxf-and-jms-by-example/; rel=nofollowCamel, CXF and JMS by Example/a by Silvester van der Bijl. Good blog entry how to use CXF and Camel together./lilia shape=rect class=external-link href=http://www.andrejkoelewijn.com/wp/2009/10/27/simple-log-console-with-camel-and-cometd/; rel=nofollowA simple file monitoring console with camel, cometd and jquery/a 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 f iles using Groovy./lilia shape=rect class=external-link href=http://spring-java-ee.blogspot.com/2010/01/advanced-event-notification-framework.html; rel=nofollowAdvanced Event Notification Framework with Apache Camel/a by Hendy showing how to use Camel for a lightweight even notification system./lilia shape=rect class=external-link href=http://github.com/jamescarr/irc-camel-example; rel=nofollowCamel IRC Message Route Example/a by James Carr. An IRC bot which can parse JavaScript and Ruby expressions./lilia shape=rect class=external-link href=http://www.andrejkoelewijn.com/wp/2010/06/13/a-composite-rest-service-using-camel/; rel=nofollowA composite REST service using Apache Camel/a by Andrej Koelewijn. A blog entry how to expose a REST service and have Camel aggregate data from multiple sources to be returned./lilia shape=rect class=external-link href=http://fornax-sculptor.blogspot.com/2010/08/eda-events-over-system-bo undaries-with.html rel=nofollowEDA events over system boundaries with Camel/a by a shape=rect class=external-link href=http://sites.google.com/site/fornaxsculptor/; rel=nofollowSculptur/a team blog./lilia shape=rect class=external-link href=http://blog.jayway.com/2010/08/12/dynamic-ftp-client-using-apache-camel-and-spring/; rel=nofollowDynamic FTP Client using Apache Camel and Spring/a by Mattias Severson, showing how to develop an FTP client that could transmit files to various FTP servers as a part of a delivery system in a Java enterprise application./lilia
[CONF] Apache Camel Articles
Articles Page edited by Claus Ibsen Changes (2) ... * [Christian Schneiders Blog|http://www.liquid-reality.de/pages/viewpage.action?pageId=131134] \- Christian occasionally blogs about Camel and CXF. * [Hadrian Zbarcea|http://camelbot.blogspot.com/] \- also blogs about Camel. * [Marcelo Jarbalis Blog|http://marcelojabali.blogspot.com/] \- Marcelo works in the fields and blogs about Websocket, Camel and integration. * [Jean-Baptiste Onofrés Blog|http://blog.nanthrax.net] \- JB blogs about Camel, CXF, Karaf, ServiceMix and OSGi in general. * [Kai Wähners Blog|http://www.kai-waehner.de/blog] \- Kai blogs about Camel, ESB, Cloud, and present Camel at various conferences as well. * [Michael Wareckis Blog|http://michalwarecki.blogspot.com/] \- Michael blogs about SOA, BPA and Camel. Full Content See alsoSee also Camel User Stories. We have collected a number of links to external resources about Camel. The lists are ordered so the newest links are added to the bottom of each list. Articles on Apache Camel Introduction If you have never used or seen Camel before, then you should start with Apache Camel Tutorial Introduction to EIP, Routes, Components, Testing, and other Concepts an article by Kai Wähner, where he puts EIP and Camel into the big picture and gives a run down of the important Camel concepts. Demo source code can be downloaded at github to get started with your first Camel project easily. Some further simple introductory articles to learn the basics: Simple DSL OSGi bundle example by Andrej Koelewijn Realization of EAI Patterns with Apache Camel by Pascal Kolb at the Universität Stuttgart Navigating the Integration Landscape - Claus Ibsen on Apache Camel Claus Ibsen was interviewed at DZone discussing the integration landscape Enterprise Integration Pattern with Apache Camel 2.0 by Julien Dechmann, how to use Camel to split and transform CSV files to POJO and XML and sending to a JMS destination Camellos - Discovering Apache Camel by Gunnar Hillert. A very nice and short blog series about Camel showing its powers in a simple and intuitive way. First step with Apache Camel by Lukasz Budnik. Great first steps where Lukas does a fairly complex route as his first encounter with Camel. Devoxx talk about Apache Camel Impressions from the talk by Jos Nieuwenhuis LEGO Java: Apache Camel Context and Route Basics shows how to build integration applications using EIPs LEGO style. Building an application to parse HTML pages from web sites. LEGO® Java (II): Apache Camel Error Handling, Java Beans and Web Services part 2 of the LEGO Camel blog series. This time we covers error handling and using beans with Camel. Using Camel These examples show usage of several different components and other concepts such as error handling. A bit more meat: Camel applied : JMS to File by Mike McLean Matteo wrote a blog entry about using Camel with iBatis Using the Camel aggregator correctly by Torsten Mielke, a great blog entry how to use the Camel aggregator. Spring Remoting with JMS Example on Amin Abbaspour's Weblog Camel routes and HL7 by Roger Searjeant on using Camel and its HL7 support in the health care space. Leverage EIP with Apache Camel and Twitter by Bruno Borges Using RSS with Apache Camel by Jeroen Reijn Axis 2 ride with Camel how to use Axis 2 with Camel by Sagara A Camel based XML payload HTTP polling provider by Christopher Hunt to use Camel with AJAX. Interesting read. First steps with Apache Camel on Google App Engine by Martin Krasser posts his findings to get Camel running on the GAE. Camel, CXF and JMS by Example by Silvester van der Bijl. Good blog entry how to use CXF and Camel together. A simple file monitoring console with camel, cometd and jquery 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. Advanced Event Notification Framework with Apache Camel by Hendy showing how to use Camel for a lightweight even notification system. Camel IRC Message Route Example by James Carr. An IRC bot which can parse _javascript_ and Ruby expressions. A composite REST service using Apache Camel by Andrej Koelewijn. A blog entry how to expose a REST service and have Camel aggregate data from multiple sources to be returned. EDA events over system boundaries with Camel by Sculptur team blog. Dynamic FTP Client using Apache Camel and Spring by Mattias Severson, showing how to develop an FTP client that could transmit files to various FTP servers as a part of a delivery system in a Java enterprise application. Using Apache Camel to route SOAP calls through message queues by Glen Mazza Virtual ESB -
svn commit: r819969 - in /websites/production/camel/content: articles.html cache/main.pageCache
Author: buildbot Date: Sat Jun 2 09:18:00 2012 New Revision: 819969 Log: Production update by buildbot for camel Modified: websites/production/camel/content/articles.html websites/production/camel/content/cache/main.pageCache Modified: websites/production/camel/content/articles.html == --- websites/production/camel/content/articles.html (original) +++ websites/production/camel/content/articles.html Sat Jun 2 09:18:00 2012 @@ -168,7 +168,7 @@ h2a shape=rect name=Articles-Camelbloggers/aCamel bloggers/h2 -ullia shape=rect class=external-link href=http://davsclaus.blogspot.com/; rel=nofollowClaus Ibsen's Blog/a - Claus is a Camel committer since March 2008, and writes a lot about Camel./lilia shape=rect class=external-link href=http://janstey.blogspot.com; rel=nofollowJon Anstey's Blog/a - Jon occasionally blogs about Camel/lilia shape=rect class=external-link href=http://macstrac.blogspot.com/; rel=nofollowJames Strachan's Blog/a - James blogs about Camel sometimes too img align=middle class=emoticon src=https://cwiki.apache.org/confluence/images/icons/emoticons/smile.gif; height=20 width=20 alt= border=0/lilia shape=rect class=external-link href=http://willemjiang.blogspot.com/; rel=nofollowWillem Jiang's Blog/a - Willem also writes about Camel in English and Chinese./lilia shape=rect class=external-link href=http://cmoulliard.blogspot.com/; rel=nofollowCharles Moulliard's Blog/a - Char les occasionally blogs about Camel and OSGi/lilia shape=rect class=external-link href=http://benoday.blogspot.com/; rel=nofollowBen O'Day's Blog/a - Ben works in the field and sometimes blogs about Camel/lilia shape=rect class=external-link href=http://opensourceknowledge.blogspot.com/; rel=nofollowOpenSourceKnowledge - Ashwin Karpe's Blog/a - Ashwin is a Camel committer and writes about Camel./lilia shape=rect class=external-link href=http://www.liquid-reality.de/pages/viewpage.action?pageId=131134; rel=nofollowChristian Schneider's Blog/a - Christian occasionally blogs about Camel and CXF./lilia shape=rect class=external-link href=http://camelbot.blogspot.com/; rel=nofollowHadrian Zbarcea/a - also blogs about Camel./lilia shape=rect class=external-link href=http://marcelojabali.blogspot.com/; rel=nofollowMarcelo Jarbali's Blog/a - Marcelo works in the fields and blogs about Camel and integration./l ilia shape=rect class=external-link href=http://blog.nanthrax.net; rel=nofollowJean-Baptiste Onofr#233;'s Blog/a - JB blogs about Camel, CXF, Karaf, ServiceMix and OSGi in general./lilia shape=rect class=external-link href=http://www.kai-waehner.de/blog; rel=nofollowKai W#228;hner's Blog/a - Kai blogs about Camel, ESB, Cloud, and present Camel at various conferences as well./li/ul +ullia shape=rect class=external-link href=http://davsclaus.blogspot.com/; rel=nofollowClaus Ibsen's Blog/a - Claus is a Camel committer since March 2008, and writes a lot about Camel./lilia shape=rect class=external-link href=http://janstey.blogspot.com; rel=nofollowJon Anstey's Blog/a - Jon occasionally blogs about Camel/lilia shape=rect class=external-link href=http://macstrac.blogspot.com/; rel=nofollowJames Strachan's Blog/a - James blogs about Camel sometimes too img align=middle class=emoticon src=https://cwiki.apache.org/confluence/images/icons/emoticons/smile.gif; height=20 width=20 alt= border=0/lilia shape=rect class=external-link href=http://willemjiang.blogspot.com/; rel=nofollowWillem Jiang's Blog/a - Willem also writes about Camel in English and Chinese./lilia shape=rect class=external-link href=http://cmoulliard.blogspot.com/; rel=nofollowCharles Moulliard's Blog/a - Char les occasionally blogs about Camel and OSGi/lilia shape=rect class=external-link href=http://benoday.blogspot.com/; rel=nofollowBen O'Day's Blog/a - Ben works in the field and sometimes blogs about Camel/lilia shape=rect class=external-link href=http://opensourceknowledge.blogspot.com/; rel=nofollowOpenSourceKnowledge - Ashwin Karpe's Blog/a - Ashwin is a Camel committer and writes about Camel./lilia shape=rect class=external-link href=http://www.liquid-reality.de/pages/viewpage.action?pageId=131134; rel=nofollowChristian Schneider's Blog/a - Christian occasionally blogs about Camel and CXF./lilia shape=rect class=external-link href=http://camelbot.blogspot.com/; rel=nofollowHadrian Zbarcea/a - also blogs about Camel./lilia shape=rect class=external-link href=http://marcelojabali.blogspot.com/; rel=nofollowMarcelo Jarbali's Blog/a - Marcelo blogs about Websocket, Camel and integration./lilia shap e=rect class=external-link href=http://blog.nanthrax.net; rel=nofollowJean-Baptiste Onofr#233;'s Blog/a - JB blogs about Camel, CXF, Karaf, ServiceMix and OSGi in general./lilia shape=rect class=external-link href=http://www.kai-waehner.de/blog; rel=nofollowKai W#228;hner's Blog/a - Kai blogs about Camel, ESB,
svn commit: r1345497 - /camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeaders2Test.java
Author: davsclaus Date: Sat Jun 2 11:57:42 2012 New Revision: 1345497 URL: http://svn.apache.org/viewvc?rev=1345497view=rev Log: Added test based on user forum issue Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeaders2Test.java - copied, changed from r1345455, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeadersTest.java Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeaders2Test.java (from r1345455, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeadersTest.java) URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeaders2Test.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeaders2Test.javap1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeadersTest.javar1=1345455r2=1345497rev=1345497view=diff == --- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeadersTest.java (original) +++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeaders2Test.java Sat Jun 2 11:57:42 2012 @@ -21,15 +21,18 @@ import java.util.List; import java.util.Map; import org.apache.camel.ContextTestSupport; +import org.apache.camel.Exchange; +import org.apache.camel.Header; import org.apache.camel.Headers; import org.apache.camel.builder.RouteBuilder; /** * @version */ -public class DynamicRouterExchangeHeadersTest extends ContextTestSupport { +public class DynamicRouterExchangeHeaders2Test extends ContextTestSupport { private static ListString bodies = new ArrayListString(); +private static ListString previouses = new ArrayListString(); public void testDynamicRouter() throws Exception { getMockEndpoint(mock:a).expectedBodiesReceived(Hello World); @@ -53,6 +56,12 @@ public class DynamicRouterExchangeHeader assertEquals(Hello World, bodies.get(2)); assertEquals(Bye World, bodies.get(3)); assertEquals(Bye World, bodies.get(4)); + +assertEquals(4, previouses.size()); +assertEquals(mock://a, previouses.get(0)); +assertEquals(mock://c, previouses.get(1)); +assertEquals(direct://foo, previouses.get(2)); +assertEquals(mock://result, previouses.get(3)); } @Override @@ -62,7 +71,7 @@ public class DynamicRouterExchangeHeader public void configure() throws Exception { from(direct:start) // use a bean as the dynamic router - .dynamicRouter(method(DynamicRouterExchangeHeadersTest.class, slip)); + .dynamicRouter(method(DynamicRouterExchangeHeaders2Test.class, slip)); from(direct:foo).transform(constant(Bye World)).to(mock:foo); } @@ -75,10 +84,14 @@ public class DynamicRouterExchangeHeader * * @param body the message body * @param headers the message headers where we can store state between invocations + * @param previous the previous slip * @return endpoints to go, or ttnull/tt to indicate the end */ -public String slip(String body, @Headers MapString, Object headers) { +public String slip(String body, @Headers MapString, Object headers, @Header(Exchange.SLIP_ENDPOINT) String previous) { bodies.add(body); +if (previous != null) { +previouses.add(previous); +} // get the state from the message headers and keep track how many times // we have been invoked
svn commit: r1345498 - /camel/trunk/components/camel-web/pom.xml
Author: davsclaus Date: Sat Jun 2 12:03:09 2012 New Revision: 1345498 URL: http://svn.apache.org/viewvc?rev=1345498view=rev Log: Upgraded to logback 1.0.4 Modified: camel/trunk/components/camel-web/pom.xml Modified: camel/trunk/components/camel-web/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/pom.xml?rev=1345498r1=1345497r2=1345498view=diff == --- camel/trunk/components/camel-web/pom.xml (original) +++ camel/trunk/components/camel-web/pom.xml Sat Jun 2 12:03:09 2012 @@ -32,7 +32,7 @@ camel.osgi.export.pkgorg.apache.camel.web.*/camel.osgi.export.pkg scalate-version1.5.3/scalate-version jersey-version1.12/jersey-version -logback-version1.0.3/logback-version +logback-version1.0.4/logback-version jetty-port8080/jetty-port webdriver-version0.9.7376/webdriver-version /properties
svn commit: r1345499 - in /camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam: model/ProcessInstance.java rules/ProcessRules.java
Author: davsclaus Date: Sat Jun 2 12:13:56 2012 New Revision: 1345499 URL: http://svn.apache.org/viewvc?rev=1345499view=rev Log: CAMEL-5060: Fixed concurrency issue in camel-bam Modified: camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java Modified: camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java?rev=1345499r1=1345498r2=1345499view=diff == --- camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java (original) +++ camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessInstance.java Sat Jun 2 12:13:56 2012 @@ -18,7 +18,7 @@ package org.apache.camel.bam.model; import java.util.Collection; import java.util.Date; -import java.util.HashSet; +import java.util.concurrent.CopyOnWriteArraySet; import javax.persistence.CascadeType; import javax.persistence.Entity; @@ -42,7 +42,7 @@ import org.apache.camel.bam.rules.Activi @Table(name = CAMEL_PROCESSINSTANCE) public class ProcessInstance { private ProcessDefinition processDefinition; -private CollectionActivityState activityStates = new HashSetActivityState(); +private CollectionActivityState activityStates = new CopyOnWriteArraySetActivityState(); private String correlationKey; private Date timeStarted; private Date timeCompleted; Modified: camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java?rev=1345499r1=1345498r2=1345499view=diff == --- camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java (original) +++ camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/rules/ProcessRules.java Sat Jun 2 12:13:56 2012 @@ -16,8 +16,8 @@ */ package org.apache.camel.bam.rules; -import java.util.ArrayList; import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; import org.apache.camel.Exchange; import org.apache.camel.bam.model.ActivityState; @@ -31,7 +31,7 @@ import org.apache.camel.util.ServiceHelp */ public class ProcessRules extends ServiceSupport { private ProcessDefinition processDefinition; -private ListActivityRules activities = new ArrayListActivityRules(); +private ListActivityRules activities = new CopyOnWriteArrayListActivityRules(); public synchronized void processExpired(ActivityState activityState) throws Exception { for (ActivityRules activityRules : activities) {
svn commit: r820011 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache file2.html
Author: buildbot Date: Sat Jun 2 19:20:56 2012 New Revision: 820011 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/file2.html Modified: websites/production/camel/content/book-component-appendix.html == --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Sat Jun 2 19:20:56 2012 @@ -3654,7 +3654,8 @@ This option provides the build in strate br clear=none class=atl-forced-newline ttchanged/tt is using file length/modification timestamp to detect whether the file is currently being copied or not. Will at least use 1 sec. to determine this, so this option cannot consume files as fast as the others, but can be more reliable as the JDK IO API cannot always determine whether a file is currently being used by another process. This option is bonly/b avail for the a shape=rect href=ftp2.html title=FTP2FTP/a component from bCamel 2.8/b onwards. br clear=none class=atl-forced-newline ttfileLock/tt is for using ttjava.nio.channels.FileLock/tt. This option is bnot/b avail for the a shape=rect href=ftp2.html title=FTP2FTP/a component. This approach should be avoided when accessing a remote file system via a mount/share unless that file system supports distributed file locks. br clear=none class=atl-forced-newline ttrename/tt is for using a try to rename the file as a test if we can get exclusive read-lock. -br clear=none class=atl-forced-newline ttnone/tt is for no read locks at all./td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttreadLockTimeout/tt /tdtd colspan=1 rowspan=1 class=confluenceTdul class=alternate type=squareli/li/ul +br clear=none class=atl-forced-newline ttnone/tt is for no read locks at all.br clear=none +Notice from bCamel 2.10/b onwards the read locks ttchanged/tt, ttfileLock/tt and ttrename/tt will also use a ttmarkerFile/tt as well, to ensure not picking up files that may be in process by another Camel consumer running on another node (eg cluster). This is only supported by the file component (not the ftp component). /td/trtrtd/td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttreadLockTimeout/tt /tdtd colspan=1 rowspan=1 class=confluenceTdul class=alternate type=squareli/li/ul /tdtd colspan=1 rowspan=1 class=confluenceTd Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or lower to indicate forever. In bCamel 2.0/b the default value is 0. In bCamel 2.1/b the default value is 1. Currently ttfileLock/tt, ttchanged/tt and ttrename/tt support the timeout. For a shape=rect href=ftp2.html title=FTP2FTP/a the default ttreadLockTimeout/tt value is 2. /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttreadLockCheckInterval/tt /tdtd colspan=1 rowspan=1 class=confluenceTd tt1000/tt /tdtd colspan=1 rowspan=1 class=confluenceTd bCamel 2.6:/b Interval in millis for the read-lock, if supported by the read lock. This interval is used for sleeping between attempts to acquire the read lock. For example when using the ttchanged/tt read lock, you can set a higher interval period to cater for emslow writes/em. The default of 1 sec. may be emtoo fast/em if the producer is very slow writing the file. For a shape=rect href=ftp2.html title=FTP2FTP/a the default ttreadLockCheckInterval/tt is tt5000/tt. /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttdirectoryMustExist/tt /tdtd colspan=1 rowspan=1 class=confluenceTd ttfalse/tt /tdtd colspan=1 rowspan=1 class=confluenceTd bCamel 2.5:/b Similar to ttstartingDirectoryMustExist/tt but this applies during polling recursive sub directories. /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttdoneFileName/tt /tdtd colspan=1 rowspan=1 class=confluenceTd ttnull/tt /tdtd colspan=1 rowspan=1 class=confluenceTd bCamel 2.6:/b If provided, Camel will only consume files if a emdone/em file exists. This option configures what file name to use. Either you can specify a fixed name. Or you can use dynamic placeholders. The emdone/em file is balways/b expected in the same folder as the original file. See emusing done file/em and emwriting done file/em sections for examples. /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttexclusiveReadLockStrategy/tt /tdtd colspan=1 rowspan=1 class=confluenceTd ttnull/tt /tdtd colspan=1 rowspan=1 class=confluenceTd Pluggable read-lock as a ttorg.apache.camel.component.file.GenericFileExclusiveReadLockStrategy/tt implementation. /td/trtrtd colspan=1
svn commit: r1345562 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/component/file/ camel-core/src/main/java/org/apache/camel/component/file/strategy/ camel-core/src/test/java/org/apache
Author: davsclaus Date: Sat Jun 2 19:40:22 2012 New Revision: 1345562 URL: http://svn.apache.org/viewvc?rev=1345562view=rev Log: CAMEL-5324: Improved file component to use marker file in read locks to support clustered Camel apps, with multiple file consumers competing for files on a shared drive. Added: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileRenameExclusiveReadLockStrategy.java camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRenameReadLockMustUseMarkerFileTest.java - copied, changed from r1345498, camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileMarkerFileDeleteOldLockFilesTest.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProcessStrategy.java camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileLockExclusiveReadLockStrategy.java camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileProcessStrategyFactory.java camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileProcessStrategySupport.java camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpChangedExclusiveReadLockStrategy.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpProcessStrategyFactory.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpProcessStrategyFactory.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java?rev=1345562r1=1345561r2=1345562view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java Sat Jun 2 19:40:22 2012 @@ -285,9 +285,14 @@ public abstract class GenericFileConsume boolean begin = processStrategy.begin(operations, endpoint, exchange, file); if (!begin) { -log.debug(endpoint + cannot begin processing file: {}, file); -// begin returned false, so remove file from the in progress list as its no longer in progress -endpoint.getInProgressRepository().remove(absoluteFileName); +log.debug({} cannot begin processing file: {}, endpoint, file); +try { +// abort +processStrategy.abort(operations, endpoint, exchange, file); +} finally { +// begin returned false, so remove file from the in progress list as its no longer in progress + endpoint.getInProgressRepository().remove(absoluteFileName); +} return; } } catch (Exception e) { Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProcessStrategy.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProcessStrategy.java?rev=1345562r1=1345561r2=1345562view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProcessStrategy.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileProcessStrategy.java Sat Jun 2 19:40:22 2012 @@ -49,6 +49,20 @@ public interface GenericFileProcessStrat Exchange exchange, GenericFileT file) throws Exception; /** + * Called when a begin is aborted, for example to release any resources which may have + * been acquired during the {@link #begin(GenericFileOperations, GenericFileEndpoint, org.apache.camel.Exchange, GenericFile)} + * operation. + * + * @param operations file operations + * @param endpoint the endpoint + * @param exchange the exchange + * @param file the file + * @throws Exception can be thrown in case of errors + */ +void abort(GenericFileOperationsT operations, GenericFileEndpointT endpoint, + Exchange exchange,
svn commit: r820016 - in /websites/production/camel/content: cache/main.pageCache camel-2100-release.html
Author: buildbot Date: Sat Jun 2 20:18:12 2012 New Revision: 820016 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2100-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2100-release.html == --- websites/production/camel/content/camel-2100-release.html (original) +++ websites/production/camel/content/camel-2100-release.html Sat Jun 2 20:18:12 2012 @@ -84,7 +84,7 @@ pWelcome to the 2.10.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: /p -ulliAdded support for Java 1.7/liliAdded consumer to a shape=rect href=jcr.html title=JCRJCR/a component/liliInternal code cleanup to reduce warnings reported by Eclipse/liliMoved a shape=rect href=spring-testing.html title=Spring TestingSpring Testing/a from ttcamel-test/tt to ttcamel-test-spring/tt component./liliCamel a shape=rect href=using-propertyplaceholder.html title=Using PropertyPlaceholderProperty Placeholders/a are now supported in embedded a shape=rect href=expression.html title=ExpressionExpression/as within Camel routes./liliAdded missing options in the XML DSL for the a shape=rect href=xpath.html title=XPathXPath/a language to control and set which XPath Engine to use, etc./liliAdded option ttlogNamespaces/tt to the a shape=rect href=xpath.html title=XPathXPath/a language to have ttINFO/tt logging of detected namespaces from message. This can be used to tr oubleshoot issues where an a shape=rect href=xpath.html title=XPathXPath/a expression doesn't work as expected (as it's often a namespace conflict)./liliAdded ttreplyToCacheLevelName/tt option to the a shape=rect href=jms.html title=JMSJMS/a component, allowing configuration of cache levels for persistent reply consumers when doing request/reply over JMS. Some message brokers do not work well with caching, so users may need to set this option to ttCACHE_NONE/tt./liliAdded ttantInclude/tt and ttantExclude/tt options to a shape=rect href=file2.html title=File2File/a and a shape=rect href=ftp2.html title=FTP2FTP/a components to make it easier to specify include/exclude filters using ANT syntax./liliThe a shape=rect href=camel-maven-archetypes.html title=Camel Maven ArchetypesCamel archetypes/a for Java and Scala no longer generate projects with Spring dependencies./liliImproved ttJdbcMessageIdRe pository/tt in the a shape=rect href=sql-component.html title=SQL ComponentSQL/a to use custom SQL statements/queries./liliAdded option to a shape=rect href=properties.html title=PropertiesProperties/a to allow silently ignoring property locations not found, such as a .properties file./liliAdded ttmanagementNamePattern/tt attribute to ttlt;camelContextgt;/tt to make it very easy to customize and control the JMX naming of the Camel application. See details at a shape=rect href=camel-jmx.html#CamelJMX-CamelJMXManagementNamingStrategyCamel JMX/a. For example, in OSGi environments you can explicitly configure a ttmanagementNamePattern/tt in case you do not want the bundleId as part of MBean names./liliAdded streaming update support to a shape=rect href=solr.html title=SolrSolr/a as well as support for SolrInputDocuments/liliAdded SolrJ DirectXMLRequest support to a shape=rect href=solr.html title=SolrS olr/a to support XML based index updates/liliImproved Camel a shape=rect href=mail.html title=MailMail/a to support the ttreplyTo/tt option/liliAdded tttraceEnabled/tt option to a shape=rect href=jetty.html title=JettyJetty/a component so you have control over whether to allow HTTP TRACE calls against your Jetty endpoints./liliPolished the a shape=rect href=camel-maven-archetypes.html title=Camel Maven ArchetypesCamel Maven Archetypes/a to let the projects be prepared for a shape=rect href=testing.html title=TestingTesting/a, and fixed any WARNs from Maven./liliAdded ttdumpRouteStatsAsXml/tt methods to a shape=rect href=camel-jmx.html title=Camel JMXJMX/a to make it easier to get the total performance stats as XML, and in one JMX call./lilia shape=rect href=graceful-shutdown.html title=Graceful ShutdownGraceful Shutdown/a is now more aggressive if timeout occurred during shutdown, r ejecting continued processing of messages or redeliveries./liliAdd ttShutdownPrepared/tt SPI to allow custom Services (also EIPs) in routes to do custom code in preparation for shutdown./liliThe ttcamel-archetype-java/tt a shape=rect href=camel-maven-archetypes.html title=Camel Maven ArchetypesCamel Maven Archetypes/a is now a pure Java DSL based project (no longer Spring)/lilia shape=rect href=jms.html title=JMSJMS/a consumer is less