Author: buildbot
Date: Tue Jul  9 08:19:19 2013
New Revision: 868880

Log:
Production update by buildbot for camel

Added:
    websites/production/camel/content/mybatis-example.html
Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/camel-2120-release.html
    websites/production/camel/content/examples.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/camel-2120-release.html
==============================================================================
--- websites/production/camel/content/camel-2120-release.html (original)
+++ websites/production/camel/content/camel-2120-release.html Tue Jul  9 
08:19:19 2013
@@ -119,7 +119,7 @@
 
 <h3><a shape="rect" name="Camel2.12.0Release-NewExamples"></a>New <a 
shape="rect" href="examples.html" title="Examples">Examples</a></h3>
 
-<ul><li><a shape="rect" href="netty-http-server-example.html" title="Netty 
HTTP Server Example">Netty HTTP Server Example</a></li></ul>
+<ul><li><a shape="rect" href="mybatis-example.html" title="MyBatis 
Example">MyBatis Example</a></li><li><a shape="rect" 
href="netty-http-server-example.html" title="Netty HTTP Server Example">Netty 
HTTP Server Example</a></li></ul>
 
 
 <h3><a shape="rect" name="Camel2.12.0Release-NewTutorials"></a>New <a 
shape="rect" href="tutorials.html" title="Tutorials">Tutorials</a></h3>
@@ -137,7 +137,8 @@
 
 
 <h2><a shape="rect" 
name="Camel2.12.0Release-Changesthatmayaffectendusers"></a>Changes that may 
affect end users</h2>
-<ul><li>The <a shape="rect" href="file2.html" title="File2">File</a> and <a 
shape="rect" href="ftp2.html" title="FTP2">FTP</a> consumers when using 
idempotent repository will no longer invoke <tt>contains</tt> with a directory 
name; this has been changed to only be checked for files.</li><li>Shutting down 
using <a shape="rect" href="graceful-shutdown.html" title="Graceful 
Shutdown">Graceful Shutdown</a> now requires the timeout value to be positive. 
And improved logic to avoid getting stuck in waiting for inflight messages, and 
having counter go negative.</li><li><a shape="rect" href="tracer.html" 
title="Tracer">Tracer</a> now requires explicitly to be enabled on 
<tt>CamelContext</tt> to be available and in use.</li><li>The class 
<tt>org.apache.camel.processor.interceptor.BacklogTracerInterceptor</tt> has 
been removed as it was no longer needed due internal optimizations.</li><li>The 
<a shape="rect" href="stream-caching.html" title="Stream caching">Stream 
caching</a> default thresho
 ld for spooling to disk has been changed from 64kb to 128kb.</li></ul>
+<ul><li>The <a shape="rect" href="file2.html" title="File2">File</a> and <a 
shape="rect" href="ftp2.html" title="FTP2">FTP</a> consumers when using 
idempotent repository will no longer invoke <tt>contains</tt> with a directory 
name; this has been changed to only be checked for files.</li><li>Shutting down 
using <a shape="rect" href="graceful-shutdown.html" title="Graceful 
Shutdown">Graceful Shutdown</a> now requires the timeout value to be positive. 
And improved logic to avoid getting stuck in waiting for inflight messages, and 
having counter go negative.</li><li><a shape="rect" href="tracer.html" 
title="Tracer">Tracer</a> now requires explicitly to be enabled on 
<tt>CamelContext</tt> to be available and in use.</li><li>The class 
<tt>org.apache.camel.processor.interceptor.BacklogTracerInterceptor</tt> has 
been removed as it was no longer needed due internal optimizations.</li><li>The 
<a shape="rect" href="stream-caching.html" title="Stream caching">Stream 
caching</a> default thresho
 ld for spooling to disk has been changed from 64kb to 128kb.</li><li>The unary 
operators in <a shape="rect" href="simple.html" title="Simple">Simple</a> is 
now only applied on functions</li></ul>
+
 
 
 <h2><a shape="rect" 
name="Camel2.12.0Release-Importantchangestoconsiderwhenupgrading"></a>Important 
changes to consider when upgrading</h2>

Modified: websites/production/camel/content/examples.html
==============================================================================
--- websites/production/camel/content/examples.html (original)
+++ websites/production/camel/content/examples.html Tue Jul  9 08:19:19 2013
@@ -91,7 +91,7 @@
 
 <h3><a shape="rect" name="Examples-Examples"></a>Examples</h3>
 
-<ul><li><a shape="rect" href="activemq-camel-tomcat.html" title="ActiveMQ 
Camel Tomcat">ActiveMQ Camel Tomcat</a> example shows how to embed Apache 
ActiveMQ and Camel in a web application running on Apache Tomcat.</li><li><a 
shape="rect" href="aggregate-example.html" title="Aggregate Example">Aggregate 
Example</a> shows the overhauled <a shape="rect" href="aggregator2.html" 
title="Aggregator2">Aggregator</a> EIP with persistent storage, which are part 
of Camel 2.3.</li><li><a shape="rect" href="bam-example.html" title="BAM 
Example">BAM Example</a> shows how to use Camel as a <a shape="rect" 
href="bam.html" title="BAM">BAM (Business Activity Monitoring)</a> framework, 
to monitor your business transactions.</li><li><a shape="rect" 
href="cafe-example.html" title="Cafe Example">Cafe Example</a> shows how to use 
Camel to implement a Cafe shop use case.</li><li><a shape="rect" 
href="console-example.html" title="Console Example">Console Example</a> shows 
how to get stared with Camel using 
 to read input from the console.</li><li><a shape="rect" 
