I implemented the sample Notify PF Push demo page, and it worked fine, but when i tried changing @PushEndpoint("/notify") channel name to @PushEndpoint("/test") (or any other name than notify) it doesnt trigger the broadcast. No matter what i do it only works with "notify".
If anyone else encountered this problem, i would be glad for any help.
Code: Select all
...
EventBus eventBus = EventBusFactory.getDefault().eventBus();
eventBus.publish("/test", "test string");
...
@Named
@Scope("application")
@PushEndpoint("/test")
public class EvaluationNotificationResource{
@OnMessage(encoders = {JSONEncoder.class})
public String onMessage(String notificationDetail) {
return notificationDetail;
}
}