<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/feed_style.xsl" type="text/xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="https://www.rssboard.org/media-rss"><channel><title>Camel on MR70</title><link>https://www.mr70.eu/tags/-camel/</link><description>Recent content in Camel on MR70</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>MR70 - [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).</copyright><lastBuildDate>Wed, 08 Oct 2008 20:54:26 +0000</lastBuildDate><atom:link href="https://www.mr70.eu/tags/-camel/index.xml" rel="self" type="application/rss+xml"/><icon>https://www.mr70.eu/logo.svg</icon><item><title>Using Apache Camel with Ibatis</title><link>https://www.mr70.eu/posts/using-apache-camel-with-ibatis/</link><pubDate>Wed, 08 Oct 2008 20:54:26 +0000</pubDate><guid>https://www.mr70.eu/posts/using-apache-camel-with-ibatis/</guid><description><![CDATA[<p>This is a quick tutorial about the usage of the very powerful Integration tool <a href="http://activemq.apache.org/camel">Apache Camel</a> with <a href="ibatis.apache.org/">Apache Ibatis</a>. Many thanks to Apache Camel forums and <a href="http://www.nabble.com/user/UserProfile.jtp?user=1189612">Claus Ibsen</a>.</p>
<h1 id="requirements">REQUIREMENTS</h1>
<ul>
<li>I used Java version 1.5.0_16</li>
<li><a href="http://maven.apache.org/">Apache Maven</a> version 2.0.9</li>
<li>A database mysql: I used a local db &ldquo;moodle&rdquo;, user &ldquo;moodle&rdquo;, password &ldquo;moodle&rdquo; and a table &ldquo;mdl_user&rdquo; [ create table mdl_user ( id int, firstname varchar(30), lastname varchar(30), email varchar(30) ); ]</li>
</ul>
<h1 id="download">DOWNLOAD</h1>
<p>The full sample project can be download from <a href="http://www.redaelli.org/matteo/downloads/apache-camel/demo-ibatis.tgz">here</a>!</p>
<h1 id="step-by-step">STEP BY STEP</h1>
<p>As suggested by <a href="http://activemq.apache.org/camel/creating-a-new-spring-based-camel-route.html">http://activemq.apache.org/camel/creating-a-new-spring-based-camel-route.html</a> matteo@nowar:<del>/workspace$ mvn archetype:create \ -DarchetypeGroupId=org.apache.camel \ -DarchetypeArtifactId=camel-router \ -DarchetypeVersion=1.4.0 \ -DgroupId=org.redaelli \ -DartifactId=demo-ibatis matteo@nowar:</del>/workspace$ cd demo-ibatis matteo@nowar:<del>/workspace$ mvn eclipse:eclipse matteo@nowar:</del>/workspace$ mvn install Create iBatis files</p>
<ul>
<li>src/main/resources/SqlMapConfig.xml</li>
<li>src/main/resources/User.xml</li>
<li>src/main/java/org/redaelli/User.java</li>
</ul>
<p>Add the routes and dependences in the files</p>
<ul>
<li>src/main/java/org/redaelli/MyRouteBuilder.java</li>
<li>pom.xml (adding dependencies &ldquo;camel-ibatis&rdquo; e &ldquo;mysql jdbc&rdquo;)</li>
</ul>
<p>And finally run the demo with matteo@nowar:~/workspace$ mvn camel:run</p>
]]></description></item></channel></rss>