I am using Vaadin 7.5.5 , In a simple project If I put a break point in the debuger in the “protected void init(VaadinRequest request) " method then stops there twice, I got a System.out.println(” INIT " + new Date()); that is fire 2 times, If i take out the breakpoint then only fires once.
In another more complex project this happends also in runmode (not debug) when in the init calls a method that fills data from a mail service, then is also call twice.
the problem is that I am using some variables that determine what was the last data I read, and as in the first time that goes thru init , that variable is fill it, then the second time I get not data is that what finally is show in the container, then dependeing in how fast is resonding the service I got data or not.
It seems thats if Init(VaadinRequest request) doesn’t finnish quick enough his inside methods, then is call it again, How can i avoid this?
Are you sure it’s called twice for the same session. I’m just looking UI.class doInit method and it seems to check if it’s already initialized or part of another session already and throws an exception if so.