I posted this on stackoverflow,
http://stackoverflow.com/questions/7328544/getting-error-on-pubsub-example-using-atmosphere-jersey
But i can post it here too.
I'm following the tutorial here
http://jfarcand.wordpress.com/2011/06/29/rest-websocket-applications-why-not-using-the-atmosphere-framework/
I already have a Jersey project up and running and working fine using JBoss
7. The one difference i have is that i am using Jersey with Spring. So my
JQueryPubSub looks like this
@Service <-- For Spring component Scan
@Path("/pubsub/{topic}")
@Produces("text/html;charset=ISO-8859-1")
public class JQueryPubSub {
@PathParam("topic")
Broadcaster topic;
@GET
public SuspendResponse<String> subscribe() {
return new SuspendResponse.SuspendResponseBuilder<String>()
.broadcaster(topic)
.outputComments(true)
.addListener(new EventsLogger())
.build();
}
@POST
@Broadcast
public Broadcastable publish(@FormParam("message") String message) {
return new Broadcastable(message, "", topic);
}
}
So i wanted to add this example but i'm getting
22:55:27,381 SEVERE [com.sun.jersey.spi.inject.Errors] (MSC service thread
1-3) The following errors and warnings have been detected with resource
and/or provider classes: SEVERE: Missing dependency for field:
org.atmosphere.cpr.Broadcaster com.order.resources.JQueryPubSub.topic
Any ideas how i can fix this issue and why Jersey seems to be aggressively
injecting the value into broadcaster??
--
View this message in context: http://jersey.576304.n2.nabble.com/JerseySpring-Atmosphere-example-of-pubsub-tp6766455p6766455.html
Sent from the Jersey mailing list archive at Nabble.com.