href="cxf-example.html" title="CXF Example">CXF Example</a> shows how to use 
Camel as the CXF services router, which consumes the request of a CXF client 
then passes the request to a CXF-based web service.</li><li><a shape="rect" 
href="cxf-example-osgi-blueprint.html" title="CXF Example OSGi Blueprint">CXF 
Example OSGi Blueprint</a> shows how to use the camel-cxf consumer component in 
an OSGI environment using OSGi Blueprint with the OSGI HTTP service.</li><li><a 
shape="rect" href="cxf-example-osgi.html" title="CXF Example OSGi">CXF Example 
OSGi</a> shows how to use the camel-cxf consumer component in an OSGI 
environment using Spring-DM with the OSGI HTTP service.</li><li><a shape="rect" 
href="cxf-proxy-example.html" title="CXF Proxy Example">CXF Proxy Example</a> 
shows how to use Camel to proxy a web service using <a shape="rect" 
href="cxf.html" title="CXF">CXF</a>.</li><li><a shape="rect" 
href="cxf-tomcat-example.html" title=
 "CXF Tomcat Example">CXF Tomcat Example</a> shows how to use Camel to expose a 
code-first web service using <a shape="rect" href="cxf.html" 
title="CXF">CXF</a> as a web application to be deployed in Apache 
Tomcat.</li><li><a shape="rect" href="etl-example.html" title="ETL Example">ETL 
Example</a> shows how to use Camel as an <a shape="rect" class="external-link" 
href="http://en.wikipedia.org/wiki/Extract,_transform,_load"; 
rel="nofollow">Extract Transform Load (ETL)</a> tool</li><li><a shape="rect" 
href="ftp-example.html" title="FTP Example">FTP Example</a> shows how to use 
Camel to upload or download files to/from an existing FTP server.</li><li><a 
shape="rect" href="guice-jms-example.html" title="Guice JMS Example">Guice JMS 
Example</a> shows how to use <a shape="rect" href="guice.html" 
title="Guice">Guice</a> as the Dependency Injection framework to create some <a 
shape="rect" href="jms.html" title="JMS">JMS</a> base routes using just Java 
code and a properties file</li><li><a sha
 pe="rect" href="hibernate-example.html" title="Hibernate Example">Hibernate 
Example</a> shows how to work with <a shape="rect" href="hibernate.html" 
title="Hibernate">Hibernate</a> to exchange data using a shared database 
table.</li><li><a shape="rect" href="jmx-component-example.html" title="JMX 
Component Example">JMX Component Example</a> shows how to use the camel-jmx 
component.</li><li><a shape="rect" href="loadbalancing-mina-example.html" 
title="LoadBalancing Mina Example">LoadBalancing Mina Example</a> shows how to 
use the <a shape="rect" href="load-balancer.html" title="Load Balancer">Load 
Balancer</a> EIP to balance communication with remote servers using <a 
shape="rect" href="mina.html" title="MINA">MINA</a>.</li><li><a shape="rect" 
href="loan-broker-example.html" title="Loan Broker Example">Loan Broker 
Example</a> shows how to use Camel to implement the classical <a shape="rect" 
class="external-link" 
href="http://http://www.enterpriseintegrationpatterns.com/ComposedMessagi
 ngExample.html" rel="nofollow">EIP composed messaging sample </a>.</li><li><a 
shape="rect" href="management-example.html" title="Management 
Example">Management Example</a> shows how to use <a shape="rect" 
href="camel-jmx.html" title="Camel JMX">JMX</a> in Camel to manage a running 
Camel application.</li><li><a shape="rect" 
href="netty-http-server-example.html" title="Netty HTTP Server Example">Netty 
HTTP Server Example</a> shows how to use <a shape="rect" href="netty-http.html" 
title="Netty HTTP">Netty HTTP</a> as a shared HTTP server with multiple Camel 
applications in OSGi container such as Karaf / ServiceMix.</li><li><a 
shape="rect" href="pojo-messaging-example.html" title="POJO Messaging 
Example">POJO Messaging Example</a> shows how to use annotations to produce, 
consume or route messages to Camel endpoints without using any DSL.</li><li><a 
shape="rect" href="route-throttling-example.html" title="Route Throttling 
Example">Route Throttling Example</a> shows how to use <a shape="r
 ect" href="routepolicy.html" title="RoutePolicy">RoutePolicy</a> and <a 
shape="rect" href="camel-jmx.html" title="Camel JMX">JMX</a> in Camel to 
dynamically throttle routes.</li><li><a shape="rect" 
href="servlet-tomcat-example.html" title="Servlet Tomcat Example">Servlet 
Tomcat Example</a> shows how to use Camel to route messages using servlets 
running in any web container such as Apache Tomcat.</li><li><a shape="rect" 
href="servlet-tomcat-no-spring-example.html" title="Servlet Tomcat No Spring 
Example">Servlet Tomcat No Spring Example</a> shows how to use Camel to route 
messages using servlets running any web container such as Apache Tomcat without 
using the Spring Framework.</li><li><a shape="rect" href="simple-jira-bot.html" 
title="Simple Jira Bot">Simple Jira Bot</a> shows how to use the camel-rss feed 
to send updates to an irc channel using camel-irc.</li><li><a shape="rect" 
href="spring-example.html" title="Spring Example">Spring Example</a> shows how 
to work with the Spring e
 xample using a Spring ApplicationContext to configure Camel with <a 
