Permalink
Browse files

camel 2.10

  • Loading branch information...
1 parent c9a3e55 commit f1226c0b5fe089bd535c7428086da1e1c8e6417d @szhem committed Aug 6, 2012
View
13 component/src/main/java/org/apache/camel/osgi/service/OsgiMulticastEndpoint.java
@@ -31,6 +31,7 @@
private AggregationStrategy aggregationStrategy;
private boolean parallelProcessing;
private ExecutorService executorService;
+ private boolean shutdownExecutorService;
private boolean streaming;
private boolean stopOnException;
private long timeout;
@@ -50,8 +51,8 @@ public Consumer createConsumer(Processor processor) throws Exception {
@Override
public Producer createProducer() throws Exception {
return new OsgiMulticastProducer(
- this, getProps(), getAggregationStrategy(), isParallelProcessing(), getExecutorService(), isStreaming(),
- isStopOnException(), getTimeout(), getOnPrepare());
+ this, getProps(), getAggregationStrategy(), isParallelProcessing(), getExecutorService(),
+ isShutdownExecutorService(), isStreaming(), isStopOnException(), getTimeout(), getOnPrepare());
}
public AggregationStrategy getAggregationStrategy() {
@@ -78,6 +79,14 @@ public void setExecutorService(ExecutorService executorService) {
this.executorService = executorService;
}
+ public boolean isShutdownExecutorService() {
+ return shutdownExecutorService;
+ }
+
+ public void setShutdownExecutorService(boolean shutdownExecutorService) {
+ this.shutdownExecutorService = shutdownExecutorService;
+ }
+
public boolean isStreaming() {
return streaming;
}
View
8 component/src/main/java/org/apache/camel/osgi/service/OsgiMulticastProducer.java
@@ -32,6 +32,7 @@
private final AggregationStrategy aggregationStrategy;
private final boolean parallelProcessing;
private final ExecutorService executorService;
+ private final boolean shutdownExecutorService;
private final boolean streaming;
private final boolean stopOnException;
private final long timeout;
@@ -41,11 +42,13 @@
public OsgiMulticastProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> props,
AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService,
- boolean streaming, boolean stopOnException, long timeout, Processor onPrepare) {
+ boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout,
+ Processor onPrepare) {
super(endpoint, props);
this.aggregationStrategy = aggregationStrategy;
this.parallelProcessing = parallelProcessing;
+ this.shutdownExecutorService = shutdownExecutorService;
this.streaming = streaming;
this.stopOnException = stopOnException;
this.timeout = timeout;
@@ -63,7 +66,8 @@ public OsgiMulticastProducer(OsgiDefaultEndpoint endpoint, Map<String, Object> p
@Override
protected Processor createProcessor() {
return new MulticastProcessor(getEndpoint().getCamelContext(), services, aggregationStrategy,
- parallelProcessing, executorService, streaming, stopOnException, timeout, onPrepare, false);
+ parallelProcessing, executorService, shutdownExecutorService, streaming, stopOnException,
+ timeout, onPrepare, false);
}
@Override
View
10 component/src/test/java/org/apache/camel/osgi/service/OsgiMulticastProducerTest.java
@@ -43,7 +43,7 @@ public void testCreate() throws Exception {
when(endpoint.getCamelContext()).thenReturn(camelContext);
OsgiMulticastProducer producer = new OsgiMulticastProducer(
- endpoint, Collections.<String, Object>emptyMap(), null, false, null, false, false, 1, null);
+ endpoint, Collections.<String, Object>emptyMap(), null, false, null, false, false, false, 1, null);
assertThat(producer.getAggregationStrategy(), nullValue());
assertThat(producer.isParallelProcessing(), equalTo(false));
@@ -64,7 +64,7 @@ public void testCreateParallelProcessing() throws Exception {
ExecutorService executor = mock(ExecutorService.class);
OsgiMulticastProducer producer = new OsgiMulticastProducer(
- endpoint, Collections.<String, Object>emptyMap(), null, true, executor, false, false, 1, null);
+ endpoint, Collections.<String, Object>emptyMap(), null, true, executor, false, false, false, 1, null);
assertThat(producer.getAggregationStrategy(), nullValue());
assertThat(producer.isParallelProcessing(), equalTo(true));
@@ -89,7 +89,7 @@ public void testCreateParallelProcessingNoExecutorService() throws Exception {
when(endpoint.getCamelContext()).thenReturn(camelContext);
OsgiMulticastProducer producer = new OsgiMulticastProducer(
- endpoint, Collections.<String, Object>emptyMap(), null, true, null, false, false, 1, null);
+ endpoint, Collections.<String, Object>emptyMap(), null, true, null, false, false, false, 1, null);
assertThat(producer.getAggregationStrategy(), nullValue());
assertThat(producer.isParallelProcessing(), equalTo(true));
@@ -114,7 +114,7 @@ public void testCreateProcessor() throws Exception {
when(endpoint.getCamelContext()).thenReturn(camelContext);
OsgiMulticastProducer producer = new OsgiMulticastProducer(
- endpoint, Collections.<String, Object>emptyMap(), null, true, null, true, true, 1, null);
+ endpoint, Collections.<String, Object>emptyMap(), null, true, null, false, true, true, 1, null);
MulticastProcessor processor = (MulticastProcessor) producer.createProcessor();
assertThat(processor.getAggregationStrategy(), nullValue());
@@ -138,7 +138,7 @@ public void testDoShutdown() throws Exception {
when(executorManager.newDefaultThreadPool(anyObject(), anyString())).thenReturn(executor);
OsgiMulticastProducer producer = new OsgiMulticastProducer(
- endpoint, Collections.<String, Object>emptyMap(), null, true, null, false, false, 0, null);
+ endpoint, Collections.<String, Object>emptyMap(), null, true, null, false, false, false, 0, null);
producer.doShutdown();
View
25 pom.xml
@@ -35,17 +35,19 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <camel.version>2.9.2</camel.version>
- <cxf.version>2.5.2</cxf.version>
- <jclouds-karaf.version>1.3.1</jclouds-karaf.version>
+ <camel.version>2.10.0</camel.version>
+ <cxf.version>2.6.1</cxf.version>
+ <jansi.version>1.9</jansi.version>
+ <jclouds-karaf.version>1.4.0</jclouds-karaf.version>
+ <jline.version>2.7</jline.version>
<junit.version>4.10</junit.version>
- <karaf.version>2.2.7</karaf.version>
- <mockito.version>1.9.0</mockito.version>
+ <karaf.version>2.2.8</karaf.version>
+ <mockito.version>1.9.5-rc1</mockito.version>
<osgi.core.version>4.2.0</osgi.core.version>
<paxexam-junit4.version>2.3.1</paxexam-junit4.version>
<paxexam-karaf.version>0.5.3</paxexam-karaf.version>
<pojosr.version>0.1.8</pojosr.version>
- <slf4j.version>1.6.1</slf4j.version>
+ <slf4j.version>1.6.4</slf4j.version>
<tinybundles.version>1.0.0</tinybundles.version>
</properties>
@@ -128,6 +130,17 @@
<artifactId>paxexam-karaf-container</artifactId>
<version>${paxexam-karaf.version}</version>
</dependency>
+ <!-- camel karaf commands requirement -->
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>${jline.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.fusesource.jansi</groupId>
+ <artifactId>jansi</artifactId>
+ <version>${jansi.version}</version>
+ </dependency>
<!-- Feature Repos -->
<dependency>
View
11 tests/pom.xml
@@ -100,6 +100,17 @@
<artifactId>tinybundles</artifactId>
<scope>test</scope>
</dependency>
+ <!-- camel karaf commands requirement -->
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.fusesource.jansi</groupId>
+ <artifactId>jansi</artifactId>
+ <scope>test</scope>
+ </dependency>
<!-- Feature Repos -->
<dependency>
View
3 tests/src/test/java/org/apache/camel/osgi/service/itest/OsgiIntegrationTest.java
@@ -175,6 +175,9 @@ public Option defaultOptions() {
"org.ops4j.pax.url.mvn.repositories",
System.getProperty("project.features.repo.path", "target/features-repo")),
+ mavenBundle("jline", "jline").versionAsInProject(),
+ mavenBundle("org.fusesource.jansi", "jansi").versionAsInProject(),
+
scanFeatures(
maven("org.apache.karaf.assemblies.features", "standard")
.versionAsInProject()

0 comments on commit f1226c0

Please sign in to comment.