cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [cxf] branch master updated: CXF-7889: ensure all samples from CXF kit can work with JDK11 OOTB. Fixing jax_rs/sse_tomcat
Date Sat, 10 Nov 2018 17:12:07 GMT
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new e62decb  CXF-7889: ensure all samples from CXF kit can work with JDK11 OOTB. Fixing
jax_rs/sse_tomcat
e62decb is described below

commit e62decbe89bd412f1178ed62738fe234262020a5
Author: reta <drreta@gmail.com>
AuthorDate: Sat Nov 10 12:11:41 2018 -0500

    CXF-7889: ensure all samples from CXF kit can work with JDK11 OOTB. Fixing jax_rs/sse_tomcat
---
 distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml         | 2 +-
 .../jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsServer.java     | 1 +
 .../jax_rs/sse_tomcat/src/main/resources/WEB-INF/applicationContext.xml | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml b/distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml
index c5ee789..92a1ff5 100644
--- a/distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/sse_tomcat/pom.xml
@@ -13,7 +13,7 @@
     
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <cxf.tomcat.version>8.0.32</cxf.tomcat.version>
+        <cxf.tomcat.version>8.0.53</cxf.tomcat.version>
     </properties>
 
     <dependencies>
diff --git a/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsServer.java
b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsServer.java
index b98af99..d69e561 100644
--- a/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsServer.java
+++ b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/java/demo/jaxrs/sse/StatsServer.java
@@ -48,6 +48,7 @@ public final class StatsServer {
         context.addApplicationListener(ContextLoaderListener.class.getName());
         context.setAddWebinfClassesResources(true);
         context.setResources(resourcesFrom(context, "target/classes"));
+        context.setParentClassLoader(Thread.currentThread().getContextClassLoader());
 
         final Wrapper cxfServlet = Tomcat.addServlet(context, "cxfServlet", new CXFServlet());
         cxfServlet.setAsyncSupported(true);
diff --git a/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/WEB-INF/applicationContext.xml
b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/WEB-INF/applicationContext.xml
index 0c290a5..d61c4a7 100644
--- a/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/WEB-INF/applicationContext.xml
+++ b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/WEB-INF/applicationContext.xml
@@ -27,7 +27,7 @@
          http://cxf.apache.org/jaxrs
          http://cxf.apache.org/schemas/jaxrs.xsd">
 
-     <jaxrs:server id="statsServer" address="/api" transportId="http://cxf.apache.org/transports/http/sse">
+     <jaxrs:server id="statsServer" address="/api">
         <jaxrs:serviceBeans>
            <ref bean="statsRestService"/>
         </jaxrs:serviceBeans>


Mime
View raw message