You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2012/01/17 14:01:24 UTC
svn commit: r1232402 - in /karaf/cellar/branches/cellar-2.2.x:
itests/src/test/java/org/apache/karaf/cellar/itests/ samples/
samples/camel-hazelcast-app/ samples/camel-hazelcast-app/consumer/
samples/camel-hazelcast-app/consumer/src/ samples/camel-haze...
Author: jbonofre
Date: Tue Jan 17 13:01:23 2012
New Revision: 1232402
URL: http://svn.apache.org/viewvc?rev=1232402&view=rev
Log:
[KARAF-1084] Add sample to demonstrate how to use Cellar with camel-hazelcast
Added:
karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleCamelHazelcastTest.java
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/pom.xml
- copied, changed from r1232348, karaf/cellar/branches/cellar-2.2.x/samples/pom.xml
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/resources/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/resources/OSGI-INF/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/resources/OSGI-INF/blueprint/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/resources/OSGI-INF/blueprint/blueprint.xml
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/pom.xml
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/pom.xml
- copied, changed from r1232348, karaf/cellar/branches/cellar-2.2.x/samples/pom.xml
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/resources/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/resources/OSGI-INF/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/resources/OSGI-INF/blueprint/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/resources/OSGI-INF/blueprint/blueprint.xml
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/src/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/src/main/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/src/main/resources/
karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/src/main/resources/features.xml
Modified:
karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarChildNodesTest.java
karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarFeaturesTest.java
karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarGroupsTest.java
karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarInstallationTest.java
karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleDosgiGreeterTest.java
karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarTestSupport.java
karaf/cellar/branches/cellar-2.2.x/samples/pom.xml
Modified: karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarChildNodesTest.java
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarChildNodesTest.java?rev=1232402&r1=1232401&r2=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarChildNodesTest.java (original)
+++ karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarChildNodesTest.java Tue Jan 17 13:01:23 2012
@@ -47,8 +47,6 @@ public class CellarChildNodesTest extend
Set<Node> nodes =clusterManager.listNodes();
System.err.println(executeCommand("cluster:nodes-list"));
assertTrue("There should be at least 2 cellar nodes running", 2 <= nodes.size());
-
-
}
@After
@@ -61,10 +59,10 @@ public class CellarChildNodesTest extend
}
}
-
@Configuration
public Option[] config() {
return new Option[]{
cellarDistributionConfiguration(), keepRuntimeFolder(),logLevel(LogLevelOption.LogLevel.ERROR)};
}
+
}
Modified: karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarFeaturesTest.java
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarFeaturesTest.java?rev=1232402&r1=1232401&r2=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarFeaturesTest.java (original)
+++ karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarFeaturesTest.java Tue Jan 17 13:01:23 2012
@@ -94,8 +94,6 @@ public class CellarFeaturesTest extends
Set<Node> nodes =clusterManager.listNodes();
System.err.println(executeCommand("cluster:nodes-list"));
assertTrue("There should be at least 2 cellar nodes running", 2 <= nodes.size());
-
-
}
@After
@@ -108,10 +106,10 @@ public class CellarFeaturesTest extends
}
}
-
@Configuration
public Option[] config() {
return new Option[]{
cellarDistributionConfiguration(), keepRuntimeFolder(),logLevel(LogLevelOption.LogLevel.ERROR)};
}
+
}
Modified: karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarGroupsTest.java
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarGroupsTest.java?rev=1232402&r1=1232401&r2=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarGroupsTest.java (original)
+++ karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarGroupsTest.java Tue Jan 17 13:01:23 2012
@@ -66,7 +66,6 @@ public class CellarGroupsTest extends Ce
System.err.println(executeCommand("cluster:group-list"));
groups = groupManager.listAllGroups();
assertEquals("There should be a single cellar group", 1 , groups.size());
-
}
@After
@@ -79,10 +78,10 @@ public class CellarGroupsTest extends Ce
}
}
-
@Configuration
public Option[] config() {
return new Option[]{
cellarDistributionConfiguration(), keepRuntimeFolder(),logLevel(LogLevelOption.LogLevel.ERROR)};
}
+
}
Modified: karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarInstallationTest.java
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarInstallationTest.java?rev=1232402&r1=1232401&r2=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarInstallationTest.java (original)
+++ karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarInstallationTest.java Tue Jan 17 13:01:23 2012
@@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.karaf.cellar.itests;
import org.apache.karaf.cellar.core.ClusterManager;
@@ -41,10 +40,10 @@ public class CellarInstallationTest exte
System.err.println(executeCommand("cluster:nodes-list"));
}
-
@Configuration
public Option[] config() {
return new Option[]{
cellarDistributionConfiguration(), keepRuntimeFolder()};
}
+
}
Added: karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleCamelHazelcastTest.java
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleCamelHazelcastTest.java?rev=1232402&view=auto
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleCamelHazelcastTest.java (added)
+++ karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleCamelHazelcastTest.java Tue Jan 17 13:01:23 2012
@@ -0,0 +1,111 @@
+/*
+ * Licensed 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.karaf.cellar.itests;
+
+import org.apache.karaf.cellar.core.ClusterManager;
+import org.apache.karaf.cellar.core.Node;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openengsb.labs.paxexam.karaf.options.LogLevelOption;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.ExamReactorStrategy;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactorFactory;
+
+import java.util.Set;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.logLevel;
+
+@RunWith(JUnit4TestRunner.class)
+@ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
+public class CellarSampleCamelHazelcastTest extends CellarTestSupport {
+
+ @Test
+ public void testCamelSampleApp() throws InterruptedException {
+ installCellar();
+ createCellarChild("child1");
+ createCellarChild("child2");
+ Thread.sleep(DEFAULT_TIMEOUT);
+ ClusterManager clusterManager = getOsgiService(ClusterManager.class);
+ assertNotNull(clusterManager);
+
+ System.err.println(executeCommand("features:addurl mvn:org.apache.karaf.cellar.samples/camel-hazelcast-app/2.2.3-SNAPSHOT/xml/features"));
+
+ System.err.println(executeCommand("admin:list"));
+
+ System.err.println(executeCommand("cluster:nodes-list"));
+ Node localNode = clusterManager.getNode();
+ Set<Node> nodes = clusterManager.listNodes();
+ assertTrue("There should be at least 3 cellar nodes running", nodes.size() >= 3);
+
+ Thread.sleep(DEFAULT_TIMEOUT);
+
+ String node1 = getNodeIdOfChild("child1");
+ String node2 = getNodeIdOfChild("child2");
+
+ System.err.println("Child1:" + node1);
+ System.err.println("Child2:" + node2);
+
+ System.err.println(executeCommand("cluster:group-set producer-grp " + localNode.getId()));
+ System.err.println(executeCommand("cluster:group-set consumer-grp " + node1));
+ System.err.println(executeCommand("cluster:group-set consumer-grp " + node2));
+ System.err.println(executeCommand("cluster:group-list"));
+
+ System.err.println(executeCommand("cluster:features-install consumer-grp cellar-sample-camel-consumer"));
+ System.err.println(executeCommand("cluster:features-install producer-grp cellar-sample-camel-producer"));
+ Thread.sleep(10000);
+ System.err.println(executeCommand("features:list"));
+ System.err.println(executeCommand("osgi:list"));
+
+ System.err.println(executeCommand("cluster:group-list"));
+ System.err.println(executeCommand("admin:connect child2 osgi:list -t 0"));
+
+ Thread.sleep(10000);
+ String output1 = executeCommand("admin:connect child1 log:display | grep \"Hallo Cellar\"");
+ System.err.println(output1);
+ String output2 = executeCommand("admin:connect child2 log:display | grep \"Hallo Cellar\"");
+ System.err.println(output2);
+ assertTrue("Expected at least lines", countOutputEntires(output1) >= 2);
+ assertTrue("Expected at least lines", countOutputEntires(output2) >= 2);
+ }
+
+ public int countOutputEntires(String output) {
+ String[] lines = output.split("\n");
+ return lines.length;
+ }
+
+ @After
+ public void tearDown() {
+ try {
+ destroyCellarChild("child1");
+ destroyCellarChild("child2");
+ unInstallCellar();
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+
+ @Configuration
+ public Option[] config() {
+ return new Option[]{
+ cellarDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR)
+ };
+ }
+
+}
Modified: karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleDosgiGreeterTest.java
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleDosgiGreeterTest.java?rev=1232402&r1=1232401&r2=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleDosgiGreeterTest.java (original)
+++ karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarSampleDosgiGreeterTest.java Tue Jan 17 13:01:23 2012
@@ -114,10 +114,10 @@ public class CellarSampleDosgiGreeterTes
}
}
-
@Configuration
public Option[] config() {
return new Option[]{
cellarDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR), debugConfiguration("5005", true)};
}
+
}
Modified: karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarTestSupport.java
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarTestSupport.java?rev=1232402&r1=1232401&r2=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarTestSupport.java (original)
+++ karaf/cellar/branches/cellar-2.2.x/itests/src/test/java/org/apache/karaf/cellar/itests/CellarTestSupport.java Tue Jan 17 13:01:23 2012
@@ -11,7 +11,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.karaf.cellar.itests;
import java.io.ByteArrayOutputStream;
@@ -64,7 +63,7 @@ public class CellarTestSupport {
static final String INSTANCE_STARTED = "Started";
static final String INSTANCE_STARTING = "Starting";
- static final String CELLAR_FEATURE_URL = String.format("mvn:org.apache.karaf.cellar/apache-karaf-cellar/%s/xml/features","3.0.0-SNAPSHOT");
+ static final String CELLAR_FEATURE_URL = String.format("mvn:org.apache.karaf.cellar/apache-karaf-cellar/%s/xml/features","2.2.3-SNAPSHOT");
static final String DEBUG_OPTS = " --java-opts \"-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%s\"";
@@ -398,13 +397,11 @@ public class CellarTestSupport {
return false;
}
-
- /*
+ /**
* Provides an iterable collection of references, even if the original array is null
*/
private static Collection<ServiceReference> asCollection(ServiceReference[] references) {
return references != null ? Arrays.asList(references) : Collections.<ServiceReference>emptyList();
}
-
}
Copied: karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/pom.xml (from r1232348, karaf/cellar/branches/cellar-2.2.x/samples/pom.xml)
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/pom.xml?p2=karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/pom.xml&p1=karaf/cellar/branches/cellar-2.2.x/samples/pom.xml&r1=1232348&r2=1232402&rev=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/samples/pom.xml (original)
+++ karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/pom.xml Tue Jan 17 13:01:23 2012
@@ -22,20 +22,39 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.karaf</groupId>
- <artifactId>cellar</artifactId>
+ <groupId>org.apache.karaf.cellar.samples</groupId>
+ <artifactId>camel-hazelcast-app</artifactId>
<version>2.2.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.apache.karaf.cellar</groupId>
- <artifactId>samples</artifactId>
- <packaging>pom</packaging>
- <name>Apache Karaf :: Cellar :: Samples</name>
+ <groupId>org.apache.karaf.cellar.samples.camel.hazelcast</groupId>
+ <artifactId>consumer</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Karaf :: Cellar :: Samples :: Camel Hazelcast Application :: Consumer</name>
- <modules>
- <module>dosgi-greeter</module>
- <module>hazelcast-app</module>
- </modules>
+ <properties>
+ <osgi.import>
+ *
+ </osgi.import>
+ </properties>
-</project>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-blueprint</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-hazelcast</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1232402&view=auto
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/consumer/src/main/resources/OSGI-INF/blueprint/blueprint.xml Tue Jan 17 13:01:23 2012
@@ -0,0 +1,39 @@
+<?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.
++-->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:camel="http://camel.apache.org/schema/blueprint"
+ xsi:schemaLocation="
+ http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+ http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
+
+ <camelContext id="blueprintContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
+ <route>
+ <from uri="hazelcast:seda:yet.another.queue"/>
+ <to uri="log:org.apache.karaf.cellar.samples.camel.hazelcast.out?level=INFO"/>
+ </route>
+ </camelContext>
+
+ <bean id="hazelcast" class="org.apache.camel.component.hazelcast.HazelcastComponent">
+ <property name="hazelcastInstance" ref="hazelcastInstance"/>
+ </bean>
+
+ <reference id="hazelcastInstance" availability="optional" interface="com.hazelcast.core.HazelcastInstance"/>
+
+</blueprint>
\ No newline at end of file
Added: karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/pom.xml
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/pom.xml?rev=1232402&view=auto
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/pom.xml (added)
+++ karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/pom.xml Tue Jan 17 13:01:23 2012
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <!--
+
+ 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.
+ -->
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.karaf.cellar</groupId>
+ <artifactId>samples</artifactId>
+ <version>2.2.3-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.apache.karaf.cellar.samples</groupId>
+ <artifactId>camel-hazelcast-app</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Karaf :: Cellar :: Samples :: </name>
+
+ <properties>
+ <camel.version>2.9.0</camel.version>
+ </properties>
+
+ <modules>
+ <module>producer</module>
+ <module>consumer</module>
+ </modules>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifact</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>target/classes/features.xml</file>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Copied: karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/pom.xml (from r1232348, karaf/cellar/branches/cellar-2.2.x/samples/pom.xml)
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/pom.xml?p2=karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/pom.xml&p1=karaf/cellar/branches/cellar-2.2.x/samples/pom.xml&r1=1232348&r2=1232402&rev=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/samples/pom.xml (original)
+++ karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/pom.xml Tue Jan 17 13:01:23 2012
@@ -22,20 +22,39 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.karaf</groupId>
- <artifactId>cellar</artifactId>
+ <groupId>org.apache.karaf.cellar.samples</groupId>
+ <artifactId>camel-hazelcast-app</artifactId>
<version>2.2.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
- <groupId>org.apache.karaf.cellar</groupId>
- <artifactId>samples</artifactId>
- <packaging>pom</packaging>
- <name>Apache Karaf :: Cellar :: Samples</name>
+ <groupId>org.apache.karaf.cellar.samples.camel.hazelcast</groupId>
+ <artifactId>producer</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Karaf :: Cellar :: Samples :: Camel Hazelcast Application :: Producer</name>
- <modules>
- <module>dosgi-greeter</module>
- <module>hazelcast-app</module>
- </modules>
+ <properties>
+ <osgi.import>
+ *
+ </osgi.import>
+ </properties>
-</project>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-core</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-blueprint</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-hazelcast</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1232402&view=auto
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/producer/src/main/resources/OSGI-INF/blueprint/blueprint.xml Tue Jan 17 13:01:23 2012
@@ -0,0 +1,41 @@
+<?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.
++-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:camel="http://camel.apache.org/schema/blueprint"
+ xsi:schemaLocation="
+ http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+ http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
+
+ <camelContext id="blueprintContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
+ <route id="timerToLog">
+ <from uri="timer:foo?period=5000"/>
+ <setBody>
+ <constant>Hallo Cellar</constant>
+ </setBody>
+ <to uri="hazelcast:seda:yet.another.queue"/>
+ </route>
+ </camelContext>
+
+ <bean id="hazelcast" class="org.apache.camel.component.hazelcast.HazelcastComponent">
+ <property name="hazelcastInstance" ref="hazelcastInstance"/>
+ </bean>
+
+ <reference id="hazelcastInstance" availability="optional" interface="com.hazelcast.core.HazelcastInstance"/>
+
+</blueprint>
\ No newline at end of file
Added: karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/src/main/resources/features.xml?rev=1232402&view=auto
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/src/main/resources/features.xml (added)
+++ karaf/cellar/branches/cellar-2.2.x/samples/camel-hazelcast-app/src/main/resources/features.xml Tue Jan 17 13:01:23 2012
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed 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.
+-->
+<features name="dosgi-greeter" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
+
+ <repository>mvn:org.apache.camel.karaf/apache-camel/${camel.version}/xml/features</repository>
+
+ <feature name='cellar-sample-camel-producer' description='Cellar Camel Sample Application - Producer' version='${project.version}' resolver='(obr)'>
+ <feature version="${project.version}">cellar</feature>
+ <feature version="${camel.version}">camel</feature>
+ <feature version="${camel.version}">camel-blueprint</feature>
+ <bundle>mvn:org.apache.camel/camel-hazelcast/${camel.version}</bundle>
+ <bundle>mvn:org.apache.karaf.cellar.samples.camel.hazelcast/producer/${project.version}</bundle>
+ </feature>
+
+ <feature name='cellar-sample-camel-consumer' description='Cellar Camel Sample Application - Consumer' version='${project.version}' resolver='(obr)'>
+ <feature version="${project.version}">cellar</feature>
+ <feature version="${camel.version}">camel</feature>
+ <feature version="${camel.version}">camel-blueprint</feature>
+ <bundle>mvn:org.apache.camel/camel-hazelcast/${camel.version}</bundle>
+ <bundle>mvn:org.apache.karaf.cellar.samples.camel.hazelcast/consumer/${project.version}</bundle>
+ </feature>
+
+</features>
\ No newline at end of file
Modified: karaf/cellar/branches/cellar-2.2.x/samples/pom.xml
URL: http://svn.apache.org/viewvc/karaf/cellar/branches/cellar-2.2.x/samples/pom.xml?rev=1232402&r1=1232401&r2=1232402&view=diff
==============================================================================
--- karaf/cellar/branches/cellar-2.2.x/samples/pom.xml (original)
+++ karaf/cellar/branches/cellar-2.2.x/samples/pom.xml Tue Jan 17 13:01:23 2012
@@ -36,6 +36,7 @@
<modules>
<module>dosgi-greeter</module>
<module>hazelcast-app</module>
+ <module>camel-hazelcast-app</module>
</modules>
</project>