This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new abe6c59a342 Regen for commit 701f09b8a15eb1c7c92881be86dc02ad640de86c abe6c59a342 is described below commit abe6c59a342deb0ae043c428812b03e58cb6e890 Author: ffang <ff...@users.noreply.github.com> AuthorDate: Thu Dec 8 17:59:09 2022 +0000 Regen for commit 701f09b8a15eb1c7c92881be86dc02ad640de86c Signed-off-by: GitHub <nore...@github.com> --- .../org/apache/camel/component/cxf/jaxws/CxfComponent.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfComponent.java b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfComponent.java index 009bafd8d61..eb9a9d7254c 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfComponent.java +++ b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfComponent.java @@ -43,7 +43,7 @@ public class CxfComponent extends HeaderFilterStrategyComponent implements SSLCo private Boolean allowStreaming; @Metadata(label = "security", defaultValue = "false") private boolean useGlobalSslContextParameters; - + private Map<String, BeanCacheEntry> beanCache = new HashMap<String, BeanCacheEntry>(); public CxfComponent() { @@ -112,14 +112,16 @@ public class CxfComponent extends HeaderFilterStrategyComponent implements SSLCo if (beanCache.containsKey(beanId)) { BeanCacheEntry entry = beanCache.get(beanId); if (entry.cxfEndpoint == result - && !entry.parameters.equals(parameters)) { + && !entry.parameters.equals(parameters)) { /*different URI refer to the same CxfEndpoint Bean instance but with different parameters. This can make stateful bean's behavior uncertainty. This can be addressed by using proper bean scope, such as "prototype" in Spring or "Session" in CDI */ - throw new RuntimeException("Different URI refer to the same CxfEndpoint Bean instance" - + " with ID : " + beanId + " but with different parameters. Please use the proper Bean scope "); + throw new RuntimeException( + "Different URI refer to the same CxfEndpoint Bean instance" + + " with ID : " + beanId + + " but with different parameters. Please use the proper Bean scope "); } } else { beanCache.put(beanId, new BeanCacheEntry(result, new HashMap<String, Object>(parameters))); @@ -159,11 +161,12 @@ public class CxfComponent extends HeaderFilterStrategyComponent implements SSLCo CxfEndpoint cxfEndpoint = (CxfEndpoint) endpoint; cxfEndpoint.updateEndpointUri(uri); } - + class BeanCacheEntry { //A snapshot of a CxfEndpoint Bean URI CxfEndpoint cxfEndpoint; Map<String, Object> parameters; + BeanCacheEntry(CxfEndpoint cxfEndpoint, Map<String, Object> parameters) { this.cxfEndpoint = cxfEndpoint; this.parameters = parameters;