Hi guys,
I'm trying to integrate comet with spring in my application, but Im exeriencing some difficulties. So here's what I did:
1) I pulled the spring-integration-comet from the spring integration sandbox and built it.
2) Declared it as a dependency in my pom.xml:
3) Declared the MeteorServlet in my web.xml as the following:Code:<dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-comet</artifactId> <version>2.1.BUILD-SNAPSHOT</version> </dependency>
4) Declared my-comet.xml as the following:Code:<!-- Handles Comet requests --> <servlet> <servlet-name>cometServlet</servlet-name> <servlet-class>org.atmosphere.cpr.MeteorServlet</servlet-class> <init-param> <param-name>org.atmosphere.servlet</param-name> <param-value>org.springframework.web.servlet.DispatcherServlet</param-value> </init-param> <init-param> <param-name>org.atmosphere.cpr.broadcasterClass</param-name> <param-value>org.springframework.integration.comet.HttpMessageBroadcaster</param-value> </init-param> <init-param> <param-name>org.atmosphere.useStream</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name> <param-value>org.atmosphere.cache.HeaderBroadcasterCache</param-value> </init-param> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/my-comet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>cometServlet</servlet-name> <url-pattern>/flows/test/*</url-pattern> </servlet-mapping>
5) And finally I have a page with the atmosphere jquery plugin and the following Javascript:Code:<bean name="/recent/notifications" class="org.springframework.integration.comet.AsyncHttpRequestHandlingMessageAdapter"> <property name="messageChannel" ref="recentActivity" /> <property name="messageThreshold" value="2" /> </bean> <bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter"/>
Now the problem.. Going to that page throws the following warning:Code:/* transport can be : long-polling, streaming or websocket */ $.atmosphere.subscribe(basePath, activityNotificationHandler, $.atmosphere.request = { transport : "websocket", maxRequest : 2, timeout: 10000, headers : { "Accept" : "application/json" } } );
Does anybody know what is the problem here?Code:WARN PageNotFound - No mapping found for HTTP request with URI [/flows/test/recent/notifications] in DispatcherServlet with name 'cometServlet'
Thanks.


Reply With Quote