New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It doesn't seems to work with Vaadin 7.4.4 #3
Comments
I have not updated ICEPush in a long time since there is push support included in the framework since 7.1. Any particular reason you don't use that? |
Hi Artur, |
I updated the demo to use 7.4.4 and it seems to work fine as long as you call push() when you have the session locked. I got your document from Petter, thanks. I'll look through it. If you are not using the latest 7.4, you should upgrade. There are several push fixes done in the 7.4 series. |
Ok Artur, I'll give it a try. We are actually using Vaadin 7.4.4. |
Hi Artur, unfortunately I still have problems: this is my class... package com.example.vaadin_icepush;
import java.util.logging.Logger;
import javax.servlet.annotation.WebServlet;
import org.vaadin.artur.icepush.ICEPush;
import org.vaadin.artur.icepush.ICEPushServlet;
import com.vaadin.annotations.Theme;
import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
@SuppressWarnings("serial")
@Theme("vaadin_icepush")
public class Vaadin_icepushUI extends UI {
private final ICEPush icePush;
private VerticalLayout layout;
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = Vaadin_icepushUI.class, widgetset="com.example.vaadin_icepush.widgetset.Vaadin_icepushWidgetset")
public static class Servlet extends ICEPushServlet {
}
public Vaadin_icepushUI() {
icePush = new ICEPush();
}
@Override
protected void init(VaadinRequest request) {
layout = new VerticalLayout();
layout.setMargin(true);
setContent(layout);
icePush.extend(this);
Button button = new Button("Do stuff in the background");
button.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
Logger logger = Logger.getLogger(getClass().getName());
logger.info("button clicked");
layout.addComponent(new Label("waiting for background process to complete..."));
new BackgroundThread(UI.getCurrent()).start();
}
});
layout.addComponent(button);
}
public class BackgroundThread extends Thread {
private final UI ui;
public BackgroundThread(UI ui) {
this.ui = ui;
}
@Override
public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
}
ui.access(new Runnable() {
@Override
public void run() {
Logger logger = Logger.getLogger(getClass().getName());
logger.info("job done, now updating the the UI and pushing...");
layout.addComponent(new Label("All done"));
icePush.push();
}
});
}
}
} and this is the log from my tomcat 7.0.61 (see the request's details below): WARNING:Vaadin is running in DEBUG MODE. To show debug window, add ?debug to your application URL.Apr 29, 2015 11:43:28 AM org.icepush.servlet.MainServlet Apr 29, 2015 11:43:30 AM org.icepush.servlet.EnvironmentAdaptingServlet Apr 29, 2015 11:44:02 AM com.example.vaadin_icepush.Vaadin_icepushUI$1 buttonClick the exception seems to be thrown at the end of these requests: Request Headers:Host: localhost:8180 Body:ice.pushid=2i92iscq0%3A3ivf |
Hi Arthur, I am using ICE-PUSH addon for a while. It was working fine for my requirement. I am not sure where it lies, but recently, I get the push notification updated only on the mouse move. I am pretty sure It was not the case at the beginning. I started Vaadin using 7.1.x. Once I change the configuration to use the native Vaadin Push It this phenomena was not there. I am not sure what makes this update delayed. could you please help me in this regard |
even the ICEPushDemo example of branch 7 seems to be broken: the call pusher.push() doesn't work because is not invoked from a session.lock() block
The text was updated successfully, but these errors were encountered: