You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by cm...@apache.org on 2012/09/25 16:57:51 UTC
svn commit: r1389898 - in /camel/trunk/examples/camel-example-cdi:
README.txt pom.xml src/main/java/org/apache/camel/example/cdi/MyRoutes.java
src/main/webapp/ src/main/webapp/beans.xml
Author: cmoulliard
Date: Tue Sep 25 14:57:51 2012
New Revision: 1389898
URL: http://svn.apache.org/viewvc?rev=1389898&view=rev
Log:
Comment the glassfish profile which is not working. Resolve issue with jboss profile
Added:
camel/trunk/examples/camel-example-cdi/src/main/webapp/
camel/trunk/examples/camel-example-cdi/src/main/webapp/beans.xml
Modified:
camel/trunk/examples/camel-example-cdi/README.txt
camel/trunk/examples/camel-example-cdi/pom.xml
camel/trunk/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java
Modified: camel/trunk/examples/camel-example-cdi/README.txt
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/README.txt?rev=1389898&r1=1389897&r2=1389898&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cdi/README.txt (original)
+++ camel/trunk/examples/camel-example-cdi/README.txt Tue Sep 25 14:57:51 2012
@@ -20,13 +20,9 @@ You can see the routing rules by looking
Remarks :
- When we use the camel plugin, a local CDI container is created and started
-- Two maven profiles have been defined in the example to run the code into a Glassfish
+- An additional profile has been defined in the example to run the code into a JBoss AS7 server
-mvn deploy -Pglassfish
-
-and JBoss AS
-
-mvn deploy --Pjboss
+ mvn deploy -P jboss
This example is documented at
http://camel.apache.org/cdi-example.html
Modified: camel/trunk/examples/camel-example-cdi/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/pom.xml?rev=1389898&r1=1389897&r2=1389898&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cdi/pom.xml (original)
+++ camel/trunk/examples/camel-example-cdi/pom.xml Tue Sep 25 14:57:51 2012
@@ -86,13 +86,6 @@
</dependency>
</dependencies>
- <pluginRepositories>
- <pluginRepository>
- <id>jboss -releases</id>
- <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
- </pluginRepository>
- </pluginRepositories>
-
<build>
<plugins>
<!-- Allows the routes to be run via 'mvn camel:run' -->
@@ -157,13 +150,20 @@
<scope>test</scope>
</dependency>
</dependencies>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss -releases</id>
+ <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
+ </pluginRepository>
+ </pluginRepositories>
</profile>
+ <!-- As we have issue with glassfish server and weld - http://java.net/jira/browse/GLASSFISH-15888, we will not use it
<profile>
<id>glassfish</id>
<properties>
<glassfish.version>3.1.1</glassfish.version>
- <embedded-glassfish-plugin-version>3.1.1</embedded-glassfish-plugin-version>
+ <embedded-glassfish-plugin-version>3.1.2.2</embedded-glassfish-plugin-version>
</properties>
<dependencies>
<dependency>
@@ -173,10 +173,16 @@
<scope>provided</scope>
</dependency>
</dependencies>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>maven2 - releases</id>
+ <url>http://central.maven.org/maven2/</url>
+ </pluginRepository>
+ </pluginRepositories>
<build>
<plugins>
<plugin>
- <groupId>org.glassfish</groupId>
+ <groupId>org.glassfish.embedded</groupId>
<artifactId>maven-embedded-glassfish-plugin</artifactId>
<version>${embedded-glassfish-plugin-version}</version>
<dependencies>
@@ -204,6 +210,7 @@
</plugins>
</build>
</profile>
+ -->
<profile>
<id>jboss</id>
Modified: camel/trunk/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java?rev=1389898&r1=1389897&r2=1389898&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java (original)
+++ camel/trunk/examples/camel-example-cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java Tue Sep 25 14:57:51 2012
@@ -16,8 +16,8 @@
*/
package org.apache.camel.example.cdi;
-import javax.ejb.Singleton;
import javax.ejb.Startup;
+import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.inject.Named;
@@ -32,9 +32,11 @@ import org.apache.camel.cdi.Uri;
*/
@ContextName
@Startup
-@Singleton
+@ApplicationScoped
public class MyRoutes extends RouteBuilder {
+ public MyRoutes(){};
+
@Inject
//@Uri("activemq:test.MyQueue")
@Uri("file://target/testdata/queue")
Added: camel/trunk/examples/camel-example-cdi/src/main/webapp/beans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cdi/src/main/webapp/beans.xml?rev=1389898&view=auto
==============================================================================
--- camel/trunk/examples/camel-example-cdi/src/main/webapp/beans.xml (added)
+++ camel/trunk/examples/camel-example-cdi/src/main/webapp/beans.xml Tue Sep 25 14:57:51 2012
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans/>
\ No newline at end of file