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??
Answering after long time..but people who are trying can still take some advantage out of this
You can try with the following . I just tried and it worked for me
Step-1
If you are using weblogic 12 c make the following change
Step-2
In web.xml add the below configuration
step-3
paste the below code in a java file in the package you defined in the above step(also can be found in the git site of atmosphere)
Now deploy the ear it works..
Jar files
I had the same problem and was able to fix it by updating jersey jars from 1.4 to 1.6 If you use maven, you can add the following dependencies.