shape="rect" href="dsl.html" title="DSL">Java routing rules</a></li><li><a 
shape="rect" href="spring-java-config-example.html" title="Spring Java Config 
Example">Spring Java Config Example</a> shows how to use the <a shape="rect" 
class="external-link" href="http://www.springsource.org/javaconfig"; 
rel="nofollow">Spring java config</a> to configure the Camel with <a 
shape="rect" href="dsl.html" title="DSL">Java routing rules</a></li><li><a 
shape="rect" href="spring-security-example.html" title="Spring Security 
Example">Spring Security Example</a> shows how to implement a basic http 
authentication and role based authorization within a camel route by leverage 
the <a shape="rect" href="spring-security.html" title="Spring 
Security">camel-spring-security component</a>.</li><li><a shape="rect" 
href="spring-ws-example.html" title="Spring WS Example">Spring Web Services 
Example</a> shows how to expose a SOAP-based web service
  using Camel and Spring Web Services.</li><li><a shape="rect" 
href="spring-xquery-example.html" title="Spring XQuery Example">Spring XQuery 
Example</a> shows how to work with the Spring example using a Spring 
ApplicationContext to configure Camel</li><li><a shape="rect" 
href="sql-example.html" title="SQL Example">SQL Example</a> shows how to work 
with <a shape="rect" href="sql-component.html" title="SQL Component">SQL</a> to 
exchange data using a shared database table.</li><li><a shape="rect" 
href="tracer-example.html" title="Tracer Example">Tracer Example</a> shows how 
to use <a shape="rect" href="tracer.html" title="Tracer">Tracer</a> in Camel to 
trace how <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> is 
routed.</li><li><a shape="rect" href="twitter-websocket-example.html" 
title="Twitter Websocket Example">Twitter Websocket Example</a> demonstrates 
how to poll a constant feed of twitter searches and publish results in real 
time using web socket to a web page.<
 /li><li><a shape="rect" href="twitter-websocket-blueprint-example.html" 
title="Twitter Websocket Blueprint Example">Twitter Websocket Blueprint 
Example</a> An OSGi Blueprint version of the <a shape="rect" 
href="twitter-websocket-example.html" title="Twitter Websocket Example">Twitter 
Websocket Example</a>.</li></ul>
+<ul><li><a shape="rect" href="activemq-camel-tomcat.html" title="ActiveMQ 
Camel Tomcat">ActiveMQ Camel Tomcat</a> example shows how to embed Apache 
ActiveMQ and Camel in a web application running on Apache Tomcat.</li><li><a 
shape="rect" href="aggregate-example.html" title="Aggregate Example">Aggregate 
Example</a> shows the overhauled <a shape="rect" href="aggregator2.html" 
title="Aggregator2">Aggregator</a> EIP with persistent storage, which are part 
of Camel 2.3.</li><li><a shape="rect" href="bam-example.html" title="BAM 
Example">BAM Example</a> shows how to use Camel as a <a shape="rect" 
href="bam.html" title="BAM">BAM (Business Activity Monitoring)</a> framework, 
to monitor your business transactions.</li><li><a shape="rect" 
href="cafe-example.html" title="Cafe Example">Cafe Example</a> shows how to use 
Camel to implement a Cafe shop use case.</li><li><a shape="rect" 
href="console-example.html" title="Console Example">Console Example</a> shows 
how to get stared with Camel using 
 to read input from the console.</li><li><a shape="rect" 
href="cxf-example.html" title="CXF Example">CXF Example</a> shows how to use 
Camel as the CXF services router, which consumes the request of a CXF client 
then passes the request to a CXF-based web service.</li><li><a shape="rect" 
href="cxf-example-osgi-blueprint.html" title="CXF Example OSGi Blueprint">CXF 
Example OSGi Blueprint</a> shows how to use the camel-cxf consumer component in 
an OSGI environment using OSGi Blueprint with the OSGI HTTP service.</li><li><a 
shape="rect" href="cxf-example-osgi.html" title="CXF Example OSGi">CXF Example 
OSGi</a> shows how to use the camel-cxf consumer component in an OSGI 
environment using Spring-DM with the OSGI HTTP service.</li><li><a shape="rect" 
href="cxf-proxy-example.html" title="CXF Proxy Example">CXF Proxy Example</a> 
shows how to use Camel to proxy a web service using <a shape="rect" 
href="cxf.html" title="CXF">CXF</a>.</li><li><a shape="rect" 
href="cxf-tomcat-example.html" title=
 "CXF Tomcat Example">CXF Tomcat Example</a> shows how to use Camel to expose a 
