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

davsclaus 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 b35d2a77f3f CAMEL-21628: Make AggregateProcessor set the CamelContext 
on its AggregationRepository (#16840)
b35d2a77f3f is described below

commit b35d2a77f3fa276c0e31eb99a39513b1c26e1c14
Author: James Netherton <[email protected]>
AuthorDate: Thu Jan 16 18:10:08 2025 +0000

    CAMEL-21628: Make AggregateProcessor set the CamelContext on its 
AggregationRepository (#16840)
---
 .../infinispan/remote/InfinispanRemoteAggregationRepositoryIT.java    | 4 ++++
 .../java/org/apache/camel/processor/aggregate/AggregateProcessor.java | 1 +
 2 files changed, 5 insertions(+)

diff --git 
a/components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteAggregationRepositoryIT.java
 
b/components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteAggregationRepositoryIT.java
index b35abb10068..e611ae5f18c 100644
--- 
a/components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteAggregationRepositoryIT.java
+++ 
b/components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteAggregationRepositoryIT.java
@@ -20,6 +20,8 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.jupiter.api.Test;
 
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
 public class InfinispanRemoteAggregationRepositoryIT extends 
InfinispanRemoteTestSupport {
     public static final int COMPLETION_SIZE = 4;
     public static final String CORRELATOR_HEADER = "CORRELATOR_HEADER";
@@ -54,6 +56,8 @@ public class InfinispanRemoteAggregationRepositoryIT extends 
InfinispanRemoteTes
             }
         });
 
+        assertNotNull(repo.getCamelContext());
+
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(2);
         mock.expectedBodiesReceived(1 + 3 + 4 + 5, 6 + 7 + 20 + 21);
diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
index c2f0ebcc45f..7ea0c785188 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
@@ -1510,6 +1510,7 @@ public class AggregateProcessor extends 
AsyncProcessorSupport
 
     @Override
     protected void doStart() throws Exception {
+        CamelContextAware.trySetCamelContext(aggregationRepository, 
camelContext);
         CamelContextAware.trySetCamelContext(aggregationStrategy, 
camelContext);
         if (aggregationStrategy.canPreComplete()) {
             preCompletion = true;

Reply via email to