-
-
Notifications
You must be signed in to change notification settings - Fork 756
Installing AtmosphereServlet with or without native support
Starting with 2.0, the only dependency an application needs, by default:
./WEB-INF
./WEB-INF/lib
./WEB-INF/lib/atmosphere-runtime-2.0.0.jar
./WEB-INF/lib/slf4j-api-1.6.1.jar
Starting with 2.0, the Atmosphere Framework will, by default, only support the Servlet 3.0 Async API with either JSR 356 (WebSocket API) or native WebSocket support. For jsr356 support, only jsr356 + Servlet 3.0 will be supported.
To use Native Comet/WebSocket Support like Tomcat AIO/WebSocket, Jetty Continuation/WebSocket or Grizzly Comet WebSocket, add in web.xml/application.xml
<init-param>
<param-name>org.atmosphere.useNative</param-name>
<param-value>true</param-value>
</init-param>
For those server, you need use atmosphere-runtime-native jar file:
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime-native</artifactId>
<version>2.0.0.x</version>
</dependency>
and also make sure the following dependency are present. By default they are pulled from Maven, but if you build with another tool, make sure you add them:
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-jbossweb</artifactId>
<version>1.0.15</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-tomcat</artifactId>
<version>1.0.15</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-jbossweb</artifactId>
<version>1.0.15</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-tomcat7</artifactId>
<version>1.0.15</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-tomcat</artifactId>
<version>1.0.15</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-compat-tomcat7</artifactId>
<version>1.0.15</version>
</dependency>
Note: If you are using a framework that build on top of atmosphere-runtime, make sure the dependency is EXCLUDED from the dependency tree to avoid issue. atmosphere-runtime IS NOT NEEDED when native is used.
To use native WebSocket support with native Comet support, you must add, in web.xml/application.xml
<init-param>
<param-name>org.atmosphere.useWebSocketAndServlet3</param-name>
<param-value>false</param-value>
</init-param>
and make sure you have read the previous section if you are using Tomcat or JBossWeb.
- Understanding Atmosphere
- Understanding @ManagedService
- Using javax.inject.Inject and javax.inject.PostConstruct annotation
- Understanding Atmosphere's Annotation
- Understanding AtmosphereResource
- Understanding AtmosphereHandler
- Understanding WebSocketHandler
- Understanding Broadcaster
- Understanding BroadcasterCache
- Understanding Meteor
- Understanding BroadcastFilter
- Understanding Atmosphere's Events Listeners
- Understanding AtmosphereInterceptor
- Configuring Atmosphere for Performance
- Understanding JavaScript functions
- Understanding AtmosphereResourceSession
- Improving Performance by using the PoolableBroadcasterFactory
- Using Atmosphere Jersey API
- Using Meteor API
- Using AtmosphereHandler API
- Using Socket.IO
- Using GWT
- Writing HTML5 Server-Sent Events
- Using STOMP protocol
- Streaming WebSocket messages
- Configuring Atmosphere's Classes Creation and Injection
- Using AtmosphereInterceptor to customize Atmosphere Framework
- Writing WebSocket sub protocol
- Configuring Atmosphere for the Cloud
- Injecting Atmosphere's Components in Jersey
- Sharing connection between Browser's windows and tabs
- Understanding AtmosphereResourceSession
- Manage installed services
- Server Side: javadoc API
- Server Side: atmosphere.xml and web.xml configuration
- Client Side: atmosphere.js API