Created
September 2, 2014 23:35
-
-
Save jfarcand/447f79839b9e5f6e5519 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/samples/chat/pom.xml b/samples/chat/pom.xml | |
index 21f105c..328319d 100644 | |
--- a/samples/chat/pom.xml | |
+++ b/samples/chat/pom.xml | |
@@ -20,6 +20,11 @@ | |
<type>war</type> | |
</dependency> | |
<dependency> | |
+ <groupId>org.atmosphere</groupId> | |
+ <artifactId>replicata</artifactId> | |
+ <version>1.0.0-SNAPSHOT</version> | |
+ </dependency> | |
+ <dependency> | |
<groupId>ch.qos.logback</groupId> | |
<artifactId>logback-classic</artifactId> | |
<version>${logback-version}</version> | |
diff --git a/samples/chat/src/main/java/org/atmosphere/samples/chat/ChatAtmosphereHandler.java b/samples/chat/src/main/java/org/atmosphere/samples/chat/Cindex 0a1eca8..33d4e5b 100644 | |
--- a/samples/chat/src/main/java/org/atmosphere/samples/chat/ChatAtmosphereHandler.java | |
+++ b/samples/chat/src/main/java/org/atmosphere/samples/chat/ChatAtmosphereHandler.java | |
@@ -20,6 +20,7 @@ import org.atmosphere.cpr.AtmosphereResponse; | |
import org.atmosphere.handler.OnMessage; | |
import org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor; | |
import org.atmosphere.interceptor.BroadcastOnPostAtmosphereInterceptor; | |
+import org.atmosphere.replicata.ReplicataBroadcasterCache; | |
import java.io.IOException; | |
import java.util.Date; | |
@@ -31,7 +32,8 @@ import java.util.Date; | |
*/ | |
@AtmosphereHandlerService(path="/chat", | |
interceptors = {AtmosphereResourceLifecycleInterceptor.class, | |
- BroadcastOnPostAtmosphereInterceptor.class}) | |
+ BroadcastOnPostAtmosphereInterceptor.class}, | |
+ broadcasterCache = ReplicataBroadcasterCache.class) | |
public class ChatAtmosphereHandler extends OnMessage<String> { | |
@Override | |
diff --git a/samples/chat/src/main/webapp/WEB-INF/web.xml b/samples/chat/src/main/webapp/WEB-INF/web.xml | |
index e1f7f25..2753340 100644 | |
--- a/samples/chat/src/main/webapp/WEB-INF/web.xml | |
+++ b/samples/chat/src/main/webapp/WEB-INF/web.xml | |
@@ -16,6 +16,10 @@ | |
<param-name>org.atmosphere.cpr.packages</param-name> | |
<param-value>org.atmosphere.samples</param-value> | |
</init-param> | |
+ <init-param> | |
+ <param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name> | |
+ <param-value>org.atmosphere.replicata.ReplicataBroadcasterCache</param-value> | |
+ </init-param> | |
<load-on-startup>0</load-on-startup> | |
</servlet> | |
<servlet-mapping> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment