Author: ningjiang
Date: Thu Jan 28 04:05:15 2010
New Revision: 903951
URL: http://svn.apache.org/viewvc?rev=903951&view=rev
Log:
Added code snippets tag for wiki and fix the camel-example-cafe exec:java
running error
Added:
camel/trunk/examples/camel-example-cafe/src/main/resources/jndi.properties
(with props)
Modified:
camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/CafeRouteBuilder.java
Modified:
camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/CafeRouteBuilder.java
URL:
http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/CafeRouteBuilder.java?rev=903951&r1=903950&r2=903951&view=diff
==============================================================================
---
camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/CafeRouteBuilder.java
(original)
+++
camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/CafeRouteBuilder.java
Thu Jan 28 04:05:15 2010
@@ -70,14 +70,15 @@
camelContext.stop();
}
-
+ //START SNIPPET: RouteConfig
public void configure() {
+
from("direct:cafe")
.split().method("orderSplitter").to("direct:drink");
from("direct:drink").recipientList().method("drinkRouter");
-
from("seda:coldDrinks?concurrentConsumers=2").to("bean:barista?method=prepareColdDrink").to("direct:deliveries");
+ from("seda:coldDrinks?concurrentConsumers=2").to("bean:
?method=prepareColdDrink").to("direct:deliveries");
from("seda:hotDrinks?concurrentConsumers=3").to("bean:barista?method=prepareHotDrink").to("direct:deliveries");
from("direct:deliveries")
@@ -87,5 +88,6 @@
.to("bean:waiter?method=deliverCafes");
}
+ //END SNIPPET: RouteConfig
}
Added:
camel/trunk/examples/camel-example-cafe/src/main/resources/jndi.properties
URL:
http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cafe/src/main/resources/jndi.properties?rev=903951&view=auto
==============================================================================
--- camel/trunk/examples/camel-example-cafe/src/main/resources/jndi.properties
(added)
+++ camel/trunk/examples/camel-example-cafe/src/main/resources/jndi.properties
Thu Jan 28 04:05:15 2010
@@ -0,0 +1,29 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial =
org.apache.camel.util.jndi.CamelInitialContextFactory
+
+# the following properties will be copied into the context
+foo = bar
+
+example.class = org.apache.camel.util.jndi.ExampleBean
+example.name = James
+example.price = 2.34
+
+# END SNIPPET: jndi
Propchange:
camel/trunk/examples/camel-example-cafe/src/main/resources/jndi.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/examples/camel-example-cafe/src/main/resources/jndi.properties
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
camel/trunk/examples/camel-example-cafe/src/main/resources/jndi.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain