You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2025/01/07 08:10:57 UTC

(camel-quarkus-examples) branch camel-quarkus-main updated: Use @ApplicationScoped instead of @SessionScoped as there is no session in Camel CXF Route (more details at https://github.com/apache/camel-quarkus/issues/6880)

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

jamesnetherton pushed a commit to branch camel-quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git


The following commit(s) were added to refs/heads/camel-quarkus-main by this push:
     new fc5bce2  Use @ApplicationScoped instead of @SessionScoped as there is no session in Camel CXF Route (more details at https://github.com/apache/camel-quarkus/issues/6880)
fc5bce2 is described below

commit fc5bce2edfd0455bcd4a9fcf5fdcfc21599b4347
Author: Lukas Lowinger <ll...@redhat.com>
AuthorDate: Mon Jan 6 16:56:57 2025 +0100

    Use @ApplicationScoped instead of @SessionScoped as there is no session in Camel CXF Route (more details at https://github.com/apache/camel-quarkus/issues/6880)
---
 cxf-soap/src/main/java/org/acme/cxf/soap/pojo/MyPojoRouteBuilder.java | 3 +--
 cxf-soap/src/main/java/org/acme/cxf/soap/wsdl/MyWsdlRouteBuilder.java | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/cxf-soap/src/main/java/org/acme/cxf/soap/pojo/MyPojoRouteBuilder.java b/cxf-soap/src/main/java/org/acme/cxf/soap/pojo/MyPojoRouteBuilder.java
index e015b63..37b26ac 100644
--- a/cxf-soap/src/main/java/org/acme/cxf/soap/pojo/MyPojoRouteBuilder.java
+++ b/cxf-soap/src/main/java/org/acme/cxf/soap/pojo/MyPojoRouteBuilder.java
@@ -17,7 +17,6 @@
 package org.acme.cxf.soap.pojo;
 
 import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.context.SessionScoped;
 import jakarta.enterprise.inject.Produces;
 import jakarta.inject.Named;
 import org.acme.cxf.soap.pojo.service.ContactService;
@@ -31,7 +30,7 @@ import org.apache.camel.component.cxf.jaxws.CxfEndpoint;
 public class MyPojoRouteBuilder extends RouteBuilder {
 
     @Produces
-    @SessionScoped
+    @ApplicationScoped
     @Named
     CxfEndpoint contact() {
         CxfEndpoint contactEndpoint = new CxfEndpoint();
diff --git a/cxf-soap/src/main/java/org/acme/cxf/soap/wsdl/MyWsdlRouteBuilder.java b/cxf-soap/src/main/java/org/acme/cxf/soap/wsdl/MyWsdlRouteBuilder.java
index 6843898..2a28ab4 100644
--- a/cxf-soap/src/main/java/org/acme/cxf/soap/wsdl/MyWsdlRouteBuilder.java
+++ b/cxf-soap/src/main/java/org/acme/cxf/soap/wsdl/MyWsdlRouteBuilder.java
@@ -24,7 +24,6 @@ import com.example.customerservice.CustomerService;
 import com.example.customerservice.NoSuchCustomer;
 import com.example.customerservice.NoSuchCustomerException;
 import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.context.SessionScoped;
 import jakarta.enterprise.inject.Produces;
 import jakarta.inject.Named;
 import org.acme.cxf.soap.wsdl.repository.CustomerRepository;
@@ -46,7 +45,7 @@ public class MyWsdlRouteBuilder extends RouteBuilder {
     }
 
     @Produces
-    @SessionScoped
+    @ApplicationScoped
     @Named
     CxfEndpoint customer() {
         CxfEndpoint customersEndpoint = new CxfEndpoint();