Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D16FD200B87 for ; Mon, 5 Sep 2016 03:10:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D020D160AC0; Mon, 5 Sep 2016 01:10:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7F597160ADC for ; Mon, 5 Sep 2016 03:10:11 +0200 (CEST) Received: (qmail 42444 invoked by uid 500); 5 Sep 2016 01:10:10 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 40882 invoked by uid 99); 5 Sep 2016 01:10:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2016 01:10:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 37287DFFB9; Mon, 5 Sep 2016 01:10:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: reta@apache.org To: commits@cxf.apache.org Date: Mon, 05 Sep 2016 01:10:30 -0000 Message-Id: <3c060e1305494b0b9870862aef2fdd09@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [23/23] cxf git commit: CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere archived-at: Mon, 05 Sep 2016 01:10:13 -0000 CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/cebe1153 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/cebe1153 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/cebe1153 Branch: refs/heads/master-jaxrs-2.1 Commit: cebe1153110328cb2aa0d6037c0ba0ea30e8f91c Parents: 6fcdc7e Author: reta Authored: Sun Apr 17 21:44:28 2016 -0400 Committer: reta Committed: Sun Sep 4 21:08:28 2016 -0400 ---------------------------------------------------------------------- .../release/samples/jax_rs/sse_cdi/README.txt | 35 +++ .../main/release/samples/jax_rs/sse_cdi/pom.xml | 143 ++++++++++ .../src/main/java/demo/jaxrs/sse/Stats.java | 56 ++++ .../java/demo/jaxrs/sse/StatsApplication.java | 44 +++ .../demo/jaxrs/sse/StatsRestServiceImpl.java | 80 ++++++ .../main/java/demo/jaxrs/sse/StatsServer.java | 63 +++++ .../src/main/resources/META-INF/beans.xml | 10 + .../META-INF/cxf/org.apache.cxf.Logger | 1 + .../sse_cdi/src/main/resources/log.properties | 3 + .../sse_cdi/src/main/resources/logback.xml | 16 ++ .../src/main/resources/web-ui/index.html | 49 ++++ .../resources/web-ui/javascripts/highcharts.js | 270 +++++++++++++++++++ .../web-ui/javascripts/jquery-1.9.0.min.js | 4 + .../samples/jax_rs/sse_spring/README.txt | 35 +++ .../release/samples/jax_rs/sse_spring/pom.xml | 142 ++++++++++ .../src/main/java/demo/jaxrs/sse/Stats.java | 56 ++++ .../java/demo/jaxrs/sse/StatsApplication.java | 26 ++ .../main/java/demo/jaxrs/sse/StatsConfig.java | 56 ++++ .../demo/jaxrs/sse/StatsRestServiceImpl.java | 83 ++++++ .../main/java/demo/jaxrs/sse/StatsServer.java | 63 +++++ .../src/main/resources/META-INF/beans.xml | 10 + .../META-INF/cxf/org.apache.cxf.Logger | 1 + .../src/main/resources/log.properties | 2 + .../sse_spring/src/main/resources/logback.xml | 16 ++ .../src/main/resources/web-ui/index.html | 49 ++++ .../resources/web-ui/javascripts/highcharts.js | 270 +++++++++++++++++++ .../web-ui/javascripts/jquery-1.9.0.min.js | 4 + .../samples/jax_rs/sse_tomcat/README.txt | 35 +++ .../release/samples/jax_rs/sse_tomcat/pom.xml | 140 ++++++++++ .../src/main/java/demo/jaxrs/sse/Stats.java | 56 ++++ .../demo/jaxrs/sse/StatsRestServiceImpl.java | 80 ++++++ .../main/java/demo/jaxrs/sse/StatsServer.java | 74 +++++ .../META-INF/cxf/org.apache.cxf.Logger | 1 + .../resources/WEB-INF/applicationContext.xml | 42 +++ .../src/main/resources/log.properties | 2 + .../sse_tomcat/src/main/resources/logback.xml | 16 ++ .../src/main/resources/web-ui/index.html | 49 ++++ .../resources/web-ui/javascripts/highcharts.js | 270 +++++++++++++++++++ .../web-ui/javascripts/jquery-1.9.0.min.js | 4 + distribution/src/main/release/samples/pom.xml | 3 + .../cxf/cdi/JAXRSCdiResourceExtension.java | 23 ++ ...AXRSServerFactoryCustomizationExtension.java | 34 +++ parent/pom.xml | 17 +- .../cxf/jaxrs/JAXRSServerFactoryBean.java | 9 + .../org/apache/cxf/jaxrs/impl/RequestImpl.java | 23 ++ .../cxf/jaxrs/impl/ResponseBuilderImpl.java | 14 + .../cxf/jaxrs/impl/tl/ThreadLocalRequest.java | 23 ++ .../client/spec/InvocationBuilderImpl.java | 33 +++ rt/rs/pom.xml | 1 + rt/rs/sse/pom.xml | 76 ++++++ .../jaxrs/sse/OutboundSseEventBodyWriter.java | 139 ++++++++++ .../cxf/jaxrs/sse/OutboundSseEventImpl.java | 171 ++++++++++++ .../cxf/jaxrs/sse/SseBroadcasterImpl.java | 65 +++++ .../cxf/jaxrs/sse/SseEventOutputProvider.java | 53 ++++ .../org/apache/cxf/jaxrs/sse/SseFeature.java | 41 +++ .../SseAtmosphereContextProvider.java | 57 ++++ .../SseAtmosphereEventOutputImpl.java | 117 ++++++++ .../atmosphere/SseAtmosphereInterceptor.java | 181 +++++++++++++ .../SseAtmosphereInterceptorWriter.java | 31 +++ .../SseAtmosphereResourceContext.java | 60 +++++ .../cdi/SseTransportCustomizationExtension.java | 30 +++ .../transport/sse/SseHttpTransportFactory.java | 57 ++++ .../AtmosphereSseServletDestination.java | 100 +++++++ rt/rs/sse/src/main/resources/META-INF/beans.xml | 5 + .../resources/META-INF/cxf/bus-extensions.txt | 1 + .../transport/http/HTTPTransportFactory.java | 8 +- .../transport/servlet/CXFNonSpringServlet.java | 12 +- systests/pom.xml | 1 + systests/rs-sse/pom.xml | 166 ++++++++++++ .../cxf/systest/jaxrs/sse/AbstractSseTest.java | 141 ++++++++++ .../org/apache/cxf/systest/jaxrs/sse/Book.java | 65 +++++ .../apache/cxf/systest/jaxrs/sse/BookStore.java | 149 ++++++++++ .../jaxrs/sse/jetty/AbstractJettyServer.java | 98 +++++++ .../jaxrs/sse/jetty/JettyEmbeddedTest.java | 49 ++++ .../systest/jaxrs/sse/jetty/JettyWarTest.java | 48 ++++ .../jaxrs/sse/tomcat/AbstractTomcatServer.java | 111 ++++++++ .../jaxrs/sse/tomcat/TomcatEmbeddedTest.java | 49 ++++ .../systest/jaxrs/sse/tomcat/TomcatWarTest.java | 49 ++++ .../test/resources/jaxrs_sse/WEB-INF/web.xml | 28 ++ 79 files changed, 4688 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/README.txt ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/README.txt b/distribution/src/main/release/samples/jax_rs/sse_cdi/README.txt new file mode 100644 index 0000000..6917376 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/README.txt @@ -0,0 +1,35 @@ +JAX-RS SSE Demo +================= + +This is a SSE version of JAX-RS Basic Demo using CDI. + +A SSE endpoint service is provided on URL http://localhost:8686/rest/api/stats/sse/{id} +where {id} is any integer value, f.e.: + + http://localhost:8686/rest/api/stats/sse/1 + +This sample includes a simple web UI using Highcharts JavaScript library to show off +randomly generated statistics about particular server, pushed to the client using +SSE JAX-RS endpoint. The UI is available at + + http://localhost:8686/static/ + +Under the hood, embedded Jetty 9 container is being used. + +Building and running the demo using maven +--------------------------------------- + +From the base directory of this sample (i.e., where this README file is +located), the maven pom.xml file can be used to build and run the demo. + +Using either UNIX or Windows: + + mvn install + mvn -Pserver + +To remove the target dir, run mvn clean". + +Connecting to the SSE stream +--------------------------------------- + +Open a web browser at: http://localhost:8686/static/ http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/pom.xml ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/pom.xml b/distribution/src/main/release/samples/jax_rs/sse_cdi/pom.xml new file mode 100644 index 0000000..7311157 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/pom.xml @@ -0,0 +1,143 @@ + + 4.0.0 + JAX-RS SSE/CDI Demo (Jetty 9) + JAX-RS SSE/CDI Demo (Jetty 9) + jax_rs_sse_cdi + + + org.apache.cxf.samples + cxf-samples + 3.2.0-SNAPSHOT + ../.. + + + + UTF-8 + 9.3.5.v20151012 + + + + + javax.enterprise + cdi-api + + + + org.apache.cxf + cxf-integration-cdi + 3.2.0-SNAPSHOT + + + + org.apache.cxf + cxf-rt-frontend-jaxrs + 3.2.0-SNAPSHOT + + + + org.apache.cxf + cxf-rt-rs-sse + 3.2.0-SNAPSHOT + + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + + + + com.fasterxml.jackson.core + jackson-core + + + + org.jboss.weld.servlet + weld-servlet + 2.2.16.Final + + + + org.jboss.weld + weld-core + 2.2.16.Final + + + + org.eclipse.jetty + jetty-server + + + + org.eclipse.jetty + jetty-plus + + + + org.eclipse.jetty + apache-jsp + ${cxf.jetty9.version} + + + + org.eclipse.jetty + jetty-webapp + + + + org.eclipse.jetty + jetty-webapp + + + + org.eclipse.jetty.websocket + websocket-server + ${cxf.jetty9.version} + + + + org.atmosphere + atmosphere-runtime + 2.4.3 + + + + + + server + + test + + + org.codehaus.mojo + exec-maven-plugin + + + test + + java + + + demo.jaxrs.sse.StatsServer + + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/Stats.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/Stats.java b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/Stats.java new file mode 100644 index 0000000..874047c --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/Stats.java @@ -0,0 +1,56 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package demo.jaxrs.sse; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value = Include.NON_NULL) +public class Stats implements Serializable { + private static final long serialVersionUID = -6705829915457870975L; + + private long timestamp; + private int load; + + public Stats() { + } + + public Stats(long timestamp, int load) { + this.timestamp = timestamp; + this.load = load; + } + + public long getTimestamp() { + return timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + } + + public int getLoad() { + return load; + } + + public void setLoad(int load) { + this.load = load; + } +} http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsApplication.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsApplication.java b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsApplication.java new file mode 100644 index 0000000..edf8a2b --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsApplication.java @@ -0,0 +1,44 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package demo.jaxrs.sse; + +import java.util.HashSet; +import java.util.Set; + +import javax.inject.Inject; +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.core.Application; + +import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; + +import org.apache.cxf.jaxrs.sse.SseFeature; + +@ApplicationPath("api") +public class StatsApplication extends Application { + @Inject private StatsRestServiceImpl statsRestService; + + @Override + public Set getSingletons() { + final Set singletons = new HashSet<>(); + singletons.add(new SseFeature()); + singletons.add(statsRestService); + singletons.add(new JacksonJsonProvider()); + return singletons; + } +} http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java new file mode 100644 index 0000000..b8f8608 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java @@ -0,0 +1,80 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package demo.jaxrs.sse; + +import java.io.IOException; +import java.util.Date; +import java.util.Random; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.sse.OutboundSseEvent; +import javax.ws.rs.sse.SseContext; +import javax.ws.rs.sse.SseEventOutput; + +@Path("/stats") +public class StatsRestServiceImpl { + private static final Random RANDOM = new Random(); + + private static OutboundSseEvent createStatsEvent(final OutboundSseEvent.Builder builder, final int eventId) { + return builder + .id("" + eventId) + .data(Stats.class, new Stats(new Date().getTime(), RANDOM.nextInt(100))) + .mediaType(MediaType.APPLICATION_JSON_TYPE) + .build(); + } + + @GET + @Path("sse/{id}") + @Produces("text/event-stream") + public SseEventOutput stats(@Context SseContext sseContext, @PathParam("id") final String id) { + final SseEventOutput output = sseContext.newOutput(); + + new Thread() { + public void run() { + try { + output.write(createStatsEvent(sseContext.newEvent().name("stats"), 1)); + Thread.sleep(1000); + output.write(createStatsEvent(sseContext.newEvent().name("stats"), 2)); + Thread.sleep(1000); + output.write(createStatsEvent(sseContext.newEvent().name("stats"), 3)); + Thread.sleep(1000); + output.write(createStatsEvent(sseContext.newEvent().name("stats"), 4)); + Thread.sleep(1000); + output.write(createStatsEvent(sseContext.newEvent().name("stats"), 5)); + Thread.sleep(1000); + output.write(createStatsEvent(sseContext.newEvent().name("stats"), 6)); + Thread.sleep(1000); + output.write(createStatsEvent(sseContext.newEvent().name("stats"), 7)); + Thread.sleep(1000); + output.write(createStatsEvent(sseContext.newEvent().name("stats"), 8)); + output.close(); + } catch (final InterruptedException | IOException e) { + e.printStackTrace(); + } + } + }.start(); + + return output; + } +} http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsServer.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsServer.java b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsServer.java new file mode 100644 index 0000000..c227718 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsServer.java @@ -0,0 +1,63 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package demo.jaxrs.sse; + +import org.apache.cxf.cdi.CXFCdiServlet; +import org.apache.cxf.transport.sse.SseHttpTransportFactory; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.HandlerList; +import org.eclipse.jetty.servlet.DefaultServlet; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +import org.jboss.weld.environment.servlet.BeanManagerResourceBindingListener; +import org.jboss.weld.environment.servlet.Listener; + +public final class StatsServer { + private StatsServer() { + } + + public static void main(final String[] args) throws Exception { + final Server server = new Server(8686); + + final ServletHolder staticHolder = new ServletHolder(new DefaultServlet()); + final ServletContextHandler staticContext = new ServletContextHandler(); + staticContext.setContextPath("/static"); + staticContext.addServlet(staticHolder, "/*"); + staticContext.setResourceBase(StatsServer.class.getResource("/web-ui").toURI().toString()); + + // Register and map the dispatcher servlet + final CXFCdiServlet cxfServlet = new CXFCdiServlet(); + final ServletHolder cxfServletHolder = new ServletHolder(cxfServlet); + cxfServletHolder.setInitParameter(CXFCdiServlet.TRANSPORT_ID, SseHttpTransportFactory.TRANSPORT_ID); + final ServletContextHandler context = new ServletContextHandler(); + context.setContextPath("/"); + context.addEventListener(new Listener()); + context.addEventListener(new BeanManagerResourceBindingListener()); + context.addServlet(cxfServletHolder, "/rest/*"); + + HandlerList handlers = new HandlerList(); + handlers.addHandler(staticContext); + handlers.addHandler(context); + + server.setHandler(handlers); + server.start(); + server.join(); + } +} + http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/META-INF/beans.xml ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/META-INF/beans.xml b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..7e2559b --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/META-INF/beans.xml @@ -0,0 +1,10 @@ + + + + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/META-INF/cxf/org.apache.cxf.Logger ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/META-INF/cxf/org.apache.cxf.Logger b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/META-INF/cxf/org.apache.cxf.Logger new file mode 100644 index 0000000..27dd788 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/META-INF/cxf/org.apache.cxf.Logger @@ -0,0 +1 @@ +org.apache.cxf.common.logging.Slf4jLogger \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/log.properties ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/log.properties b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/log.properties new file mode 100644 index 0000000..63477d3 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/log.properties @@ -0,0 +1,3 @@ +handlers=java.util.logging.ConsoleHandler +org.jboss.weld.level=FINEST +java.util.logging.ConsoleHandler.level=FINEST \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/logback.xml ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/logback.xml b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/logback.xml new file mode 100644 index 0000000..1052186 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/logback.xml @@ -0,0 +1,16 @@ + + + + + [%level] %d{yyyy-MM-dd HH:mm:ss.SSS} %logger{36} - [%X] %msg%n + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cxf/blob/cebe1153/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/web-ui/index.html ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/web-ui/index.html b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/web-ui/index.html new file mode 100644 index 0000000..2aaed6e --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/resources/web-ui/index.html @@ -0,0 +1,49 @@ + + + + SSE: Apache CXF example + + + + + +
+
+
+
+ + + + \ No newline at end of file