code-first web service using <a shape="rect" href="cxf.html" 
title="CXF">CXF</a> as a web application to be deployed in Apache 
Tomcat.</li><li><a shape="rect" href="etl-example.html" title="ETL Example">ETL 
Example</a> shows how to use Camel as an <a shape="rect" class="external-link" 
href="http://en.wikipedia.org/wiki/Extract,_transform,_load"; 
rel="nofollow">Extract Transform Load (ETL)</a> tool</li><li><a shape="rect" 
href="ftp-example.html" title="FTP Example">FTP Example</a> shows how to use 
Camel to upload or download files to/from an existing FTP server.</li><li><a 
shape="rect" href="guice-jms-example.html" title="Guice JMS Example">Guice JMS 
Example</a> shows how to use <a shape="rect" href="guice.html" 
title="Guice">Guice</a> as the Dependency Injection framework to create some <a 
shape="rect" href="jms.html" title="JMS">JMS</a> base routes using just Java 
code and a properties file</li><li><a sha
 pe="rect" href="hibernate-example.html" title="Hibernate Example">Hibernate 
Example</a> shows how to work with <a shape="rect" href="hibernate.html" 
title="Hibernate">Hibernate</a> to exchange data using a shared database 
table.</li><li><a shape="rect" href="jmx-component-example.html" title="JMX 
Component Example">JMX Component Example</a> shows how to use the camel-jmx 
component.</li><li><a shape="rect" href="loadbalancing-mina-example.html" 
title="LoadBalancing Mina Example">LoadBalancing Mina Example</a> shows how to 
use the <a shape="rect" href="load-balancer.html" title="Load Balancer">Load 
Balancer</a> EIP to balance communication with remote servers using <a 
shape="rect" href="mina.html" title="MINA">MINA</a>.</li><li><a shape="rect" 
href="loan-broker-example.html" title="Loan Broker Example">Loan Broker 
Example</a> shows how to use Camel to implement the classical <a shape="rect" 
class="external-link" 
href="http://http://www.enterpriseintegrationpatterns.com/ComposedMessagi
 ngExample.html" rel="nofollow">EIP composed messaging sample </a>.</li><li><a 
shape="rect" href="management-example.html" title="Management 
Example">Management Example</a> shows how to use <a shape="rect" 
href="camel-jmx.html" title="Camel JMX">JMX</a> in Camel to manage a running 
Camel application.</li><li><a shape="rect" href="mybatis-example.html" 
title="MyBatis Example">MyBatis Example</a> shows how to work with <a 
shape="rect" href="mybatis.html" title="MyBatis">MyBatis</a> to exchange data 
using a shared database table.</li><li><a shape="rect" 
href="netty-http-server-example.html" title="Netty HTTP Server Example">Netty 
HTTP Server Example</a> shows how to use <a shape="rect" href="netty-http.html" 
title="Netty HTTP">Netty HTTP</a> as a shared HTTP server with multiple Camel 
applications in OSGi container such as Karaf / ServiceMix.</li><li><a 
shape="rect" href="pojo-messaging-example.html" title="POJO Messaging 
Example">POJO Messaging Example</a> shows how to use annotations 
 to produce, consume or route messages to Camel endpoints without using any 
DSL.</li><li><a shape="rect" href="route-throttling-example.html" title="Route 
Throttling Example">Route Throttling Example</a> shows how to use <a 
shape="rect" href="routepolicy.html" title="RoutePolicy">RoutePolicy</a> and <a 
shape="rect" href="camel-jmx.html" title="Camel JMX">JMX</a> in Camel to 
dynamically throttle routes.</li><li><a shape="rect" 
href="servlet-tomcat-example.html" title="Servlet Tomcat Example">Servlet 
Tomcat Example</a> shows how to use Camel to route messages using servlets 
running in any web container such as Apache Tomcat.</li><li><a shape="rect" 
href="servlet-tomcat-no-spring-example.html" title="Servlet Tomcat No Spring 
Example">Servlet Tomcat No Spring Example</a> shows how to use Camel to route 
messages using servlets running any web container such as Apache Tomcat without 
using the Spring Framework.</li><li><a shape="rect" href="simple-jira-bot.html" 
title="Simple Jira Bot">Simp
 le Jira Bot</a> shows how to use the camel-rss feed to send updates to an irc 
channel using camel-irc.</li><li><a shape="rect" href="spring-example.html" 
title="Spring Example">Spring Example</a> shows how to work with the Spring 
example using a Spring ApplicationContext to configure Camel with <a 
shape="rect" href="dsl.html" title="DSL">Java routing rules</a></li><li><a 
shape="rect" href="spring-java-config-example.html" title="Spring Java Config 
Example">Spring Java Config Example</a> shows how to use the <a shape="rect" 
class="external-link" href="http://www.springsource.org/javaconfig"; 
rel="nofollow">Spring java config</a> to configure the Camel with <a 
shape="rect" href="dsl.html" title="DSL">Java routing rules</a></li><li><a 
shape="rect" href="spring-security-example.html" title="Spring Security 
Example">Spring Security Example</a> shows how to implement a basic http 
authentication and role based authorization within a camel route by leverage 
the <a shape="rect" href="spring-s
 ecurity.html" title="Spring Security">camel-spring-security 
