You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/10/02 15:47:32 UTC

[camel] branch master created (now c702a5e)

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

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


      at c702a5e  Regen for commit b106a9c2755f36d44659767ad631ac0482d3f37b

This branch includes the following new commits:

     new b6d5a81  CAMEL-15607: camel-core - When resolving language then only resolve via registry once (#4348)
     new c702a5e  Regen for commit b106a9c2755f36d44659767ad631ac0482d3f37b

The 2 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.



[camel] 02/02: Regen for commit b106a9c2755f36d44659767ad631ac0482d3f37b

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

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

commit c702a5ef4bef0041b94dbaa648b1e838c265056a
Author: lburgazzoli <lb...@users.noreply.github.com>
AuthorDate: Fri Oct 2 15:19:01 2020 +0000

    Regen for commit b106a9c2755f36d44659767ad631ac0482d3f37b
    
    Signed-off-by: GitHub <no...@github.com>
---
 .../resources/org/apache/camel/catalog/schemas/camel-spring.xsd   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 727c1aa..b5974cb 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -12231,6 +12231,14 @@ Name of header to use as input, instead of the message body.
             ]]></xs:documentation>
           </xs:annotation>
         </xs:attribute>
+        <xs:attribute name="option" type="xs:string">
+          <xs:annotation>
+            <xs:documentation xml:lang="en"><![CDATA[
+To configure additional options on json path. Multiple values can be separated
+by comma.
+            ]]></xs:documentation>
+          </xs:annotation>
+        </xs:attribute>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>


[camel] 01/02: CAMEL-15607: camel-core - When resolving language then only resolve via registry once (#4348)

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

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

commit b6d5a81f437e07fd1d94bf93ba928cc877f00468
Author: Luca Burgazzoli <lb...@users.noreply.github.com>
AuthorDate: Fri Oct 2 17:11:27 2020 +0200

    CAMEL-15607: camel-core - When resolving language then only resolve via registry once (#4348)
---
 .../camel/impl/engine/AbstractCamelContext.java    | 73 +++++++++-------------
 1 file changed, 28 insertions(+), 45 deletions(-)

diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 93c92b5..3387765 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -1636,60 +1636,43 @@ public abstract class AbstractCamelContext extends BaseService
     }
 
     @Override
-    public Language resolveLanguage(String language) {
-        LOG.debug("Resolving language: {}", language);
-
-        Language answer;
-        synchronized (languages) {
-            // as first iteration, check if there is a language instance for the given name
-            // bound to the registry
-            answer = ResolverHelper.lookupLanguageInRegistryWithFallback(getCamelContextReference(), language);
-            if (answer != null) {
-                Language old = languages.put(language, answer);
-                // if the language has already been loaded, thus it is already registered
-                // in the local language cache, we can return it as it has already been
-                // initialized and configured
-                if (old == answer) {
-                    return answer;
-                }
-            } else {
-                answer = languages.get(language);
+    public Language resolveLanguage(String name) {
+        LOG.debug("Resolving language: {}", name);
 
-                // check if the language is singleton, if so return the shared
-                // instance
-                if (IsSingleton.test(answer)) {
-                    return answer;
-                } else {
-                    answer = null;
-                }
-            }
+        return languages.computeIfAbsent(name, new Function<String, Language>() {
+            @Override
+            public Language apply(String s) {
+                final CamelContext camelContext = getCamelContextReference();
 
-            if (answer == null) {
-                // language not known or not singleton, then use resolver
-                answer = getLanguageResolver().resolveLanguage(language, getCamelContextReference());
-            }
+                // as first iteration, check if there is a language instance for the given name
+                // bound to the registry
+                Language language = ResolverHelper.lookupLanguageInRegistryWithFallback(camelContext, name);
 
-            if (answer != null) {
-                // inject CamelContext if aware
-                CamelContextAware.trySetCamelContext(answer, getCamelContextReference());
+                if (language == null) {
+                    // language not known, then use resolver
+                    language = getLanguageResolver().resolveLanguage(name, camelContext);
+                }
 
-                if (answer instanceof Service) {
-                    try {
-                        startService((Service) answer);
-                    } catch (Exception e) {
-                        throw RuntimeCamelException.wrapRuntimeCamelException(e);
+                if (language != null) {
+                    if (language instanceof Service) {
+                        try {
+                            startService((Service) language);
+                        } catch (Exception e) {
+                            throw RuntimeCamelException.wrapRuntimeCamelException(e);
+                        }
                     }
-                }
 
-                for (LifecycleStrategy strategy : lifecycleStrategies) {
-                    strategy.onLanguageCreated(language, answer);
+                    // inject CamelContext if aware
+                    CamelContextAware.trySetCamelContext(language, camelContext);
+
+                    for (LifecycleStrategy strategy : lifecycleStrategies) {
+                        strategy.onLanguageCreated(name, language);
+                    }
                 }
 
-                languages.put(language, answer);
+                return language;
             }
-        }
-
-        return answer;
+        });
     }
 
     // Properties