Changes to java code are effective only after server restart

Hi!

I’m new to Vaadin development and I just going along with the tutorial. There is one thing that displeases me: I have to restart the development server in order to make my changes to the java source code effective. I tried tomcat and jetty. The same behaviour in both servers. Is this a usual behaviour? Or did I mess up something with the eclipse configuration?

I would expect that changes are reflected immediately in the running development server. The results should be visible in the browser only by clicking the refresh button. There are java web frameworks available which offer this feature (e.g. Tapestry 5, Play Framework, GWT).

Bye,
Olaf

Configure hot redeploy in your IDE with the connection to app server. This way, once you save your source from IDE, the class will be recompiled and your webapp redeployed silently.

You may also consider trying the JRebel product which promises the more advanced hot swapping - see the following thread
http://vaadin.com/forum/-/message_boards/message/92914
for more details and as well the JRebel’s website -
http://www.zeroturnaround.com/jrebel/

If you want to restart a running application you should add the ?restartApplication flag the the URL. Otherwise you will continue to use the last application instance and changes e.g. in application init code will not be seen as init will not be run until a new application instance is created.

I have the same problem. The only thing that works for me is clicking stop on server, then doing run on server for the HelloWorld project in Eclipse. I’ve also tried Chrome and use of the ?restartApplication flag with no luck.

I see the Server change state to “Republish” then to “Synchronized”, this is using the J2EE Preview on localhost after I save my changes. I would presume this means hot deploy is working? In any case, the changes don’t show up in the browser. Right now this is making Vaadin development not so enjoyable.

Running on Eclipse Helios… Any suggestions?

Joel

I assume you mean hot deploy of the whole application, not just HotSwap of small changes via the debug interface of the JVM.

The J2EE Preview integration in Eclipse does seem to have some issues with redeployment. The problems are in the J2EE integration parts in Eclipse, the underlying Jetty would work fine if configured correctly.

Try e.g. with Tomcat (with ?restartApplication) instead of J2EE Preview, or try the (commercial product) JRebel for many updates without even redeploying the servlet.