component</a>.</li><li><a shape="rect" href="spring-ws-example.html" 
title="Spring WS Example">Spring Web Services Example</a> shows how to expose a 
SOAP-based web service using Camel and Spring Web Services.</li><li><a 
shape="rect" href="spring-xquery-example.html" title="Spring XQuery 
Example">Spring XQuery Example</a> shows how to work with the Spring example 
using a Spring ApplicationContext to configure Camel</li><li><a shape="rect" 
href="sql-example.html" title="SQL Example">SQL Example</a> shows how to work 
with <a shape="rect" href="sql-component.html" title="SQL Component">SQL</a> to 
exchange data using a shared database table.</li><li><a shape="rect" 
href="tracer-example.html" title="Tracer Example">Tracer Example</a> shows how 
to use <a shape="rect" href="tracer.html" title="Tracer">Tracer</a> in Camel to 
trace how <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> is 
routed.</li><li><a shape="rec
 t" href="twitter-websocket-example.html" title="Twitter Websocket 
Example">Twitter Websocket Example</a> demonstrates how to poll a constant feed 
of twitter searches and publish results in real time using web socket to a web 
page.</li><li><a shape="rect" href="twitter-websocket-blueprint-example.html" 
title="Twitter Websocket Blueprint Example">Twitter Websocket Blueprint 
Example</a> An OSGi Blueprint version of the <a shape="rect" 
href="twitter-websocket-example.html" title="Twitter Websocket Example">Twitter 
Websocket Example</a>.</li></ul>
 
 
 <div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col 
span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" 
valign="top"><img align="middle" 
src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif"; 
width="16" height="16" alt="" border="0"></td><td colspan="1" 
rowspan="1"><b>More examples</b><br clear="none">See also <a shape="rect" 
href="tutorials.html" title="Tutorials">Tutorials</a> for more examples, as 
well as <a shape="rect" href="cookbook.html" 
title="Cookbook">Cookbook</a>.</td></tr></table></div>

Added: websites/production/camel/content/mybatis-example.html
==============================================================================
--- websites/production/camel/content/mybatis-example.html (added)
+++ websites/production/camel/content/mybatis-example.html Tue Jul  9 08:19:19 
2013
@@ -0,0 +1,437 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<!--
+
+    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.
+-->
+<html>
+<head>
+    <link href="http://camel.apache.org/styles/site.css"; rel="stylesheet" 
type="text/css">
+    <link href="http://camel.apache.org/styles/type-settings.css"; 
rel="stylesheet" type="text/css">
+    <script src="http://camel.apache.org/styles/prototype.js"; 
type="text/javascript"></script>
+    <script src="http://camel.apache.org/styles/rico.js"; 
type="text/javascript"></script>    
+    <script src="http://camel.apache.org/styles/site.js"; 
type="text/javascript"></script>
+
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+
+    <style type="text/css">
+      .maincontent { overflow:hidden; }
+    </style>
+    <!--[if IE]>
+    <style type="text/css">
+      .maincontent { width:100%; }
+    </style>
+    <![endif]-->
+
+
+  <link 
href='http://camel.apache.org/styles/highlighter/styles/shCoreCamel.css' 
rel='stylesheet' type='text/css' />
+  <link 
href='http://camel.apache.org/styles/highlighter/styles/shThemeCamel.css' 
rel='stylesheet' type='text/css' />
+  <script src='http://camel.apache.org/styles/highlighter/scripts/shCore.js' 
type='text/javascript'></script>
+  <script 
src='http://camel.apache.org/styles/highlighter/scripts/shBrushJava.js' 
type='text/javascript'></script>
+  <script 
src='http://camel.apache.org/styles/highlighter/scripts/shBrushXml.js' 
type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
+    <title>
+    Apache Camel: MyBatis Example
+    </title>
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+  <div class="header_l">
+    <div class="header_r">
+    </div>
+  </div>
+</div>
+<div class="content">
+  <div class="content_l">
+    <div class="content_r">
+      <div>
+          <!-- Banner -->
+<div id="banner-content"><div id="asf_logo">
+       <div id="activemq_logo" style="height:108px; background:transparent 
url(banner.data/apache-camel-7.png) no-repeat scroll left top;">
+            <a shape="rect" style="float:left; 
width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px;
 margin-top:20px; margin-left:18px;" href="http://camel.apache.org/";>Camel</a>
+            <a shape="rect" style="float:right; 
width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px;
 margin-top:45px; margin-right:10px;" href="http://www.apache.org";>Apache</a>
