Permalink
Browse files

New example for using SQL component

git-svn-id: https://svn.apache.org/repos/asf/camel/trunk@1435080 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 796b689 commit fc441c5bc56cff64051ad16b8fd750abef7f5fdd @davsclaus davsclaus committed Jan 18, 2013
@@ -21,6 +21,7 @@
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <!-- START SNIPPET: e1 -->
<!-- this is the JDBC data source which uses an in-memory only Apache Derby database -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
@@ -39,7 +40,9 @@
<bean id="sql" class="org.apache.camel.component.sql.SqlComponent">
<property name="dataSource" ref="dataSource"/>
</bean>
+ <!-- END SNIPPET: e1 -->
+ <!-- START SNIPPET: e2 -->
<!-- order bean is our business logic bean that creates new orders -->
<bean id="orderBean" class="org.apache.camel.example.sql.OrderBean"/>
@@ -68,5 +71,6 @@
</route>
</camelContext>
+ <!-- END SNIPPET: e2 -->
</beans>
@@ -15,6 +15,7 @@
## limitations under the License.
## ------------------------------------------------------------------------
+## START SNIPPET: e1
## sql that insert new orders
sql.insertOrder=insert into orders (id, item, amount, description, processed) values (:#id, :#item, :#amount, :#description, false)
@@ -23,3 +24,5 @@ sql.selectOrder=select * from orders where processed = false
## sql that update the order as being processed
sql.markOrder=update orders set processed = true where id = :#id
+
+## END SNIPPET: e1

0 comments on commit fc441c5

Please sign in to comment.