You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/12/08 05:27:05 UTC
[1/4] camel git commit: CAMEL-8128 Added Jetty maven plugin to run
example from maven
Repository: camel
Updated Branches:
refs/heads/master f1785aebc -> 1318153dc
CAMEL-8128 Added Jetty maven plugin to run example from maven
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1318153d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1318153d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1318153d
Branch: refs/heads/master
Commit: 1318153dc0a97d848f4f620623711d4f220f796f
Parents: 8d98c90
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Dec 8 11:52:25 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Dec 8 12:26:53 2014 +0800
----------------------------------------------------------------------
examples/camel-example-servlet-tomcat-no-spring/pom.xml | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1318153d/examples/camel-example-servlet-tomcat-no-spring/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-no-spring/pom.xml b/examples/camel-example-servlet-tomcat-no-spring/pom.xml
index 94ae824..c3ed38e 100755
--- a/examples/camel-example-servlet-tomcat-no-spring/pom.xml
+++ b/examples/camel-example-servlet-tomcat-no-spring/pom.xml
@@ -59,5 +59,15 @@
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>${jetty-version}</version>
+ </plugin>
+ </plugins>
+ </build>
</project>
[4/4] camel git commit: Update chunk template version to 2.6
Posted by ni...@apache.org.
Update chunk template version to 2.6
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2afef823
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2afef823
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2afef823
Branch: refs/heads/master
Commit: 2afef8232cefe113f115921bb1759198bc42f2be
Parents: f1785ae
Author: ancosen <an...@gmail.com>
Authored: Sun Dec 7 11:42:01 2014 +0100
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Dec 8 12:26:53 2014 +0800
----------------------------------------------------------------------
parent/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/2afef823/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 424a1d9..ed14b9c 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -79,7 +79,7 @@
<cdi-api-version>1.2</cdi-api-version>
<cglib-bundle-version>2.1_3_7</cglib-bundle-version>
<cglib-version>2.2</cglib-version>
- <chunk-templates-version>2.5</chunk-templates-version>
+ <chunk-templates-version>2.6</chunk-templates-version>
<classmate-version>1.0.0</classmate-version>
<cmis-version>0.8.0</cmis-version>
<cometd-bayeux-version>6.1.11</cometd-bayeux-version>
[2/4] camel git commit: Polish the index.html of
camel-example-servlet-tomcat-no-spring
Posted by ni...@apache.org.
Polish the index.html of camel-example-servlet-tomcat-no-spring
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f60a8c92
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f60a8c92
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f60a8c92
Branch: refs/heads/master
Commit: f60a8c92ca21b130acf87b56f998d81122382754
Parents: 2afef82
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Dec 8 11:44:08 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Dec 8 12:26:53 2014 +0800
----------------------------------------------------------------------
.../src/main/webapp/index.html | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f60a8c92/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/index.html b/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/index.html
index cb3ce63..833d67d 100644
--- a/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/index.html
+++ b/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/index.html
@@ -27,7 +27,12 @@ To get started click <a href="camel/hello">this link</a>.
<br/>
<br/>
This example is documented at
-<a href="http://camel.apache.org/servlet-tomcat-example-no-spring.html">servlet tomcat no spring example</a>
+<a href="http://camel.apache.org/servlet-tomcat-no-spring-example.html">servlet tomcat no spring example</a>
+
+<br/>
+<br/>
+You can find more information about the camel servletlistener component
+<a href="https://camel.apache.org/servletlistener-component.html">here</a>
<br/>
If you hit any problems please let us know on the
[3/4] camel git commit: CAMEL-8128 Polish the example to show how to
setup the camel context registry
Posted by ni...@apache.org.
CAMEL-8128 Polish the example to show how to setup the camel context registry
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8d98c900
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8d98c900
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8d98c900
Branch: refs/heads/master
Commit: 8d98c900e83698b1f068df7cd0a86a4b9bdaa7cb
Parents: f60a8c9
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Dec 8 11:51:09 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Dec 8 12:26:53 2014 +0800
----------------------------------------------------------------------
.../example/servletlistener/HelloBean.java | 27 +++++++++
.../example/servletlistener/MyLifecycle.java | 61 ++++++++++++++++++++
.../src/main/resources/camel-config.xml | 4 +-
.../src/main/webapp/WEB-INF/web.xml | 8 +++
4 files changed, 97 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/8d98c900/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java b/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java
new file mode 100644
index 0000000..3912711
--- /dev/null
+++ b/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/HelloBean.java
@@ -0,0 +1,27 @@
+/**
+ * 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.
+ */
+package org.apache.camel.example.servletlistener;
+
+import org.apache.camel.Header;
+
+public class HelloBean {
+
+ public String sayHello(@Header("name")String name) {
+ return "Hello " + name + ", how are you?";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/8d98c900/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/MyLifecycle.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/MyLifecycle.java b/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/MyLifecycle.java
new file mode 100644
index 0000000..3a23c2a
--- /dev/null
+++ b/examples/camel-example-servlet-tomcat-no-spring/src/main/java/org/apache/camel/example/servletlistener/MyLifecycle.java
@@ -0,0 +1,61 @@
+/**
+ * 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.
+ */
+package org.apache.camel.example.servletlistener;
+
+import org.apache.camel.component.servletlistener.CamelContextLifecycle;
+import org.apache.camel.component.servletlistener.ServletCamelContext;
+import org.apache.camel.impl.JndiRegistry;
+
+public class MyLifecycle implements CamelContextLifecycle<JndiRegistry> {
+
+ @Override
+ public void beforeStart(ServletCamelContext camelContext, JndiRegistry registry) throws Exception {
+ // enlist our bean(s) in the registry
+ registry.bind("myBean", new HelloBean());
+
+ }
+
+ @Override
+ public void beforeStop(ServletCamelContext camelContext, JndiRegistry registry) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void afterStop(ServletCamelContext camelContext, JndiRegistry registry) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void beforeAddRoutes(ServletCamelContext camelContext, JndiRegistry registry) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void afterAddRoutes(ServletCamelContext camelContext, JndiRegistry registry) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void afterStart(ServletCamelContext camelContext, JndiRegistry registry) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/8d98c900/examples/camel-example-servlet-tomcat-no-spring/src/main/resources/camel-config.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-no-spring/src/main/resources/camel-config.xml b/examples/camel-example-servlet-tomcat-no-spring/src/main/resources/camel-config.xml
index 8bc495b..b99bae2 100755
--- a/examples/camel-example-servlet-tomcat-no-spring/src/main/resources/camel-config.xml
+++ b/examples/camel-example-servlet-tomcat-no-spring/src/main/resources/camel-config.xml
@@ -30,9 +30,7 @@
<!-- is there a header with the key name? -->
<header>name</header>
<!-- yes so return back a message to the user -->
- <transform>
- <simple>Hello ${header.name} how are you?</simple>
- </transform>
+ <to uri="bean:myBean"/>
</when>
<otherwise>
<!-- if no name parameter then output a syntax to the user -->
http://git-wip-us.apache.org/repos/asf/camel/blob/8d98c900/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/WEB-INF/web.xml b/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/WEB-INF/web.xml
index d89109d..5192920 100755
--- a/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/WEB-INF/web.xml
+++ b/examples/camel-example-servlet-tomcat-no-spring/src/main/webapp/WEB-INF/web.xml
@@ -36,6 +36,14 @@
<!-- note: instead of using a XML file we can also define the routes in Java code in a RouteBuilder class -->
<param-value>classpath:camel-config.xml</param-value>
</context-param>
+ <context-param>
+ <!-- define a lifecycle which could help user to setup the registry which could be use as a reference in camel route -->
+ <!-- If you use org.apache.camel.component.servletlistener.JndiCamelServletContextListener then the CamelContextLifecycle
+ must use the JndiRegistry as well. And likewise if the servlet is org.apache.camel.component.servletlistener.SimpleCamelServletContextListener
+ then the CamelContextLifecycle must use the SimpleRegistry -->
+ <param-name>CamelContextLifecycle</param-name>
+ <param-value>org.apache.camel.example.servletlistener.MyLifecycle</param-value>
+ </context-param>
<!-- the listener that kick-starts Camel -->
<listener>