+       </div>
+        </div></div>
+          <!-- Banner -->
+        <div class="top_red_bar">
+          <div id="site-breadcrumbs">
+                <!-- Breadcrumbs -->
+<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a 
href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a 
href="user-guide.html">User Guide</a>&nbsp;&gt;&nbsp;<a 
href="examples.html">Examples</a>&nbsp;&gt;&nbsp;<a 
href="mybatis-example.html">MyBatis Example</a>
+          </div>
+          <!-- Quicklinks -->
+<div id="site-quicklinks"><p><a shape="rect" href="download.html" 
title="Download">Download</a> | <a shape="rect" href="javadoc.html" 
title="JavaDoc">JavaDoc</a> | <a shape="rect" href="source.html" 
title="Source">Source</a> | <a shape="rect" href="discussion-forums.html" 
title="Discussion Forums">Forums</a> | <a shape="rect" href="support.html" 
title="Support">Support</a></p></div>
+          <!-- Quicklinks -->
+        </div>
+
+       <table border="0">
+       <tbody>
+        <tr>
+        <td valign="top" width="100%">
+<div class="wiki-content maincontent"><h2><a shape="rect" 
name="MyBatisExample-MyBatisExample"></a>MyBatis Example</h2>
+<p><b>Available as of Camel 2.12</b></p>
+
+<p>This example is located in the <tt>examples/camel-example-mybatis</tt> 
directory of the Camel distribution.<br clear="none">
+There is a <tt>README.txt</tt> file with instructions how to run it.</p>
+
+<p>If you use maven then you can easily install the example from the command 
line:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+mvn install
+]]></script>
+</div></div>
+
+<h3><a shape="rect" name="MyBatisExample-About"></a>About</h3>
+
+<p>This example shows how to exchange data using a shared database table.</p>
+
+<p>The example has two Camel routes. The first route insert new data into the 
table, triggered by a timer to run every 5th second.<br clear="none">
+The second route pickup the newly inserted rows from the table, process the 
row(s), and mark the row(s) as processed when done; to avoid picking up the 
same rows again.</p>
+
+<h3><a shape="rect" 
name="MyBatisExample-Implementation"></a>Implementation</h3>
+
+<p>In the <tt>camel-mybatis.xml</tt> file in the 
<tt>src/main/resources/OSGI-INF/blueprint</tt> folder we have the Blueprint XML 
file. This example uses an embedded Database so we use the following bean to 
create and drop the table(s).</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+ &lt;bean id="initDatabase" 
class="org.apache.camel.example.mybatis.DatabaseBean"
+        init-method="create" destroy-method="destroy"&gt;
+    &lt;property name="camelContext" ref="myBatisAndCamel"/&gt;
+  &lt;/bean&gt;
+]]></script>
+</div></div>
+
+<p>This example uses a bean to generate orders</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+ &lt;bean id="orderService" 
class="org.apache.camel.example.mybatis.OrderService"/&gt;
+]]></script>
+</div></div>
+
+<p>And the <a shape="rect" href="camelcontext.html" 
title="CamelContext">CamelContext</a> has two routes as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+  &lt;camelContext id="myBatisAndCamel" 
xmlns="http://camel.apache.org/schema/blueprint"&gt;
+
+    &lt;!-- route that generate new orders and insert them in the database 
--&gt;
+    &lt;route id="generateOrder-route"&gt;
+      &lt;from uri="timer:foo?period=5s"/&gt;
+      &lt;transform&gt;
+        &lt;method ref="orderService" method="generateOrder"/&gt;
+      &lt;/transform&gt;
+      &lt;to uri="mybatis:insertOrder?statementType=Insert"/&gt;
+      &lt;log message="Inserted new order ${body.id}"/&gt;
+    &lt;/route&gt;
+
+    &lt;!-- route that process the orders by picking up new rows from the 
database
+         and when done processing then update the row to mark it as processed 
--&gt;
+    &lt;route id="processOrder-route"&gt;
+      &lt;from 
uri="mybatis:selectOrders?statementType=SelectList&amp;amp;consumer.onConsume=consumeOrder"/&gt;
+      &lt;to uri="bean:orderService?method=processOrder"/&gt;
+      &lt;log message="${body}"/&gt;
+    &lt;/route&gt;
+
+  &lt;/camelContext&gt;
+]]></script>
+</div></div>
+
+<h4><a shape="rect" name="MyBatisExample-MyBatisSqlMapConfig.xml"></a>MyBatis 
SqlMapConfig.xml</h4>
+<p><a shape="rect" href="mybatis.html" title="MyBatis">MyBatis</a> is 
configured using a <tt>SqlMapConfig.xml</tt> file located in the root of the 
classpath, eg in <tt>src/main/resources</tt>.<br clear="none">
+This configuration files setup <a shape="rect" href="mybatis.html" 
title="MyBatis">MyBatis</a> as well a pooled data source</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader 
panelHeader" style="border-bottom-width: 1px;"><b>MyBatis 
SqlMapConfig.xml</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+&lt;!DOCTYPE configuration
+    PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-config.dtd"&gt;
+
+&lt;configuration&gt;
+
+  &lt;settings&gt;
+    &lt;setting name="useGeneratedKeys" value="false"/&gt;
+  &lt;/settings&gt;
+
+  &lt;!-- Use type aliases to avoid typing the full classname every time. 
--&gt;
+  &lt;typeAliases&gt;
+    &lt;typeAlias alias="Order" 
type="org.apache.camel.example.mybatis.Order"/&gt;
+  &lt;/typeAliases&gt;
+
+  &lt;!-- setup environment with JDBC data source --&gt;
+  &lt;environments default="development"&gt;
+    &lt;environment id="development"&gt;
+      &lt;transactionManager type="JDBC"/&gt;
+      &lt;dataSource type="POOLED"&gt;
+        &lt;property name="driver" 
value="org.apache.derby.jdbc.EmbeddedDriver"/&gt;
+        &lt;property name="url" 
value="jdbc:derby:memory:mybatis;create=true"/&gt;
+      &lt;/dataSource&gt;
+    &lt;/environment&gt;
+  &lt;/environments&gt;
+
+  &lt;!-- mapping files --&gt;
+  &lt;mappers&gt;
+    &lt;mapper resource="org/apache/camel/example/mybatis/Order.xml"/&gt;
+  &lt;/mappers&gt;
+
+&lt;/configuration&gt;
+]]></script>
+</div></div>
+
+<h4><a shape="rect" name="MyBatisExample-MyBatismappingfiles"></a>MyBatis 
mapping files</h4>
+<p><a shape="rect" href="mybatis.html" title="MyBatis">MyBatis</a> allows to 
externalize the SQL queries and mapping from SQL to POJOs. </p>
+
+<p>We have a plain POJO <tt>org.apache.camel.example.mybatis.Order</tt> which 
just has getter/setters as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader 
panelHeader" style="border-bottom-width: 1px;"><b>Order POJO</b></div><div 
class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+public class Order {
+
+    private int id;
+    private String item;
+    private int amount;
+    private String description;
+    private boolean processed;
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getItem() {
+        return item;
+    }
+
+    public void setItem(String item) {
+        this.item = item;
+    }
+
+    public int getAmount() {
+        return amount;
+    }
+
+    public void setAmount(int amount) {
+        this.amount = amount;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public boolean isProcessed() {
+        return processed;
+    }
+
+    public void setProcessed(boolean processed) {
+        this.processed = processed;
+    }
+}
+]]></script>
+</div></div>
+
+<p>And the <a shape="rect" href="mybatis.html" title="MyBatis">MyBatis</a> 
mapping file <tt>Order.xml</tt> is located in 
<tt>src/main/resources/org/apache/camel/example/mybatis</tt> where we map from 
SQL to this Order POJO, as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeHeader 
panelHeader" style="border-bottom-width: 1px;"><b>MyBatis mapping file for 
Order</b></div><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+&lt;!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd"&gt;
+
+&lt;mapper namespace="Order"&gt;
+
+  &lt;!-- Result maps describe the mapping between the columns returned
+ from a query, and the class properties.  A result map isn't
+ necessary if the columns (or aliases) match to the properties
+ exactly. --&gt;
+  &lt;resultMap id="OrderResult" type="Order"&gt;
+    &lt;result property="id" column="ORD_ID"/&gt;
+    &lt;result property="item" column="ITEM"/&gt;
+    &lt;result property="amount" column="ITEM_COUNT"/&gt;
+    &lt;result property="description" column="ITEM_DESC"/&gt;
+    &lt;result property="processed" column="ORD_DELETED"/&gt;
+  &lt;/resultMap&gt;
+
+  &lt;!-- Select with no parameters using the result map for Order class. 
--&gt;
+  &lt;select id="selectOrders" resultMap="OrderResult"&gt;
+    select * from ORDERS where ORD_DELETED = false order by ORD_ID
+  &lt;/select&gt;
+
+  &lt;!-- Insert example, using the Order parameter class --&gt;
+  &lt;insert id="insertOrder" parameterType="Order"&gt;
+    insert into ORDERS (
+    ORD_ID,
+    ITEM,
+    ITEM_COUNT,
+    ITEM_DESC,
+    ORD_DELETED
+    )
+    values (
+    #{id}, #{item}, #{amount}, #{description}, false
+    )
+  &lt;/insert&gt;
+
+  &lt;update id="consumeOrder" parameterType="Order"&gt;
+    update ORDERS set ORD_DELETED = true where ORD_ID = #{id}
+  &lt;/update&gt;
+
+&lt;/mapper&gt;
+]]></script>
+</div></div>
+
+
+<h3><a shape="rect" name="MyBatisExample-Runningtheexample"></a>Running the 
example</h3>
+
+<p>This example requires running in Apache Karaf / ServiceMix</p>
+
+<p>To install Apache Camel in Karaf you type in the shell (we use version 
2.12.0):</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+  features:chooseurl camel 2.12.0
+  features:install camel
+]]></script>
+</div></div>
+
+<p>First you need to install the following features in Karaf/ServiceMix 
with:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+  features:install camel-mybatis
+]]></script>
+</div></div>
+
+<p>Then you can install the Camel example:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+  osgi:install -s mvn:org.apache.camel/camel-example-mybatis/2.12.0
+]]></script>
+</div></div>
+
+<p>And you can see the application running by tailing the logs</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
+  log:tail
+]]></script>
+</div></div>
+
+<p>And you can use ctrl + c to stop tailing the log.</p>
+
+
+
+<h3><a shape="rect" name="MyBatisExample-SeeAlso"></a>See Also</h3>
+<ul class="alternate" type="square"><li><a shape="rect" href="examples.html" 
title="Examples">Examples</a></li><li><a shape="rect" href="mybatis.html" 
title="MyBatis">MyBatis</a></li><li><a shape="rect" href="sql-example.html" 
title="SQL Example">SQL Example</a></li><li><a shape="rect" 
href="hibernate-example.html" title="Hibernate Example">Hibernate 
Example</a></li></ul>
+</div>
+        </td>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+                <!-- NavigationBar -->
+<div class="navigation_bottom" id="navigation_bottom"><h3><a shape="rect" 
name="Navigation-Overview"></a><a shape="rect" href="overview.html" 
title="Overview">Overview</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="index.html" 
title="Index">Home</a></li><li><a shape="rect" href="download.html" 
title="Download">Download</a></li><li><a shape="rect" 
href="getting-started.html" title="Getting Started">Getting 
Started</a></li><li><a shape="rect" href="faq.html" 
title="FAQ">FAQ</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Documentation"></a><a shape="rect" 
href="documentation.html" title="Documentation">Documentation</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="user-guide.html" 
title="User Guide">User Guide</a></li><li><a shape="rect" href="manual.html" 
title="Manual">Manual</a></li><li><a shape="rect" href="books.html" 
title="Books">Books</a></li><li><a shape="rect" href="tutorials.html" 
title="Tutorials">Tutorials</a></li><li><a shape="rect" href="examples.html" 
title="Examples">Examples</a></li><li><a shape="rect" href="cookbook.html" 
title="Cookbook">Cookbook</a></li><li><a shape="rect" href="architecture.html" 
title="Architecture">Architecture</a></li><li><a shape="rect" 
href="enterprise-integration-patterns.html" title="Enterprise Integration 
Patterns">Enterprise Integration Patterns</a></li><li><a shape="rect" 
href="dsl.html" title="DSL">DSL</a></li><li><a shape="rect" 
href="components.html" title="Components">Components</a></li><li><a 
shape="rect" href="data-format.html" title="Data Format">Data 
Format</a></li><li><a shape="rect" href="languages.html" title="Languages">L
 anguages</a></li><li><a shape="rect" href="security.html" 
