This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new a90f8e7ab3 [#6888] Use @ApplicationScoped instead of @SessionScoped
a90f8e7ab3 is described below
commit a90f8e7ab3cd1bd71609363dd42238f0d728465a
Author: Lukas Lowinger <[email protected]>
AuthorDate: Mon Jan 6 17:55:58 2025 +0100
[#6888] Use @ApplicationScoped instead of @SessionScoped
---
.../ROOT/pages/reference/extensions/cxf-soap.adoc | 6 +--
.../cxf-soap/runtime/src/main/doc/usage.adoc | 6 +--
.../cxf/soap/client/it/CxfSoapClientRoutes.java | 50 +++++++++++++++++-----
.../soap/converter/it/CxfSoapConverterRoutes.java | 16 +++++--
.../cxf/soap/it/metrics/CxfSoapMetricsRoutes.java | 7 +--
.../cxf/soap/mtom/it/CxfSoapMtomRoutes.java | 45 ++++++++++++-------
.../cxf/soap/rest/it/CxfSoapRestRoutes.java | 3 +-
.../cxf/soap/ssl/it/CxfSoapSslRoutes.java | 20 ++++++---
8 files changed, 104 insertions(+), 49 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/cxf-soap.adoc
b/docs/modules/ROOT/pages/reference/extensions/cxf-soap.adoc
index a6f244250f..0543f403b4 100644
--- a/docs/modules/ROOT/pages/reference/extensions/cxf-soap.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/cxf-soap.adoc
@@ -68,7 +68,6 @@ With `camel-quarkus-cxf-soap` (no additional dependencies
required), you can use
----
import org.apache.camel.builder.RouteBuilder;
import {javaxOrJakartaPackagePrefix}.enterprise.context.ApplicationScoped;
-import {javaxOrJakartaPackagePrefix}.enterprise.context.SessionScoped;
import {javaxOrJakartaPackagePrefix}.enterprise.inject.Produces;
import {javaxOrJakartaPackagePrefix}.inject.Named;
@@ -89,7 +88,7 @@ public class CxfSoapClientRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint beanClient() {
final CxfEndpoint result = new CxfEndpoint();
@@ -219,7 +218,6 @@ You can enable verbose logging of SOAP messages for both
clients and servers wit
import org.apache.camel.builder.RouteBuilder;
import org.apache.cxf.ext.logging.LoggingFeature;
import {javaxOrJakartaPackagePrefix}.enterprise.context.ApplicationScoped;
-import {javaxOrJakartaPackagePrefix}.enterprise.context.SessionScoped;
import {javaxOrJakartaPackagePrefix}.enterprise.inject.Produces;
import {javaxOrJakartaPackagePrefix}.inject.Named;
@@ -240,7 +238,7 @@ public class MyBeans {
LoggingFeature prettyLoggingFeature;
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint cxfBeanClient() {
final CxfEndpoint result = new CxfEndpoint();
diff --git a/extensions/cxf-soap/runtime/src/main/doc/usage.adoc
b/extensions/cxf-soap/runtime/src/main/doc/usage.adoc
index cc7a00ec10..40baca10db 100644
--- a/extensions/cxf-soap/runtime/src/main/doc/usage.adoc
+++ b/extensions/cxf-soap/runtime/src/main/doc/usage.adoc
@@ -17,7 +17,6 @@ With `camel-quarkus-cxf-soap` (no additional dependencies
required), you can use
----
import org.apache.camel.builder.RouteBuilder;
import {javaxOrJakartaPackagePrefix}.enterprise.context.ApplicationScoped;
-import {javaxOrJakartaPackagePrefix}.enterprise.context.SessionScoped;
import {javaxOrJakartaPackagePrefix}.enterprise.inject.Produces;
import {javaxOrJakartaPackagePrefix}.inject.Named;
@@ -38,7 +37,7 @@ public class CxfSoapClientRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint beanClient() {
final CxfEndpoint result = new CxfEndpoint();
@@ -166,7 +165,6 @@ You can enable verbose logging of SOAP messages for both
clients and servers wit
import org.apache.camel.builder.RouteBuilder;
import org.apache.cxf.ext.logging.LoggingFeature;
import {javaxOrJakartaPackagePrefix}.enterprise.context.ApplicationScoped;
-import {javaxOrJakartaPackagePrefix}.enterprise.context.SessionScoped;
import {javaxOrJakartaPackagePrefix}.enterprise.inject.Produces;
import {javaxOrJakartaPackagePrefix}.inject.Named;
@@ -187,7 +185,7 @@ public class MyBeans {
LoggingFeature prettyLoggingFeature;
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint cxfBeanClient() {
final CxfEndpoint result = new CxfEndpoint();
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java
b/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java
index 7b81ad4782..ce0fc7baa1 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-client/src/main/java/org/apache/camel/quarkus/component/cxf/soap/client/it/CxfSoapClientRoutes.java
@@ -23,7 +23,6 @@ import java.util.Map;
import com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl;
import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.context.SessionScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;
import jakarta.inject.Named;
@@ -63,7 +62,7 @@ public class CxfSoapClientRoutes extends RouteBuilder {
public void configure() {
from("direct:simpleUriBean")
- .to("cxf:bean:soapClientEndpoint?dataFormat=POJO");
+ .to("cxf:bean:soapClientEndpointPojo");
from("direct:simpleUriAddress")
.to(String.format("cxf://%s?wsdlURL=%s&dataFormat=POJO&serviceClass=%s",
calculatorServiceAddress(),
@@ -85,17 +84,17 @@ public class CxfSoapClientRoutes extends RouteBuilder {
}
}
})
-
.toD("cxf:bean:soapClientEndpoint?dataFormat=${header.endpointDataFormat}");
+
.toD("cxf:bean:soapClientEndpoint${header.endpointDataFormat}");
from("direct:operandsAdd")
.setHeader(CxfConstants.OPERATION_NAME).constant("addOperands")
- .to("cxf:bean:soapClientEndpoint?dataFormat=POJO");
+ .to("cxf:bean:soapClientEndpointPojo");
from("direct:basicAuthAdd")
-
.to("cxf:bean:basicAuthClientEndpoint?dataFormat=POJO&username={{cq.cxf.it.calculator.auth.basic.user}}&password={{cq.cxf.it.calculator.auth.basic.password}}");
+
.to("cxf:bean:basicAuthAddClientEndpoint?username={{cq.cxf.it.calculator.auth.basic.user}}&password={{cq.cxf.it.calculator.auth.basic.password}}");
from("direct:basicAuthAddAnonymous")
- .to("cxf:bean:basicAuthClientEndpoint?dataFormat=POJO");
+ .to("cxf:bean:basicAuthAddAnonymousClientEndpoint");
}
@@ -109,10 +108,29 @@ public class CxfSoapClientRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
- CxfEndpoint soapClientEndpoint() {
+ CxfEndpoint soapClientEndpointPojo() {
+ return soapClientCxfEndpoint(DataFormat.POJO);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Named("soapClientEndpointRAW")
+ CxfEndpoint soapClientEndpointRaw() {
+ return soapClientCxfEndpoint(DataFormat.RAW);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Named("soapClientEndpointCXF_MESSAGE")
+ CxfEndpoint soapClientEndpointCxfMessage() {
+ return soapClientCxfEndpoint(DataFormat.CXF_MESSAGE);
+ }
+
+ private CxfEndpoint soapClientCxfEndpoint(DataFormat dataFormat) {
final CxfEndpoint result = new CxfEndpoint();
+ result.setDataFormat(dataFormat);
result.setServiceClass(CalculatorService.class);
result.setAddress(calculatorServiceAddress());
result.setWsdlURL(calculatorServiceWsdlUrl());
@@ -121,10 +139,22 @@ public class CxfSoapClientRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
- CxfEndpoint basicAuthClientEndpoint() {
+ CxfEndpoint basicAuthAddClientEndpoint() {
+ return basicAuthCxfEndpoint();
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Named
+ CxfEndpoint basicAuthAddAnonymousClientEndpoint() {
+ return basicAuthCxfEndpoint();
+ }
+
+ private CxfEndpoint basicAuthCxfEndpoint() {
final CxfEndpoint result = new CxfEndpoint();
+ result.setDataFormat(DataFormat.POJO);
result.setServiceClass(BasicAuthCalculatorService.class);
result.setAddress(serviceBaseUri +
"/calculator-ws/BasicAuthCalculatorService");
result.setWsdlURL("wsdl/BasicAuthCalculatorService.wsdl");
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-converter/src/main/java/org/apache/camel/quarkus/component/cxf/soap/converter/it/CxfSoapConverterRoutes.java
b/integration-test-groups/cxf-soap/cxf-soap-converter/src/main/java/org/apache/camel/quarkus/component/cxf/soap/converter/it/CxfSoapConverterRoutes.java
index 6bc29a7588..07112a7535 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-converter/src/main/java/org/apache/camel/quarkus/component/cxf/soap/converter/it/CxfSoapConverterRoutes.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-converter/src/main/java/org/apache/camel/quarkus/component/cxf/soap/converter/it/CxfSoapConverterRoutes.java
@@ -30,12 +30,12 @@ import org.w3c.dom.Element;
import io.quarkus.runtime.LaunchMode;
import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.context.SessionScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.cxf.common.CxfPayload;
+import org.apache.camel.component.cxf.common.DataFormat;
import org.apache.camel.component.cxf.jaxws.CxfEndpoint;
import org.apache.camel.converter.jaxp.XmlConverter;
import org.apache.camel.wsdl_first.types.GetPerson;
@@ -86,9 +86,9 @@ public class CxfSoapConverterRoutes extends RouteBuilder {
new ArrayList<SoapHeader>(), elements, null);
exchange.getIn().setBody(payload);
})
-
.toD("cxf:bean:soapConverterEndpoint?address=${header.address}&dataFormat=PAYLOAD");
+
.toD("cxf:bean:soapConverterEndpoint?address=${header.address}");
- from("cxf:bean:soapConverterEndpoint?dataFormat=PAYLOAD")
+ from("cxf:bean:soapConverterEndpointConsumer")
.process(exchange -> {
String operation = exchange.getIn().getHeader("operation",
String.class);
if ("pojo".equals(operation)) {
@@ -130,16 +130,24 @@ public class CxfSoapConverterRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint soapConverterEndpoint() {
final CxfEndpoint result = new CxfEndpoint();
+ result.setDataFormat(DataFormat.PAYLOAD);
result.getFeatures().add(loggingFeature);
result.setServiceClass(org.apache.camel.wsdl_first.Person.class);
result.setAddress("/PayLoadConvert/RouterPort");
return result;
}
+ @Produces
+ @ApplicationScoped
+ @Named
+ CxfEndpoint soapConverterEndpointConsumer() {
+ return soapConverterEndpoint();
+ }
+
@Produces
@ApplicationScoped
@Named("loggingFeatureConverter")
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-metrics/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/metrics/CxfSoapMetricsRoutes.java
b/integration-test-groups/cxf-soap/cxf-soap-metrics/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/metrics/CxfSoapMetricsRoutes.java
index 021345fcf1..367ed7ebd1 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-metrics/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/metrics/CxfSoapMetricsRoutes.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-metrics/src/main/java/org/apache/camel/quarkus/component/cxf/soap/it/metrics/CxfSoapMetricsRoutes.java
@@ -20,11 +20,11 @@ import java.util.Optional;
import io.quarkiverse.cxf.metrics.QuarkusCxfMetricsFeature;
import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.context.SessionScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Named;
import org.apache.camel.Message;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.cxf.common.DataFormat;
import org.apache.camel.component.cxf.jaxws.CxfEndpoint;
import
org.apache.camel.quarkus.component.cxf.soap.it.metrics.service.HelloService;
import org.eclipse.microprofile.config.inject.ConfigProperty;
@@ -39,7 +39,7 @@ public class CxfSoapMetricsRoutes extends RouteBuilder {
public void configure() {
from("direct:clientMetrics")
- .to("cxf:bean:clientMetricsEndpoint?dataFormat=POJO");
+ .to("cxf:bean:clientMetricsEndpoint");
from("cxf:bean:metricsServiceEndpoint")
.process(e -> {
@@ -56,10 +56,11 @@ public class CxfSoapMetricsRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint clientMetricsEndpoint() {
final CxfEndpoint result = new CxfEndpoint();
+ result.setDataFormat(DataFormat.POJO);
result.setServiceClass(HelloService.class);
result.setAddress("http://localhost:" + port +
"/soapservice/hello-metrics");
result.setWsdlURL("wsdl/MetricsHelloService.wsdl");
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java
b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java
index 40a62e09d6..28e8808fc4 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-mtom/src/main/java/org/apache/camel/quarkus/component/cxf/soap/mtom/it/CxfSoapMtomRoutes.java
@@ -32,7 +32,6 @@ import com.sun.istack.ByteArrayDataSource;
import io.quarkus.runtime.LaunchMode;
import jakarta.activation.DataHandler;
import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.context.SessionScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;
import jakarta.inject.Named;
@@ -111,6 +110,11 @@ public class CxfSoapMtomRoutes extends RouteBuilder {
Map<String, Object> headers =
exchange.getIn().getHeaders();
String endpointDataFormat =
headers.get("endpointDataFormat").toString();
boolean mtomEnabled =
Boolean.parseBoolean(headers.get("mtomEnabled").toString());
+ if (mtomEnabled) {
+ headers.put("endpointName",
"soapClientMtomEnabledEndpoint" + endpointDataFormat);
+ } else {
+ headers.put("endpointName",
"soapClientMtomDisabledEndpoint" + endpointDataFormat);
+ }
headers.put("address", getServerUrl() +
"/soapservice/mtom-" +
(mtomEnabled ? "enabled" : "disabled") + "-" +
endpointDataFormat.toLowerCase() +
"-mode-image-service");
@@ -142,10 +146,7 @@ public class CxfSoapMtomRoutes extends RouteBuilder {
}
}
})
- .choice().when(simple("${header.mtomEnabled} == 'true'"))
-
.toD("cxf:bean:soapClientMtomEnabledEndpoint?address=${header.address}&mtomEnabled=${header.mtomEnabled}&dataFormat=${header.endpointDataFormat}")
- .otherwise()
-
.toD("cxf:bean:soapClientMtomDisabledEndpoint?address=${header.address}&mtomEnabled=${header.mtomEnabled}&dataFormat=${header.endpointDataFormat}");
+
.toD("cxf:bean:${header.endpointName}?address=${header.address}&mtomEnabled=${header.mtomEnabled}&dataFormat=${header.endpointDataFormat}");
from("cxf:bean:soapMtomEnabledServerPojoModeEndpoint?dataFormat=POJO")
.to("direct:pojoModeProcessor");
@@ -258,42 +259,56 @@ public class CxfSoapMtomRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
- @Named
- CxfEndpoint soapClientMtomEnabledEndpoint() {
+ @ApplicationScoped
+ @Named("soapClientMtomEnabledEndpointPOJO")
+ CxfEndpoint soapClientMtomEnabledEndpointPojo() {
return commonCxfEndpoint(true, "");
}
@Produces
- @SessionScoped
- @Named
- CxfEndpoint soapClientMtomDisabledEndpoint() {
+ @ApplicationScoped
+ @Named("soapClientMtomEnabledEndpointPAYLOAD")
+ CxfEndpoint soapClientMtomEnabledEndpointPayload() {
+ return commonCxfEndpoint(true, "");
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Named("soapClientMtomDisabledEndpointPOJO")
+ CxfEndpoint soapClientMtomDisabledEndpointPojo() {
return commonCxfEndpoint(false, "");
}
@Produces
- @SessionScoped
+ @ApplicationScoped
+ @Named("soapClientMtomDisabledEndpointPAYLOAD")
+ CxfEndpoint soapClientMtomDisabledEndpointPayload() {
+ return commonCxfEndpoint(false, "");
+ }
+
+ @Produces
+ @ApplicationScoped
@Named
CxfEndpoint soapMtomDisabledServerPayloadModeEndpoint() {
return commonCxfEndpoint(false,
"/mtom-disabled-payload-mode-image-service");
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint soapMtomEnabledServerPayloadModeEndpoint() {
return commonCxfEndpoint(true,
"/mtom-enabled-payload-mode-image-service");
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint soapMtomEnabledServerPojoModeEndpoint() {
return commonCxfEndpoint(true,
"/mtom-enabled-pojo-mode-image-service");
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint soapMtomDisabledServerPojoModeEndpoint() {
return commonCxfEndpoint(false,
"/mtom-disabled-pojo-mode-image-service");
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-rest/src/main/java/org/apache/camel/quarkus/component/cxf/soap/rest/it/CxfSoapRestRoutes.java
b/integration-test-groups/cxf-soap/cxf-soap-rest/src/main/java/org/apache/camel/quarkus/component/cxf/soap/rest/it/CxfSoapRestRoutes.java
index 3d6ea3d029..2ab7400fd7 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-rest/src/main/java/org/apache/camel/quarkus/component/cxf/soap/rest/it/CxfSoapRestRoutes.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-rest/src/main/java/org/apache/camel/quarkus/component/cxf/soap/rest/it/CxfSoapRestRoutes.java
@@ -17,7 +17,6 @@
package org.apache.camel.quarkus.component.cxf.soap.rest.it;
import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.context.SessionScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;
import jakarta.inject.Named;
@@ -66,7 +65,7 @@ public class CxfSoapRestRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named
CxfEndpoint soapClientRestEndpoint() {
final CxfEndpoint result = new CxfEndpoint();
diff --git
a/integration-test-groups/cxf-soap/cxf-soap-ssl/src/main/java/org/apache/camel/quarkus/component/cxf/soap/ssl/it/CxfSoapSslRoutes.java
b/integration-test-groups/cxf-soap/cxf-soap-ssl/src/main/java/org/apache/camel/quarkus/component/cxf/soap/ssl/it/CxfSoapSslRoutes.java
index e051dc0e42..a29dd2ef1b 100644
---
a/integration-test-groups/cxf-soap/cxf-soap-ssl/src/main/java/org/apache/camel/quarkus/component/cxf/soap/ssl/it/CxfSoapSslRoutes.java
+++
b/integration-test-groups/cxf-soap/cxf-soap-ssl/src/main/java/org/apache/camel/quarkus/component/cxf/soap/ssl/it/CxfSoapSslRoutes.java
@@ -20,7 +20,6 @@ import java.util.Map;
import io.quarkus.runtime.LaunchMode;
import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.context.SessionScoped;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;
import jakarta.inject.Named;
@@ -82,13 +81,13 @@ public class CxfSoapSslRoutes extends RouteBuilder {
})
.toD("cxf:bean:${header.endpoint}?address=${header.address}");
- from("cxf:bean:soapSslRouter")
+ from("cxf:bean:soapSslRouterConsumer")
.process("responseProcessor");
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named("soapSslLocalCorrect")
CxfEndpoint soapSslLocalCorrect(DefaultHostnameVerifier
defaultHostnameVerifier) {
final CxfEndpoint result = new CxfEndpoint();
@@ -101,7 +100,7 @@ public class CxfSoapSslRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named("soapSslLocalWrong")
CxfEndpoint soapSslLocalWrong(DefaultHostnameVerifier
defaultHostnameVerifier) {
final CxfEndpoint result = new CxfEndpoint();
@@ -114,7 +113,7 @@ public class CxfSoapSslRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named("soapSslGlobal")
CxfEndpoint soapSslGlobal() {
final CxfEndpoint result = new CxfEndpoint();
@@ -125,7 +124,7 @@ public class CxfSoapSslRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
@Named("soapSslRouter")
CxfEndpoint soapSslRouter() {
final CxfEndpoint result = new CxfEndpoint();
@@ -136,7 +135,14 @@ public class CxfSoapSslRoutes extends RouteBuilder {
}
@Produces
- @SessionScoped
+ @ApplicationScoped
+ @Named("soapSslRouterConsumer")
+ CxfEndpoint soapSslRouterConsumer() {
+ return soapSslRouter();
+ }
+
+ @Produces
+ @ApplicationScoped
@Named
GreeterService greeterService() {
return new GreeterImpl();