Skip to content

Instantly share code, notes, and snippets.

@patelm5
Last active December 11, 2015 02:29
Show Gist options
  • Save patelm5/4531403 to your computer and use it in GitHub Desktop.
Save patelm5/4531403 to your computer and use it in GitHub Desktop.
atmosphere servlet example
<!-- Atmosphere -->
<servlet>
<description>AtmosphereServlet</description>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.cpr.broadcasterLifeCyclePolicy</param-name>
<param-value>EMPTY_DESTROY</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcaster.shareableThreadPool</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.recoverFromDestroyedBroadcaster</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.websocket.messageContentType</param-name>
<param-value>application/json</param-value>
</init-param>
<!-- Uncomment to track message size delivery <init-param> <param-name>org.atmosphere.cpr.broadcastFilterClasses</param-name>
<param-value>org.atmosphere.client.TrackMessageSizeFilter</param-value> </init-param> -->
<!-- Uncomment to use Redis <init-param> <param-name>org.atmosphere.cpr.broadcasterClassName</param-name>
<param-value>org.atmosphere.plugin.org.atmosphere.plugin.redis.RedisBroadcaster</param-value>
</init-param> -->
<load-on-startup>0</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>AtmosphereServlet</servlet-name>
<url-pattern>/atmosphere/*</url-pattern>
</servlet-mapping>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment