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/07/31 09:07:58 UTC

[camel] branch master updated: CAMEL-8388: Polished

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


The following commit(s) were added to refs/heads/master by this push:
     new 86e670a  CAMEL-8388: Polished
86e670a is described below

commit 86e670a2603d2d41cb31201d75123c46ddf254c4
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jul 31 11:07:15 2019 +0200

    CAMEL-8388: Polished
---
 .../camel-jpa/src/main/docs/jpa-component.adoc     |   6 +-
 .../apache/camel/component/jpa/JpaEndpoint.java    |   7 +-
 .../endpoint/dsl/JpaEndpointBuilderFactory.java    | 379 +++++++++------------
 3 files changed, 158 insertions(+), 234 deletions(-)

diff --git a/components/camel-jpa/src/main/docs/jpa-component.adoc b/components/camel-jpa/src/main/docs/jpa-component.adoc
index a4c43fb..628535e 100644
--- a/components/camel-jpa/src/main/docs/jpa-component.adoc
+++ b/components/camel-jpa/src/main/docs/jpa-component.adoc
@@ -146,11 +146,9 @@ with the following path and query parameters:
 | *maximumResults* (common) | Set the maximum number of results to retrieve on the Query. | -1 | int
 | *namedQuery* (common) | To use a named query. |  | String
 | *nativeQuery* (common) | To use a custom native query. You may want to use the option resultClass also when using native queries. |  | String
-| *parameters* (common) | 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
 | *persistenceUnit* (common) | *Required* The JPA persistence unit used by default. | camel | String
 | *query* (common) | To use a custom query. |  | String
 | *resultClass* (common) | Defines the type of the returned payload (we will call entityManager.createNativeQuery(nativeQuery, resultClass) instead of entityManager.createNativeQuery(nativeQuery)). Without this option, we will return an object array. Only has an affect when using in conjunction with native query when consuming data. |  | Class
-| *sharedEntityManager* (common) | Whether to use Spring's SharedEntityManager for the consumer/producer. Note in most cases joinTransaction should be set to false as this is not an EXTENDED EntityManager. | false | boolean
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
 | *consumeDelete* (consumer) | If true, the entity is deleted after it is consumed; if false, the entity is not deleted. | true | boolean
 | *consumeLockEntity* (consumer) | Specifies whether or not to set an exclusive lock on each entity bean while processing the results from polling. | true | boolean
@@ -163,15 +161,17 @@ with the following path and query parameters:
 | *transacted* (consumer) | Whether to run the consumer in transacted mode, by which all messages will either commit or rollback, when the entire batch has been processed. The default behavior (false) is to commit all the previously successfully processed messages, and only rollback the last failed message. | false | boolean
 | *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | *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
 | *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
 | *useExecuteUpdate* (producer) | To configure whether to use executeUpdate() when producer executes a query. When you use INSERT, UPDATE or DELETE statement as a named query, you need to specify this option to 'true'. |  | Boolean
-| *usePassedInEntityManager* (producer) | If set to true, then Camel will use the EntityManager from the header JpaConstants.ENTITY_MANAGER instead of the configured entity manager on the component/endpoint. This allows end users to control which entity manager will be in use. | false | boolean
 | *usePersist* (producer) | Indicates to use entityManager.persist(entity) instead of entityManager.merge(entity). Note: entityManager.persist(entity) doesn't work for detached entities (where the EntityManager has to execute an UPDATE instead of an INSERT query)! | false | boolean
+| *usePassedInEntityManager* (producer) | If set to true, then Camel will use the EntityManager from the header JpaConstants.ENTITY_MANAGER instead of the configured entity manager on the component/endpoint. This allows end users to control which entity manager will be in use. | false | boolean
 | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean
 | *entityManagerProperties* (advanced) | Additional properties for the entity manager to use. |  | Map
+| *sharedEntityManager* (advanced) | Whether to use Spring's SharedEntityManager for the consumer/producer. Note in most cases joinTransaction should be set to false as this is not an EXTENDED EntityManager. | false | boolean
 | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | *backoffErrorThreshold* (scheduler) | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. |  | int
 | *backoffIdleThreshold* (scheduler) | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. |  | int
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 39d1b22..b126f62 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
@@ -61,7 +61,7 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
     private String persistenceUnit = "camel";
     @UriParam(defaultValue = "true")
     private boolean joinTransaction = true;
