This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch camel-3.18.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.18.x by this push: new 7aa21983e6d [CAMEL-18965]Camel-CXF: OnCompletion not working in case of Fault 7aa21983e6d is described below commit 7aa21983e6d9351a3384a4ca48cb2e603a733253 Author: Freeman Fang <freeman.f...@gmail.com> AuthorDate: Wed Jun 7 17:13:53 2023 -0400 [CAMEL-18965]Camel-CXF: OnCompletion not working in case of Fault (cherry picked from commit 57b3c9c9d965a166107e8745c75a256aa2c83cf7) (cherry picked from commit 40e65484e971ccc3ab46eb1cecbccf6c343f1c96) --- .../main/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumer.java | 2 ++ .../main/java/org/apache/camel/component/cxf/jaxws/CxfConsumer.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumer.java b/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumer.java index 19a5aba385c..2f209360be5 100644 --- a/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumer.java +++ b/components/camel-cxf/camel-cxf-rest/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumer.java @@ -56,6 +56,8 @@ public class CxfRsConsumer extends DefaultConsumer implements Suspendable { svrBean.getInInterceptors().add(new UnitOfWorkCloserInterceptor(Phase.POST_INVOKE, true)); // close the UnitOfWork normally svrBean.getOutInterceptors().add(new UnitOfWorkCloserInterceptor()); + // close the UnitOfWork in case of Fault + svrBean.getOutFaultInterceptors().add(new UnitOfWorkCloserInterceptor()); Server server = svrBean.create(); diff --git a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfConsumer.java b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfConsumer.java index d8cf741d1dc..e97cce45d45 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfConsumer.java +++ b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfConsumer.java @@ -91,7 +91,8 @@ public class CxfConsumer extends DefaultConsumer implements Suspendable { server.getEndpoint().getInInterceptors().add(new UnitOfWorkCloserInterceptor(Phase.POST_INVOKE, true)); // close the UnitOfWork normally server.getEndpoint().getOutInterceptors().add(new UnitOfWorkCloserInterceptor()); - + // close the UnitOfWork in case of Fault + server.getEndpoint().getOutFaultInterceptors().add(new UnitOfWorkCloserInterceptor()); return server; }