title="Security">Security</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Search"></a>Search</h3>
+
+<p>
+</p><form enctype="application/x-www-form-urlencoded" method="get" 
id="cse-search-box" action="http://www.google.com/cse";>
+  <div>
+    <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
+    <input type="hidden" name="ie" value="UTF-8">
+    <input type="text" name="q" size="21">
+    <input type="submit" name="sa" value="Search">
+  </div>
+</form>
+<script type="text/javascript" 
src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en";></script>
+
+
+<h3><a shape="rect" name="Navigation-Community"></a><a shape="rect" 
href="community.html" title="Community">Community</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="support.html" 
title="Support">Support</a></li><li><a shape="rect" href="contributing.html" 
title="Contributing">Contributing</a></li><li><a shape="rect" 
href="discussion-forums.html" title="Discussion Forums">Discussion 
Forums</a></li><li><a shape="rect" href="mailing-lists.html" title="Mailing 
Lists">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html" 
title="User Stories">User Stories</a></li><li><a shape="rect" href="news.html" 
title="News">News</a></li><li><a shape="rect" href="articles.html" 
title="Articles">Articles</a></li><li><a shape="rect" href="site.html" 
title="Site">Site</a></li><li><a shape="rect" href="team.html" 
title="Team">Team</a></li><li><a shape="rect" class="external-link" 
href="http://camel-extra.googlecode.com/"; rel="nofollow">Camel 
Extra</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-Developers"></a><a shape="rect" 
href="developers.html" title="Developers">Developers</a></h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" href="developers.html" 
title="Developers">Developer Guide</a></li><li><a shape="rect" 
href="source.html" title="Source">Source</a></li><li><a shape="rect" 
href="building.html" title="Building">Building</a></li><li><a shape="rect" 
href="javadoc.html" title="JavaDoc">JavaDoc</a></li><li><a shape="rect" 
href="irc-room.html" title="IRC Room">IRC Room</a></li></ul>
+
+
+<h3><a shape="rect" name="Navigation-ApacheSoftwareFoundation"></a>Apache 
Software Foundation</h3>
+
+<ul class="alternate" type="square"><li><a shape="rect" class="external-link" 
href="http://www.apache.org/licenses/";>License</a></li><li><a shape="rect" 
class="external-link" 
href="http://www.apache.org/foundation/sponsorship.html";>Sponsorship</a></li><li><a
 shape="rect" class="external-link" 