-    @UriParam
+    @UriParam(label = "advanced")
     private boolean sharedEntityManager;
     @UriParam(defaultValue = "-1")
     private int maximumResults = -1;
@@ -80,7 +80,7 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
     private String nativeQuery;
     @UriParam(label = "consumer", optionalPrefix = "consumer.", defaultValue = "PESSIMISTIC_WRITE")
     private LockModeType lockModeType = LockModeType.PESSIMISTIC_WRITE;
-    @UriParam(optionalPrefix = "consumer.", multiValue = true)
+    @UriParam(label = "consumer,advanced", optionalPrefix = "consumer.", multiValue = true)
     private Map<String, Object> parameters;
     @UriParam(optionalPrefix = "consumer.")
     private Class<?> resultClass;
@@ -97,7 +97,7 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
     private boolean flushOnSend = true;
     @UriParam(label = "producer")
     private boolean usePersist;
-    @UriParam(label = "producer")
+    @UriParam(label = "producer,advanced")
     private boolean usePassedInEntityManager;
     @UriParam(label = "producer")
     private boolean remove;
@@ -107,7 +107,6 @@ public class JpaEndpoint extends ScheduledPollEndpoint {
     @UriParam(label = "advanced", prefix = "emf.", multiValue = true)
     private Map<String, Object> entityManagerProperties;
 
-
     public JpaEndpoint() {
     }
 
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 cc66acb..a7d83b0 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
@@ -126,44 +126,6 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
-         * 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.
-         * 
-         * The option is a: <code>java.util.Map&lt;java.lang.String,
-         * java.lang.Object&gt;</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointConsumerBuilder parameters(
-                Map<String, Object> parameters) {
-            setProperty("parameters", parameters);
-            return this;
-        }
-        /**
-         * 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.
-         * 
-         * The option will be converted to a
-         * <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code>
-         * type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointConsumerBuilder parameters(String parameters) {
-            setProperty("parameters", parameters);
-            return this;
-        }
-        /**
          * The JPA persistence unit used by default.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -220,34 +182,6 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
-         * Whether to use Spring's SharedEntityManager for the
-         * consumer/producer. Note in most cases joinTransaction should be set
-         * to false as this is not an EXTENDED EntityManager.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointConsumerBuilder sharedEntityManager(
-                boolean sharedEntityManager) {
-            setProperty("sharedEntityManager", sharedEntityManager);
-            return this;
-        }
-        /**
-         * Whether to use Spring's SharedEntityManager for the
-         * consumer/producer. Note in most cases joinTransaction should be set
-         * to false as this is not an EXTENDED EntityManager.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointConsumerBuilder sharedEntityManager(
-                String sharedEntityManager) {
-            setProperty("sharedEntityManager", sharedEntityManager);
-            return this;
-        }
-        /**
          * Allows for bridging the consumer to the Camel routing Error Handler,
          * which mean any exceptions occurred while the consumer is trying to
          * pickup incoming messages, or the likes, will now be processed as a
@@ -938,6 +872,44 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
+         * 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.
+         * 
+         * The option is a: <code>java.util.Map&lt;java.lang.String,
+         * java.lang.Object&gt;</code> type.
+         * 
+         * Group: consumer (advanced)
+         */
+        default AdvancedJpaEndpointConsumerBuilder parameters(
+                Map<String, Object> parameters) {
+            setProperty("parameters", parameters);
+            return this;
+        }
+        /**
+         * 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.
+         * 
+         * The option will be converted to a
+         * <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code>
+         * type.
+         * 
+         * Group: consumer (advanced)
+         */
+        default AdvancedJpaEndpointConsumerBuilder parameters(String parameters) {
+            setProperty("parameters", parameters);
+            return this;
+        }
+        /**
          * 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
@@ -1023,6 +995,34 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
+         * Whether to use Spring's SharedEntityManager for the
+         * consumer/producer. Note in most cases joinTransaction should be set
+         * to false as this is not an EXTENDED EntityManager.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedJpaEndpointConsumerBuilder sharedEntityManager(
+                boolean sharedEntityManager) {
+            setProperty("sharedEntityManager", sharedEntityManager);
+            return this;
+        }
+        /**
+         * Whether to use Spring's SharedEntityManager for the
+         * consumer/producer. Note in most cases joinTransaction should be set
+         * to false as this is not an EXTENDED EntityManager.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedJpaEndpointConsumerBuilder sharedEntityManager(
+                String sharedEntityManager) {
+            setProperty("sharedEntityManager", sharedEntityManager);
+            return this;
+        }
+        /**
          * Sets whether synchronous processing should be strictly used, or Camel
          * is allowed to use asynchronous processing (if supported).
          * 
@@ -1137,44 +1137,6 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
-         * 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.
-         * 
-         * The option is a: <code>java.util.Map&lt;java.lang.String,
-         * java.lang.Object&gt;</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointProducerBuilder parameters(
-                Map<String, Object> parameters) {
-            setProperty("parameters", parameters);
-            return this;
-        }
-        /**
-         * 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.
-         * 
-         * The option will be converted to a
-         * <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code>
-         * type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointProducerBuilder parameters(String parameters) {
-            setProperty("parameters", parameters);
-            return this;
-        }
-        /**
          * The JPA persistence unit used by default.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -1231,34 +1193,6 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
-         * Whether to use Spring's SharedEntityManager for the
-         * consumer/producer. Note in most cases joinTransaction should be set
-         * to false as this is not an EXTENDED EntityManager.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointProducerBuilder sharedEntityManager(
-                boolean sharedEntityManager) {
-            setProperty("sharedEntityManager", sharedEntityManager);
-            return this;
-        }
-        /**
-         * Whether to use Spring's SharedEntityManager for the
-         * consumer/producer. Note in most cases joinTransaction should be set
-         * to false as this is not an EXTENDED EntityManager.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointProducerBuilder sharedEntityManager(
-                String sharedEntityManager) {
-            setProperty("sharedEntityManager", sharedEntityManager);
-            return this;
-        }
-        /**
          * Flushes the EntityManager after the entity bean has been persisted.
          * 
          * The option is a: <code>boolean</code> type.
@@ -1372,36 +1306,6 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
-         * If set to true, then Camel will use the EntityManager from the header
-         * JpaConstants.ENTITY_MANAGER instead of the configured entity manager
-         * on the component/endpoint. This allows end users to control which
-         * entity manager will be in use.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: producer
-         */
-        default JpaEndpointProducerBuilder usePassedInEntityManager(
-                boolean usePassedInEntityManager) {
-            setProperty("usePassedInEntityManager", usePassedInEntityManager);
-            return this;
-        }
-        /**
-         * If set to true, then Camel will use the EntityManager from the header
-         * JpaConstants.ENTITY_MANAGER instead of the configured entity manager
-         * on the component/endpoint. This allows end users to control which
-         * entity manager will be in use.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: producer
-         */
-        default JpaEndpointProducerBuilder usePassedInEntityManager(
-                String usePassedInEntityManager) {
-            setProperty("usePassedInEntityManager", usePassedInEntityManager);
-            return this;
-        }
-        /**
          * Indicates to use entityManager.persist(entity) instead of
          * entityManager.merge(entity). Note: entityManager.persist(entity)
          * doesn't work for detached entities (where the EntityManager has to
@@ -1441,6 +1345,36 @@ public interface JpaEndpointBuilderFactory {
             return (JpaEndpointProducerBuilder) this;
         }
         /**
+         * If set to true, then Camel will use the EntityManager from the header
+         * JpaConstants.ENTITY_MANAGER instead of the configured entity manager
+         * on the component/endpoint. This allows end users to control which
+         * entity manager will be in use.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Group: producer (advanced)
+         */
+        default AdvancedJpaEndpointProducerBuilder usePassedInEntityManager(
+                boolean usePassedInEntityManager) {
+            setProperty("usePassedInEntityManager", usePassedInEntityManager);
+            return this;
+        }
+        /**
+         * If set to true, then Camel will use the EntityManager from the header
+         * JpaConstants.ENTITY_MANAGER instead of the configured entity manager
+         * on the component/endpoint. This allows end users to control which
+         * entity manager will be in use.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Group: producer (advanced)
+         */
+        default AdvancedJpaEndpointProducerBuilder usePassedInEntityManager(
+                String usePassedInEntityManager) {
+            setProperty("usePassedInEntityManager", usePassedInEntityManager);
+            return this;
+        }
+        /**
          * Whether the endpoint should use basic property binding (Camel 2.x) or
          * the newer property binding with additional capabilities.
          * 
@@ -1494,6 +1428,34 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
+         * Whether to use Spring's SharedEntityManager for the
+         * consumer/producer. Note in most cases joinTransaction should be set
+         * to false as this is not an EXTENDED EntityManager.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedJpaEndpointProducerBuilder sharedEntityManager(
+                boolean sharedEntityManager) {
+            setProperty("sharedEntityManager", sharedEntityManager);
+            return this;
+        }
+        /**
+         * Whether to use Spring's SharedEntityManager for the
+         * consumer/producer. Note in most cases joinTransaction should be set
+         * to false as this is not an EXTENDED EntityManager.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedJpaEndpointProducerBuilder sharedEntityManager(
+                String sharedEntityManager) {
+            setProperty("sharedEntityManager", sharedEntityManager);
+            return this;
+        }
+        /**
          * Sets whether synchronous processing should be strictly used, or Camel
          * is allowed to use asynchronous processing (if supported).
          * 
@@ -1606,43 +1568,6 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
-         * 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.
-         * 
-         * The option is a: <code>java.util.Map&lt;java.lang.String,
-         * java.lang.Object&gt;</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointBuilder parameters(Map<String, Object> parameters) {
-            setProperty("parameters", parameters);
-            return this;
-        }
-        /**
-         * 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.
-         * 
-         * The option will be converted to a
-         * <code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</code>
-         * type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointBuilder parameters(String parameters) {
-            setProperty("parameters", parameters);
-            return this;
-        }
-        /**
          * The JPA persistence unit used by default.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -1697,34 +1622,6 @@ public interface JpaEndpointBuilderFactory {
             setProperty("resultClass", resultClass);
             return this;
         }
-        /**
-         * Whether to use Spring's SharedEntityManager for the
-         * consumer/producer. Note in most cases joinTransaction should be set
-         * to false as this is not an EXTENDED EntityManager.
-         * 
-         * The option is a: <code>boolean</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointBuilder sharedEntityManager(
-                boolean sharedEntityManager) {
-            setProperty("sharedEntityManager", sharedEntityManager);
-            return this;
-        }
-        /**
-         * Whether to use Spring's SharedEntityManager for the
-         * consumer/producer. Note in most cases joinTransaction should be set
-         * to false as this is not an EXTENDED EntityManager.
-         * 
-         * The option will be converted to a <code>boolean</code> type.
-         * 
-         * Group: common
-         */
-        default JpaEndpointBuilder sharedEntityManager(
-                String sharedEntityManager) {
-            setProperty("sharedEntityManager", sharedEntityManager);
-            return this;
-        }
     }
 
     /**
@@ -1790,6 +1687,34 @@ public interface JpaEndpointBuilderFactory {
             return this;
         }
         /**
+         * Whether to use Spring's SharedEntityManager for the
+         * consumer/producer. Note in most cases joinTransaction should be set
+         * to false as this is not an EXTENDED EntityManager.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedJpaEndpointBuilder sharedEntityManager(
+                boolean sharedEntityManager) {
+            setProperty("sharedEntityManager", sharedEntityManager);
+            return this;
+        }
+        /**
+         * Whether to use Spring's SharedEntityManager for the
+         * consumer/producer. Note in most cases joinTransaction should be set
+         * to false as this is not an EXTENDED EntityManager.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Group: advanced
+         */
+        default AdvancedJpaEndpointBuilder sharedEntityManager(
+                String sharedEntityManager) {
+            setProperty("sharedEntityManager", sharedEntityManager);
+            return this;
+        }
+        /**
          * Sets whether synchronous processing should be strictly used, or Camel
          * is allowed to use asynchronous processing (if supported).
          *