[CONF] Apache Camel > Articles

2010-07-03 Thread confluence







Articles
Page edited by Claus Ibsen


 Changes (1)
 



...
* [Using Apache Camel from Clojure|http://codeabout.blogspot.com/2010/06/using-apache-camel-from-clojure.html] by Jason Whitlark. A blog entry how to get Camel working with the [Clojure|http://clojure.org/] programming language. * [A composite REST service using Apache Camel|http://www.andrejkoelewijn.com/wp/2010/06/13/a-composite-rest-service-using-camel/] by Andrej Koelewijn. A blog entry how to expose a REST service and have Camel aggregate data from multiple sources to be returned. 
* [Getting Started with Apache Camel and prepare for Apache ServiceMix deployment|http://magnus-k-karlsson.blogspot.com/2010/07/getting-started-with-apache-camel-and.html] by Magnus K Karlsson shows a test driven example how to start with Camel and the ServiceMix combo. 
 h2. Presentations on Camel 
...

Full Content

See alsoSee also Camel User Stories.

Articles on Apache Camel

	A bit more meat: Camel applied : JMS to File by Mike McLean
	Mathew Thomas posted his thoughts on Apache Camel including a sample project
	Matteo wrote a blog entry about using Camel with iBatis
	Knowledge Tree integration using Apache Camel
	Integrating Apache Camel with JBoss ESB by Edgar Ankiewsky
	Simple DSL OSGi bundle example by Andrej Koelewijn
	Realization of EAI Patterns with Apache Camel by Pascal Kolb at the Universität Stuttgart
	Using Camel with Maven to access web services and message queues by Glen Mazza
	Spring Remoting with JMS Example on Amin Abbaspour's Weblog
	Implementing Fuji integration scenario using Camel SE by Louis Polycarpou on using Camel with Open ESB
	Using the Camel aggregator correctly by Torsten Mielke, a great blog entry how to use the Camel aggregator.
	Camel routes and HL7 by Roger Searjeant on using Camel and its HL7 support in the health care space.
	Combining ApacheCamel+BSF to make JBoss ESB polyglot by Edgard Ankiewsky Silva, a JBoss employeer.
	Groovy and Grape - easiest way to send gtalk message with Apache Camel by Andrej Koelewijn how easy it is to use Groovy and Grape to quickly try out new frameworks such as Apache Camel.
	Domain-Specific Languages (DSLs) in Apache Camel (Spanish) by Gema Perdiguero, Tecsisa.
	Apache Camel integration in ServiceMix (Spanish) by Sebastián Gómez, Tecsisa.
	Apache Camel: Integration Nirvana by Jonathan Anstey Great for learning what Camel is and what it can do
	Leverage EIP with Apache Camel and Twitter by Bruno Borges
	Apache Camel Reference Card at DZone (the first card out of two) by Claus Ibsen
	Using RSS with Apache Camel by Jeroen Reijn
	Using Groovy and Camel to pool Google Analyst email reports by Mr. Haki
	Using grails-camel plugin to work with Camel in Grails land by Mr. Haki
	Send mail with Apache Camel from Gails by Mr. Haki
	Navigating the Integration Landscape - Claus Ibsen on Apache Camel Claus Ibsen was interviewed at DZone discussing the integration landscape
	Apache Camel: Enterprise Integration met scripttalen en DSLs (Dutch) by Peter Maas, Finalist IT Group.
	Axis 2 ride with Camel how to use Axis 2 with the Camel report incident tutorial by Sagara
	Introduction to the Open eHealth Integration Platform (based on top of Apache Camel) Excellent DZone article by Martin Krasser
	An IRC alerter written using Apache Camel and Java how to easily integrate IRC with Camel to monitor and do alerts.
	Entreprise 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
	A Camel based XML payload HTTP polling provider by Christopher Hunt to use Camel with AJAX. Interesting read.
	Camel vs. JBI by Adrian Trenaman.
	Things to consider when selecting between Apache Camel and Apache Servicemix by Ashwin Karpe
	Groovy and Camel for monitoring ActiveMQ by Eric Hauser how to monitor AMQ Advisory queues from a single groovy file.
	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. Highly recommended for new users
	Apache Camel alternatives by Gunnar Hillert. He presents a brief overview of other projects in the integration space.
	First steps with Apache Camel on Google App Engine by Martin Krasser posts his findings to get Camel running on the GAE.
	A jira notification system for irc using Camel by Guillaume Nodet - all code is in a single XML hot deployed in Apache Karaf.
	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 

svn commit: r960189 - in /camel/trunk/components/camel-spring/src: main/java/org/apache/camel/spring/remoting/ test/java/org/apache/camel/spring/config/ test/resources/org/apache/camel/spring/config/

2010-07-03 Thread ningjiang
Author: ningjiang
Date: Sat Jul  3 09:36:24 2010
New Revision: 960189

URL: http://svn.apache.org/viewvc?rev=960189&view=rev
Log:
CAMEL-2904 proxy should support to set the camelContextId

Modified:

camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java

camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java

camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelProxyTest.xml

Modified: 
camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java?rev=960189&r1=960188&r2=960189&view=diff
==
--- 
camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java
 (original)
+++ 
camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/remoting/CamelProxyFactoryBean.java
 Sat Jul  3 09:36:24 2010
@@ -127,6 +127,10 @@ public class CamelProxyFactoryBean exten
 public void setCamelContext(CamelContext camelContext) {
 this.camelContext = camelContext;
 }
+
+public void setCamelContextId(String contextId) {
+this.camelContextId = contextId;
+}
 
 public void setApplicationContext(ApplicationContext applicationContext) 
throws BeansException {
 this.applicationContext = applicationContext;

Modified: 
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java?rev=960189&r1=960188&r2=960189&view=diff
==
--- 
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
 (original)
+++ 
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
 Sat Jul  3 09:36:24 2010
@@ -45,6 +45,14 @@ public class CamelProxyTest extends Test
 anotherSender.greeting("Hello my friends!");
 result.assertIsSatisfied();
 
+result.reset();
+// test sending inOnly message with other sender
+MyProxySender myProxySenderWithCamelContextId = (MyProxySender) 
ac.getBean("myProxySenderWithCamelContextId");
+
+result.expectedBodiesReceived("Hello my friends again!");
+myProxySenderWithCamelContextId.greeting("Hello my friends again!");
+result.assertIsSatisfied();
+
 }
 
 }
\ No newline at end of file

Modified: 
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelProxyTest.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelProxyTest.xml?rev=960189&r1=960188&r2=960189&view=diff
==
--- 
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelProxyTest.xml
 (original)
+++ 
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelProxyTest.xml
 Sat Jul  3 09:36:24 2010
@@ -51,6 +51,11 @@
 
 
 
+
+http://camel.apache.org/schema/spring"/>
 
 
 




svn commit: r960171 - in /camel/trunk/platforms/karaf/features/src/main/resources: features-spring3.xml features.xml

2010-07-03 Thread ningjiang
Author: ningjiang
Date: Sat Jul  3 08:38:24 2010
New Revision: 960171

URL: http://svn.apache.org/viewvc?rev=960171&view=rev
Log:
CAMEL-2903 updated the Commons Codec version in the camel feature

Modified:
camel/trunk/platforms/karaf/features/src/main/resources/features-spring3.xml
camel/trunk/platforms/karaf/features/src/main/resources/features.xml

Modified: 
camel/trunk/platforms/karaf/features/src/main/resources/features-spring3.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/src/main/resources/features-spring3.xml?rev=960171&r1=960170&r2=960171&view=diff
==
--- 
camel/trunk/platforms/karaf/features/src/main/resources/features-spring3.xml 
(original)
+++ 
camel/trunk/platforms/karaf/features/src/main/resources/features-spring3.xml 
Sat Jul  3 08:38:24 2010
@@ -69,8 +69,8 @@
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.fastinfoset/${fastinfoset-version}
 
mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/${servlet-api-2.5-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-bundle/${jetty6-bundle-version}
-
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/${commons-codec-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/${jdom-bundle-version}
+mvn:commons-codec/commons-codec/${commons-codec}
 
mvn:org.codehaus.jettison/jettison/${jettison-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/${ant-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcel/${bcel-bundle-version}
@@ -123,8 +123,8 @@
   
   
 camel-core
-
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/${commons-codec-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/${commons-httpclient-bundle-version}
+mvn:commons-codec/commons-codec/${commons-codec}
 
mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/${servlet-api-2.5-version}
 mvn:org.apache.camel/camel-http/${pom.version}
   
@@ -184,8 +184,8 @@
   
   
 camel-core
-
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/${commons-codec-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera/${abdera-bundle-version}
+mvn:commons-codec/commons-codec/${commons-codec}
 mvn:org.apache.camel/camel-atom/${pom.version}
   
   

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=960171&r1=960170&r2=960171&view=diff
==
--- camel/trunk/platforms/karaf/features/src/main/resources/features.xml 
(original)
+++ camel/trunk/platforms/karaf/features/src/main/resources/features.xml Sat 
Jul  3 08:38:24 2010
@@ -66,8 +66,8 @@
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.fastinfoset/${fastinfoset-version}
 
mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/${servlet-api-2.5-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-bundle/${jetty6-bundle-version}
-
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/${commons-codec-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/${jdom-bundle-version}
+mvn:commons-codec/commons-codec/${commons-codec}
 
mvn:org.codehaus.jettison/jettison/${jettison-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/${ant-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcel/${bcel-bundle-version}
@@ -131,8 +131,8 @@
   
   
 camel-core
-
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/${commons-codec-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/${commons-httpclient-bundle-version}
+mvn:commons-codec/commons-codec/${commons-codec}
 
mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/${servlet-api-2.5-version}
 mvn:org.apache.camel/camel-http/${pom.version}
   
@@ -192,8 +192,8 @@
   
   
 camel-core
-
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/${commons-codec-bundle-version}
 
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera/${abdera-bundle-version}
+mvn:commons-codec/commons-codec/${commons-codec} 
 mvn:org.apache.camel/camel-atom/${pom.version}
   
   




[CONF] Apache Camel > Wire Tap

2010-07-03 Thread confluence







Wire Tap
Page edited by willem jiang


 Changes (1)
 



...
 *Using the [Spring XML Extensions]* 
{snippet:id=example|lang=xml|url="" class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">./components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildWireTap.xml} 
 h4. Further Example 
...

Full Content

Wire Tap

The Wire Tap from the EIP patterns allows you to route messages to a separate tap location while it is forwarded to the ultimate destination.



WireTap node
Available as of Camel 2.0

In Camel 2.0 we have introduced a new wireTap node for properly doing wire taps. Camel will copy the original Exchange and set its Exchange Pattern to InOnly as we want the tapped Exchange to be sent as a fire and forget style. The tapped Exchange is then send in a separate thread so it can run in parallel with the original 

We have extended the wireTap to support two flavors when tapping an Exchange

	send a copy of the original Exchange (the traditional wire tap)
	send a new Exchange, allowing you to populate the Exchange beforehand



Sending a copy (traditional wire tap)
Using the Fluent Builders

from("direct:start")
.to("log:foo")
.wireTap("direct:tap")
.to("mock:result");



Using the Spring XML Extensions


"direct:start"/>
"log:foo"/>
"direct:tap"/>
"mock:result"/>




Sending a new Exchange
Using the Fluent Builders
Camel supports either a processor or an _expression_ to populate the new Exchange. Using processor gives you full power how the Exchange is populated as you can set properties, headers etc. The _expression_ can only be used to set the IN body. 

From Camel 2.3 onwards the _expression_ or Processor is pre populated with a copy of the original Exchange which allows you to access the original message when you prepare the new Exchange to be sent. You can use the copy option to indicate if you want this or not (default is enabled). If your turn copy=false then it works as in Camel 2.2 or older, where the Exchange always will be empty.

Below is the processor variation shown. This example is from Camel 2.3, where we disable copy by passing in false. This will create a new empty Exchange. 

from("direct:start")
.wireTap("direct:foo", false, new Processor() {
public void process(Exchange exchange) throws Exception {
exchange.getIn().setBody("Bye World");
exchange.getIn().setHeader("foo", "bar");
}
}).to("mock:result");


from("direct:foo").to("mock:foo");



And the _expression_ variation. This example is from Camel 2.3, where we disable copy by passing in false. This will create a new empty Exchange. 

from("direct:start")
.wireTap("direct:foo", false, constant("Bye World"))
.to("mock:result");

from("direct:foo").to("mock:foo");



Using the Spring XML Extensions
The processor variation, notice we use a processorRef attribute to refer to a spring bean with this id: 


"direct:start2"/>
"direct:foo" processorRef="myProcessor"/>
"mock:result"/>




And the _expression_ variation, where the _expression_ is defined in the body tag: 


"direct:start"/>
"direct:foo">
Bye World

"mock:result"/>




And this variation accesses the body of the original message and creates a new Exchange which is based on the _expression_.
It will create a new Exchange and have the body contain "Bye ORIGINAL BODY MESSAGE HERE"


"direct:start"/>
"direct:foo">
Bye ${body}

"mock:result"/>




Camel 1.x
The following example shows how to route a request from an input queue:a endpoint to the wire tap location queue:tap it is received by queue:b

Using the Fluent Builders

RouteBuilder builder = new RouteBuilder() {
public void configure() {
errorHandler(deadLetterChannel("mock:error"));

from("seda:a").multicast().to("seda:tap", "seda:b");
}
};



Using the Spring XML Extensions

"errorHandler" streamCache="false" id="camel" xmlns="http://camel.apache.org/schema/spring">

"seda:a"/>

"seda:tap"/>
"seda:b"/>






Further Example

For another example of this pattern in use you could look at the wire tap test case.

Using This Pattern

If you would like to use this EIP Pattern then please read the Getting Started, you may also find the Architecture useful particularly the description of Endpoint and URIs. Then you could try out some of the Examples first before trying this pattern out.



Change Notification Preferences

View Online
|
View Changes
|
Add Comment