How to keep Vaadin Session after Glassfish 2.x redeploy?

Hi to all,

I’ve developed an application using Vaadin that manage data in Table through IndexedContainer and other beautiful things, but sometimes I’ve to redeploy on my Glassfish 2.x server a new release of this application.

When i redeploy it, all the user that are logged in, are disconnected automatically when redeploy finishes: this is a problem for me.

How can I redploy my application on Glassfish 2.x without having ‘Session Expired’ message at the end?

Thanks a lot.

Hi Stefano,

Are you using the developer profile of GlassFish 2.X? If so, there’s no way to do this. GF 3.X supports it, though, and version 3.0.1 is final and out there and can be used (we’re working on 3.1 right now, adding clustering support).

If you’re using GlassFish 2.X in a cluster, then I’m pretty sure you could do this with a rolling deployment of the new app. In other words, you could migrate sessions from one machine to the others and then redeploy onto that machine. Then repeat with the others. Just make sure you don’t make so many changes that you run into deserialization errors with the UI state stored in the session (may not be an issue if you can keep sessions tied to the old version of the app until they expire using the load balancer).

If I can help in any way with GF 3.X for you, let me know. One nice thing about it is that you can take advantage of EE6 features. I have a couple blogs on this already, but I feel like Vaadin + EE6 is an incredibly simple to use setup. It’s what I use even for personal apps and even test cases for bugs. :slight_smile:


Thank a lots for you answer Bobby: you have been very clear.

Forgive me for my answer in late, but I didn’t see your answer before.

Have a nice Christmas.