[camel] branch exchange-factory updated: CAMEL-16222: PooledExchangeFactory experiment

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch exchange-factory updated: CAMEL-16222: PooledExchangeFactory experiment

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

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


The following commit(s) were added to refs/heads/exchange-factory by this push:
     new 7e52604  CAMEL-16222: PooledExchangeFactory experiment
7e52604 is described below

commit 7e52604ba3980effa811b0adfb8630c3eee0d8df
Author: Claus Ibsen <[hidden email]>
AuthorDate: Tue Feb 23 09:31:20 2021 +0100

    CAMEL-16222: PooledExchangeFactory experiment
---
 .../src/main/java/org/apache/camel/http/common/CamelServlet.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
index 67a2907..12d42f8 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
@@ -256,7 +256,8 @@ public class CamelServlet extends HttpServlet implements HttpRegistryProvider {
         }
 
         // create exchange and set data on it
-        Exchange exchange = consumer.getEndpoint().createExchange(ExchangePattern.InOut);
+        Exchange exchange = consumer.createExchange(false);
+        exchange.setPattern(ExchangePattern.InOut);
 
         if (consumer.getEndpoint().isBridgeEndpoint()) {
             exchange.setProperty(Exchange.SKIP_GZIP_ENCODING, Boolean.TRUE);
@@ -362,6 +363,7 @@ public class CamelServlet extends HttpServlet implements HttpRegistryProvider {
             }
         } finally {
             consumer.doneUoW(exchange);
+            consumer.releaseExchange(exchange, false);
         }
     }