You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/08/06 05:09:10 UTC

[camel] branch master updated (92ef961 -> 19f4a11)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 92ef961  CAMEL-7444: MDC logging now supports setting a pattern to allow to propagte custom keys that matches the pattern.
     new 6a34f29  CAMEL-7550: Polished
     new f1d33ff  CAMEL-7550: camel-jpa producer now has findEntity option to find a single entity using enity manager find which should be faster and more optimized via jpa.
     new 19f4a11  Regen

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel-jpa/src/main/docs/jpa-component.adoc     |  3 +-
 .../apache/camel/component/jpa/JpaEndpoint.java    | 16 ++++++-
 .../apache/camel/component/jpa/JpaProducer.java    | 41 ++++++++++++++++-
 .../apache/camel/component/jpa/QueryFactory.java   |  3 +-
 ...endTest.java => JpaProducerFindEntityTest.java} | 52 ++++++++++++++--------
 .../endpoint/dsl/JpaEndpointBuilderFactory.java    | 26 +++++++++++
 .../modules/ROOT/pages/jpa-component.adoc          |  3 +-
 .../components/modules/ROOT/pages/spring-boot.adoc |  3 +-
 .../modules/ROOT/pages/test-blueprint.adoc         |  3 +-
 .../modules/ROOT/pages/aggregate-eip.adoc          | 11 +++--
 .../modules/ROOT/pages/serviceCall-eip.adoc        |  2 +-
 11 files changed, 132 insertions(+), 31 deletions(-)
 copy components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/{JpaFlushOnSendTest.java => JpaProducerFindEntityTest.java} (57%)


[camel] 02/03: CAMEL-7550: camel-jpa producer now has findEntity option to find a single entity using enity manager find which should be faster and more optimized via jpa.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f1d33ff95602498569274c913a7c6972d95a5b57
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 6 07:08:15 2019 +0200

    CAMEL-7550: camel-jpa producer now has findEntity option to find a single entity using enity manager find which should be faster and more optimized via jpa.
---
 .../camel-jpa/src/main/docs/jpa-component.adoc     |  3 +-
 .../apache/camel/component/jpa/JpaEndpoint.java    | 16 ++++-
 .../apache/camel/component/jpa/JpaProducer.java    | 41 ++++++++++-
 .../processor/jpa/JpaProducerFindEntityTest.java   | 82 ++++++++++++++++++++++
 .../endpoint/dsl/JpaEndpointBuilderFactory.java    | 26 +++++++
 .../modules/ROOT/pages/jpa-component.adoc          |  3 +-
 6 files changed, 166 insertions(+), 5 deletions(-)

diff --git a/components/camel-jpa/src/main/docs/jpa-component.adoc b/components/camel-jpa/src/main/docs/jpa-component.adoc
index 628535e..4613901 100644
--- a/components/camel-jpa/src/main/docs/jpa-component.adoc
+++ b/components/camel-jpa/src/main/docs/jpa-component.adoc
@@ -136,7 +136,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (44 parameters):
+=== Query Parameters (45 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -163,6 +163,7 @@ with the following path and query parameters:
 | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | *parameters* (consumer) | This key/value mapping is used for building the query parameters. It is expected to be of the generic type java.util.Map where the keys are the named parameters of a given JPA query and the values are their corresponding effective values you want to select for. When it's used for producer, Simple expression can be used as a parameter value. It allows you to retrieve parameter values from the message body, header and etc. |  | Map
 | *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. |  | PollingConsumerPoll Strategy
+| *findEntity* (producer) | If enabled then the producer will find a single entity by using the message body as key and entityType as the class type. This can be used instead of a query to find a single entity. | false | boolean
 | *flushOnSend* (producer) | Flushes the EntityManager after the entity bean has been persisted. | true | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *remove* (producer) | Indicates to use entityManager.remove(entity). | false | boolean
diff --git a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
index 5c6d6a5..70ef706 100644
--- a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
+++ b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
@@ -103,6 +103,8 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
     private boolean remove;
     @UriParam(label = "producer")
     private Boolean useExecuteUpdate;
+    @UriParam(label = "producer")
+    private boolean findEntity;
 
     @UriParam(label = "advanced", prefix = "emf.", multiValue = true)
     private Map<String, Object> entityManagerProperties;
@@ -132,6 +134,7 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         producer.setNativeQuery(getNativeQuery());
         producer.setParameters(getParameters());
         producer.setResultClass(getResultClass());
+        producer.setFindEntity(isFindEntity());
         producer.setUseExecuteUpdate(isUseExecuteUpdate());
         return producer;
     }
