Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Add the UUIDBroadcaster class in code and start the lifecyle manageme…
Browse files Browse the repository at this point in the history
…nt manually so not to conflict with the CV bundle, thanks to @peuter for the tip.
  • Loading branch information
digitaldaniel authored and teichsta committed Aug 31, 2014
1 parent 1a541a1 commit f68056f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private Dictionary<String, String> getJerseyServletParams() {
jerseyServletParams.put("org.atmosphere.cpr.AtmosphereInterceptor", "org.atmosphere.interceptor.DefaultHeadersInterceptor,org.atmosphere.interceptor.AndroidAtmosphereInterceptor,org.atmosphere.interceptor.SSEAtmosphereInterceptor,org.atmosphere.interceptor.JSONPAtmosphereInterceptor,org.atmosphere.interceptor.JavaScriptProtocol,org.atmosphere.interceptor.OnDisconnectInterceptor");
// The BroadcasterCache is set in ResourceStateChangeListener.registerItems(), because otherwise
// it gets somehow overridden by other registered servlets (e.g. the CV-bundle)
jerseyServletParams.put("org.atmosphere.cpr.broadcasterCacheClass", "org.atmosphere.cache.UUIDBroadcasterCache");
//jerseyServletParams.put("org.atmosphere.cpr.broadcasterCacheClass", "org.atmosphere.cache.UUIDBroadcasterCache");
jerseyServletParams.put("org.atmosphere.cpr.broadcasterLifeCyclePolicy", "IDLE_DESTROY");
jerseyServletParams.put("org.atmosphere.cpr.CometSupport.maxInactiveActivity", "3000000");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public static ConcurrentMap<String, Object> getMap() {
}

public void registerItems(){
//broadcaster.getBroadcasterConfig().setBroadcasterCache(new UUIDBroadcasterCache());
broadcaster.getBroadcasterConfig().setBroadcasterCache(new UUIDBroadcasterCache());
broadcaster.getBroadcasterConfig().getBroadcasterCache().configure(broadcaster.getBroadcasterConfig());
broadcaster.getBroadcasterConfig().getBroadcasterCache().start();

broadcaster.getBroadcasterConfig().addFilter(new PerRequestBroadcastFilter() {

Expand Down

0 comments on commit f68056f

Please sign in to comment.