Unable to configure Atmosphere to use custom AtmosphereResource instead of AtmosphereResourceImpl. I have tried to use init-param in Servlet configuration as defined below but it is not working.
<init-param>
<param-name>org.atmosphere.cpr.AtmosphereResource</param-name>
<param-value>com.sample.MyAtmosphereResource</param-value>
</init-param>
Solution for this problem is already available in atmosphere. Since the API documentation is mostly focused on how do a sample application these kind of features are not discussed properly in their documentation.
Following link has some Atmosphere annotations which can do some awesome things. http://async-io.org/apidocs/index.html?org/atmosphere/config/service/package-summary.html
Answer for this question is, Create a factory by implementing
AtmosphereResourceFactorywhich creates Custom AtmosphereResource objects and annotate the factory as@AtmosphereResourceFactoryService. Thats all. Now you can see that the custom AtmosphereResource resource is passed toAtmosphereHandler.