@@ -181,7 +184,6 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         return "jpa" + (entityType != null ? "://" + entityType.getName() : "");
     }
 
-
     // Properties
     // -------------------------------------------------------------------------
     public Expression getProducerExpression() {
@@ -510,6 +512,18 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
         this.useExecuteUpdate = useExecuteUpdate;
     }
 
+    public boolean isFindEntity() {
+        return findEntity;
+    }
+
+    /**
+     * If enabled then the producer will find a single entity by using the message body as key and entityType as the class type.
+     * This can be used instead of a query to find a single entity.
+     */
+    public void setFindEntity(boolean findEntity) {
+        this.findEntity = findEntity;
+    }
+
     // Implementation methods
     // -------------------------------------------------------------------------
 
diff --git a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java
index 77a5ac9..2db38da 100644
--- a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java
+++ b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaProducer.java
@@ -42,6 +42,7 @@ public class JpaProducer extends DefaultProducer {
     private String query;
     private String namedQuery;
     private String nativeQuery;
+    private boolean findEntity;
     private Map<String, Object> parameters;
     private Class<?> resultClass;
     private QueryFactory queryFactory;
@@ -111,7 +112,15 @@ public class JpaProducer extends DefaultProducer {
     public void setQuery(String query) {
         this.query = query;
     }
-    
+
+    public boolean isFindEntity() {
+        return findEntity;
+    }
+
+    public void setFindEntity(boolean findEntity) {
+        this.findEntity = findEntity;
+    }
+
     public Class<?> getResultClass() {
         return resultClass;
     }
@@ -151,7 +160,9 @@ public class JpaProducer extends DefaultProducer {
         final EntityManager entityManager = getTargetEntityManager(exchange, entityManagerFactory,
                 getEndpoint().isUsePassedInEntityManager(), getEndpoint().isSharedEntityManager(), true);
 
-        if (getQueryFactory() != null) {
+        if (findEntity) {
+            processFind(exchange, entityManager);
+        } else if (getQueryFactory() != null) {
             processQuery(exchange, entityManager);
         } else {
             processEntity(exchange, entityManager);
@@ -205,6 +216,32 @@ public class JpaProducer extends DefaultProducer {
         }
     }
 
+    protected void processFind(Exchange exchange, EntityManager entityManager) {
+        final Object key = exchange.getMessage().getBody();
+
+        if (key != null) {
+            transactionTemplate.execute(new TransactionCallback<Object>() {
+                public Object doInTransaction(TransactionStatus status) {
+                    if (getEndpoint().isJoinTransaction()) {
+                        entityManager.joinTransaction();
+                    }
+
+                    Object answer = entityManager.find(getEndpoint().getEntityType(), key);
+                    log.debug("Find: {} -> {}", key, answer);
+
+                    Message target = exchange.getPattern().isOutCapable() ? exchange.getOut() : exchange.getIn();
+                    target.setBody(answer);
+
+                    if (getEndpoint().isFlushOnSend()) {
+                        entityManager.flush();
+                    }
+
+                    return null;
+                }
+            });
+        }
+    }
+
     protected void processEntity(Exchange exchange, EntityManager entityManager) {
         final Object values = expression.evaluate(exchange, Object.class);
 
diff --git a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerFindEntityTest.java b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerFindEntityTest.java
new file mode 100644
index 0000000..62f661d
--- /dev/null
+++ b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerFindEntityTest.java
@@ -0,0 +1,82 @@
+/*
+ * 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.processor.jpa;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.examples.SendEmail;
+import org.apache.camel.spring.SpringRouteBuilder;
+import org.junit.Test;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.support.TransactionCallback;
+
+public class JpaProducerFindEntityTest extends AbstractJpaTest {
+    protected static final String SELECT_ALL_STRING = "select x from " + SendEmail.class.getName() + " x";
+
+    @Test
+    public void testFind() throws Exception {
+        SendEmail one = new SendEmail("foo");
+        SendEmail two = new SendEmail("bar");
+
+        save(one);
+        save(two);
+
+        long id = one.getId();
+        long id2 = two.getId();
+
+        getMockEndpoint("mock:result").expectedMessageCount(2);
+
+        SendEmail out = template.requestBody("direct:start", id, SendEmail.class);
+        SendEmail out2 = template.requestBody("direct:start", id2, SendEmail.class);
+
+        assertMockEndpointsSatisfied();
+
+        assertEquals(one.getAddress(), out.getAddress());
+        assertEquals(two.getAddress(), out2.getAddress());
+    }
+
+    protected void save(final Object persistable) {
+        transactionTemplate.execute(new TransactionCallback<Object>() {
+            public Object doInTransaction(TransactionStatus status) {
+                entityManager.joinTransaction();
+                entityManager.persist(persistable);
+                entityManager.flush();
+                return null;
+            }
+        });
+    }
+
+
+    @Override
+    protected RouteBuilder createRouteBuilder() {
+        return new SpringRouteBuilder() {
+            public void configure() {
+                from("direct:start").to("jpa://" + SendEmail.class.getName() + "?findEntity=true").to("mock:result");
+            }
+        };
+    }
+
+    @Override
+    protected String routeXml() {
+        return "org/apache/camel/processor/jpa/springJpaRouteTest.xml";
+    }
+
+    @Override
+    protected String selectAllString() {
+        return SELECT_ALL_STRING;
+    }
+
+}
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JpaEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JpaEndpointBuilderFactory.java
index a7d83b0..0bf468f 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JpaEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JpaEndpointBuilderFactory.java
@@ -1193,6 +1193,32 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
+         * If enabled then the producer will find a single entity by using the
+         * message body as key and entityType as the class type. This can be
+         * used instead of a query to find a single entity.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Group: producer
+         */
+        default JpaEndpointProducerBuilder findEntity(boolean findEntity) {
+            setProperty("findEntity", findEntity);
+            return this;
+        }
+        /**
+         * If enabled then the producer will find a single entity by using the
+         * message body as key and entityType as the class type. This can be
+         * used instead of a query to find a single entity.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Group: producer
+         */
+        default JpaEndpointProducerBuilder findEntity(String findEntity) {
+            setProperty("findEntity", findEntity);
+            return this;
+        }
+        /**
          * Flushes the EntityManager after the entity bean has been persisted.
          * 
          * The option is a: <code>boolean</code> type.
diff --git a/docs/components/modules/ROOT/pages/jpa-component.adoc b/docs/components/modules/ROOT/pages/jpa-component.adoc
index 628535e..3b7d3f5 100644
--- a/docs/components/modules/ROOT/pages/jpa-component.adoc
+++ b/docs/components/modules/ROOT/pages/jpa-component.adoc
@@ -136,7 +136,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (44 parameters):
+=== Query Parameters (45 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -163,6 +163,7 @@ with the following path and query parameters:
 | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | *parameters* (consumer) | This key/value mapping is used for building the query parameters. It is expected to be of the generic type java.util.Map where the keys are the named parameters of a given JPA query and the values are their corresponding effective values you want to select for. When it's used for producer, Simple expression can be used as a parameter value. It allows you to retrieve parameter values from the message body, header and etc. |  | Map
 | *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. |  | PollingConsumerPoll Strategy
+| *findEntity* (producer) | If enabled then the producer will find a single entity by using the message body as key and resultClass as the class type. This can be used instead of using query to find a single entity. | false | boolean
 | *flushOnSend* (producer) | Flushes the EntityManager after the entity bean has been persisted. | true | boolean
 | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...]
 | *remove* (producer) | Indicates to use entityManager.remove(entity). | false | boolean


[camel] 03/03: Regen

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 19f4a11f2333b7d36b72ee727628f265c490db9b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 6 07:08:40 2019 +0200

    Regen
---
 docs/components/modules/ROOT/pages/spring-boot.adoc      |  3 ++-
 docs/components/modules/ROOT/pages/test-blueprint.adoc   |  3 ++-
 docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc   | 11 +++++++----
 docs/user-manual/modules/ROOT/pages/serviceCall-eip.adoc |  2 +-
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/docs/components/modules/ROOT/pages/spring-boot.adoc b/docs/components/modules/ROOT/pages/spring-boot.adoc
index fa08bbd..ddbd8df 100644
--- a/docs/components/modules/ROOT/pages/spring-boot.adoc
+++ b/docs/components/modules/ROOT/pages/spring-boot.adoc
@@ -89,7 +89,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 126 options, which are listed below.
+The component supports 127 options, which are listed below.
 
 
 
@@ -164,6 +164,7 @@ The component supports 126 options, which are listed below.
 | *camel.springboot.log-exhausted-message-body* | Sets whether to log exhausted message body with message history. Default is false. | false | Boolean
 | *camel.springboot.log-mask* | Sets whether log mask is enabled or not. Default is false. | false | Boolean
 | *camel.springboot.main-run-controller* | Whether to use the main run controller to ensure the Spring-Boot application keeps running until being stopped or the JVM terminated. You typically only need this if you run Spring-Boot standalone. If you run Spring-Boot with spring-boot-starter-web then the web container keeps the JVM running. | false | Boolean
+| *camel.springboot.mdc-logging-keys-pattern* | Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message. Setting this pattern to * will propagate all custom keys. Or setting the pattern to foo*,bar* will propagate any keys starting with either foo or bar. Notice that a set of standard Camel MDC keys are always propagated which starts with camel. as key name. The match rule [...]
 | *camel.springboot.message-history* | Sets whether message history is enabled or not. Default is true. | true | Boolean
 | *camel.springboot.name* | Sets the name of the CamelContext. |  | String
 | *camel.springboot.producer-template-cache-size* | Producer template endpoints cache size. | 1000 | Integer
diff --git a/docs/components/modules/ROOT/pages/test-blueprint.adoc b/docs/components/modules/ROOT/pages/test-blueprint.adoc
index 8e5b1d0..b2a4b53 100644
--- a/docs/components/modules/ROOT/pages/test-blueprint.adoc
+++ b/docs/components/modules/ROOT/pages/test-blueprint.adoc
@@ -22,7 +22,8 @@ Also notice the use of *`getBlueprintDescriptor`* to specify the
 location of the OSGi Blueprint XML file. +
  If you have multiple OSGi Blueprint XML files, then you can specify
 them with a comma-separated list in the *`getBlueprintDescriptor`*
-method.
+method. Notice that only **one** `CamelContext` is supported per blueprint bundle,
+so if you have multiple XML files then only one of them should have `<camelContext>`.
 
 Here's the
 http://svn.apache.org/viewvc/camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/camelContext.xml?view=markup[Blueprint
diff --git a/docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc b/docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc
index ab15c75..365ed17 100644
--- a/docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc
+++ b/docs/user-manual/modules/ROOT/pages/aggregate-eip.adoc
@@ -17,15 +17,15 @@ single correlation key into a single message exchange.
 == Aggregator options
 
 // eip options: START
-The Aggregate EIP supports 24 options which are listed below:
+The Aggregate EIP supports 27 options which are listed below:
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | *correlationExpression* | *Required* The expression used to calculate the correlation key to use for aggregation. The Exchange which has the same correlation key is aggregated together. If the correlation key could not be evaluated an Exception is thrown. You can disable this by using the ignoreBadCorrelationKeys option. |  | NamespaceAware Expression
 | *completionPredicate* | A Predicate to indicate when an aggregated exchange is complete. If this is not specified and the AggregationStrategy object implements Predicate, the aggregationStrategy object will be used as the completionPredicate. |  | NamespaceAware Expression
-| *completionTimeout* | Time in millis that an aggregated exchange should be inactive before its complete (timeout). This option can be set as either a fixed value or using an Expression which allows you to evaluate a timeout dynamically - will use Long as result. If both are set Camel will fallback to use the fixed value if the Expression result was null or 0. You cannot use this option together with completionInterval, only one of the two can be used. By default the timeout checker run [...]
-| *completionSize* | Number of messages aggregated before the aggregation is complete. This option can be set as either a fixed value or using an Expression which allows you to evaluate a size dynamically - will use Integer as result. If both are set Camel will fallback to use the fixed value if the Expression result was null or 0. |  | Integer
+| *completionTimeoutExpression* | Time in millis that an aggregated exchange should be inactive before its complete (timeout). This option can be set as either a fixed value or using an Expression which allows you to evaluate a timeout dynamically - will use Long as result. If both are set Camel will fallback to use the fixed value if the Expression result was null or 0. You cannot use this option together with completionInterval, only one of the two can be used. By default the timeout c [...]
+| *completionSizeExpression* | Number of messages aggregated before the aggregation is complete. This option can be set as either a fixed value or using an Expression which allows you to evaluate a size dynamically - will use Integer as result. If both are set Camel will fallback to use the fixed value if the Expression result was null or 0. |  | NamespaceAware Expression
 | *optimisticLockRetryPolicy* | Allows to configure retry settings when using optimistic locking. |  | OptimisticLockRetry PolicyDefinition
 | *parallelProcessing* | When aggregated are completed they are being send out of the aggregator. This option indicates whether or not Camel should use a thread pool with multiple threads for concurrency. If no custom thread pool has been specified then Camel creates a default pool with 10 concurrent threads. | false | Boolean
 | *optimisticLocking* | Turns on using optimistic locking, which requires the aggregationRepository being used, is supporting this by implementing org.apache.camel.spi.OptimisticLockingAggregationRepository. | false | Boolean
@@ -35,14 +35,17 @@ The Aggregate EIP supports 24 options which are listed below:
 | *strategyRef* | A reference to lookup the AggregationStrategy in the Registry. Configuring an AggregationStrategy is required, and is used to merge the incoming Exchange with the existing already merged exchanges. At first call the oldExchange parameter is null. On subsequent invocations the oldExchange contains the merged exchanges and newExchange is of course the new incoming Exchange. |  | String
 | *strategyMethodName* | This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy. |  | String
 | *strategyMethodAllowNull* | If this option is false then the aggregate method is not used for the very first aggregation. If this option is true then null values is used as the oldExchange (at the very first aggregation), when using POJOs as the AggregationStrategy. | false | Boolean
+| *completionSize* | Number of messages aggregated before the aggregation is complete. This option can be set as either a fixed value or using an Expression which allows you to evaluate a size dynamically - will use Integer as result. If both are set Camel will fallback to use the fixed value if the Expression result was null or 0. |  | Integer
 | *completionInterval* | A repeating period in millis by which the aggregator will complete all current aggregated exchanges. Camel has a background task which is triggered every period. You cannot use this option together with completionTimeout, only one of them can be used. |  | Long
+| *completionTimeout* | Time in millis that an aggregated exchange should be inactive before its complete (timeout). This option can be set as either a fixed value or using an Expression which allows you to evaluate a timeout dynamically - will use Long as result. If both are set Camel will fallback to use the fixed value if the Expression result was null or 0. You cannot use this option together with completionInterval, only one of the two can be used. By default the timeout checker run [...]
 | *completionTimeoutChecker Interval* | Interval in millis that is used by the background task that checks for timeouts (org.apache.camel.TimeoutMap). By default the timeout checker runs every second. The timeout is an approximation and there is no guarantee that the a timeout is triggered exactly after the timeout value. It is not recommended to use very low timeout values or checker intervals. | 1000 | Long
-| *completionFromBatchConsumer* | Enables the batch completion mode where we aggregate from a org.apache.camel.BatchConsumer and aggregate the total number of exchanges the org.apache.camel.BatchConsumer has reported as total by checking the exchange property org.apache.camel.Exchange#BATCH_COMPLETE when its complete. | false | Boolean
+| *completionFromBatchConsumer* | Enables the batch completion mode where we aggregate from a org.apache.camel.BatchConsumer and aggregate the total number of exchanges the org.apache.camel.BatchConsumer has reported as total by checking the exchange property org.apache.camel.Exchange#BATCH_COMPLETE when its complete. This option cannot be used together with discardOnAggregationFailure. | false | Boolean
 | *completionOnNewCorrelation Group* | Enables completion on all previous groups when a new incoming correlation group. This can for example be used to complete groups with same correlation keys when they are in consecutive order. Notice when this is enabled then only 1 correlation group can be in progress as when a new correlation group starts, then the previous groups is forced completed. | false | Boolean
 | *eagerCheckCompletion* | Use eager completion checking which means that the completionPredicate will use the incoming Exchange. As opposed to without eager completion checking the completionPredicate will use the aggregated Exchange. | false | Boolean
 | *ignoreInvalidCorrelation Keys* | If a correlation key cannot be successfully evaluated it will be ignored by logging a DEBUG and then just ignore the incoming Exchange. | false | Boolean
 | *closeCorrelationKeyOn Completion* | Closes a correlation key when its complete. Any late received exchanges which has a correlation key that has been closed, it will be defined and a ClosedCorrelationKeyException is thrown. |  | Integer
 | *discardOnCompletionTimeout* | Discards the aggregated message on completion timeout. This means on timeout the aggregated message is dropped and not sent out of the aggregator. | false | Boolean
+| *discardOnAggregationFailure* | Discards the aggregated message when aggregation failed (an exception was thrown from AggregationStrategy. This means the partly aggregated message is dropped and not sent out of the aggregator. This option cannot be used together with completionFromBatchConsumer. | false | Boolean
 | *forceCompletionOnStop* | Indicates to complete all current aggregated exchanges when the context is stopped | false | Boolean
 | *completeAllOnStop* | Indicates to wait to complete all current and partial (pending) aggregated exchanges when the context is stopped. This also means that we will wait for all pending exchanges which are stored in the aggregation repository to complete so the repository is empty before we can stop. You may want to enable this when using the memory based aggregation repository that is memory based only, and do not store data on disk. When this option is enabled, then the aggregator is [...]
 | *aggregateControllerRef* | To use a org.apache.camel.processor.aggregate.AggregateController to allow external sources to control this aggregator. |  | String
diff --git a/docs/user-manual/modules/ROOT/pages/serviceCall-eip.adoc b/docs/user-manual/modules/ROOT/pages/serviceCall-eip.adoc
index 6db6a1a..221d775 100644
--- a/docs/user-manual/modules/ROOT/pages/serviceCall-eip.adoc
+++ b/docs/user-manual/modules/ROOT/pages/serviceCall-eip.adoc
@@ -100,7 +100,7 @@ The Service Call EIP supports 14 options which are listed below:
 | Name | Description | Default | Type
 | *name* | *Required* Sets the name of the service to use |  | String
 | *uri* | The uri of the endpoint to send to. The uri can be dynamic computed using the org.apache.camel.language.simple.SimpleLanguage expression. |  | String
-| *component* | The component to use. | http4 | String
+| *component* | The component to use. | http | String
 | *pattern* | Sets the optional ExchangePattern used to invoke this endpoint |  | ExchangePattern
 | *configurationRef* | Refers to a ServiceCall configuration to use |  | String
 | *serviceDiscoveryRef* | Sets a reference to a custom ServiceDiscovery to use. |  | String


[camel] 01/03: CAMEL-7550: Polished

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6a34f2948af6578a302e68ce957f0502a6bc9335
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Aug 5 18:27:23 2019 +0200

    CAMEL-7550: Polished
---
 .../src/main/java/org/apache/camel/component/jpa/QueryFactory.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/QueryFactory.java b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/QueryFactory.java
index 2de19ca..1dbf2c7 100644
--- a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/QueryFactory.java
+++ b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/QueryFactory.java
@@ -23,10 +23,11 @@ import javax.persistence.Query;
  * A Strategy to create a query to search for objects in a database
  */
 public interface QueryFactory {
+
     /**
      * Creates a new query to find objects to be processed
      *
-     * @param entityManager
+     * @param entityManager the enity manager
      * @return the query configured with any parameters etc
      */
     Query createQuery(EntityManager entityManager);