href="http://www.apache.org/foundation/thanks.html";>Thanks</a></li><li><a 
shape="rect" class="external-link" 
href="http://www.apache.org/security/";>Security</a></li></ul>
+</div>
+                <!-- NavigationBar -->
+            </div>
+          </div>
+        </td>
+        </tr>
+       </tbody>
+        </table>
+
+
+        <div class="bottom_red_bar"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="black_box">
+<div class="footer">
+  <div class="footer_l">
+    <div class="footer_r">
+      <div>
+        <a href="$base/privacy-policy.html">Privacy Policy</a> -
+        (<a 
href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=33293822";>edit
 page</a>)
+        (<a 
href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=33293822&amp;showComments=true&amp;showCommentArea=true#addcomment";>add
 comment</a>)
+      </div>
+    </div>
+  </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+&copy; 2004-2011 The Apache Software Foundation.
+<br>          
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel 
project logo are trademarks of The Apache Software Foundation.  All other marks 
mentioned may be trademarks or registered trademarks of their respective owners.
+<br>
+<a href="http://hiramchirino.com";>Graphic Design By Hiram</a>
+</div>
+
+<!-- Camel committers that would like access to the Analytics, send a note to 
priv...@camel.apache.org -->
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-25976253-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; 
ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+
+</body>
+</html>
+
+


Reply via email to