Skip to content
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

Reconfigure the UI beans after deserialization #154

Open
peholmst opened this issue Feb 3, 2015 · 13 comments
Open

Reconfigure the UI beans after deserialization #154

peholmst opened this issue Feb 3, 2015 · 13 comments

Comments

@peholmst
Copy link
Owner

peholmst commented Feb 3, 2015

Currently, a Spring4Vaadin UI cannot be serialized, which is problematic for cluster deployments. This should be fixed by ensuring that:

  • Spring4Vaadin itself is properly serializable, and
  • the UI beans are reconfigured after deserialization, so that e.g. transient backend references are re-injected.
@peholmst
Copy link
Owner Author

peholmst commented Feb 3, 2015

Any idea how we can automatically test this?

@peholmst peholmst added this to the 0.0.8.RELEASE milestone Feb 3, 2015
@peholmst peholmst added code and removed code labels Feb 3, 2015
@peholmst
Copy link
Owner Author

This task might be transferred to the official add-on team once the first version of the Vaadin official Spring add-on is released.

@FearlessHyena
Copy link
Contributor

hi Petter is there an approximate timeline for the official add-on release

@peholmst
Copy link
Owner Author

I think the beta will be released in a few weeks, but it will not include support for serializable sessions.

@khauser
Copy link

khauser commented Dec 21, 2015

http://stackoverflow.com/questions/34400416/enableredishttpsession-fails-with-vaadin

Am I having the problem described here?

Can I do something about it?

@peholmst
Copy link
Owner Author

Yes, that's the problem, and it is deep inside Vaadin Spring so there is no easy way of fixing it.

@khauser
Copy link

khauser commented Dec 22, 2015

I debugged myself a little bit into this and updated the question at stackoverflow. For me it has something to to with wrong serialization ids.

@khauser
Copy link

khauser commented Dec 28, 2015

Indeed I had a preliminary bug/failure. But after "fixing" it I run into this Caused by: java.io.NotSerializableException: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext exception (with this SpringUIProviders in it).

In a comment in http://stackoverflow.com/questions/29388542/notserializableexception-on-serialization-of-objects-currently-shown-by-vaadin @chelu talks also about "reconfigured/re-populated UI components after deserialization" more or less like you did above. He had setup his own spring vaadin connection (and a lot more) in his project jdal. Could you have a look into that? Maybe it's helpful, there are also some sample integrations.

@peholmst
Copy link
Owner Author

Could you please add that information to this ticket as well? https://dev.vaadin.com/ticket/18164

I doubt I will be able to fix this in Vaadin4Spring, it needs to be addressed in the official add-on.

@khauser
Copy link

khauser commented Dec 28, 2015

Okay I will. Thank you!

@LaiZhou
Copy link

LaiZhou commented Jul 12, 2016

+1. I'm evaluating vaadin whether it can work in clustering environment. I‘m aslo look
forward to this bug be fixed soon.

@khauser
Copy link

khauser commented Jul 21, 2016

You might have a look here: https://github.com/khauser/microservices4vaadin (within the frontend service)
There I used a SerializableProxy from jdal's library. Together with some other fixes (check out vaadin/spring#32) to the vaadin's spring integration it all seems to work.

@FearlessHyena
Copy link
Contributor

Wanted to check. Is this issue fixed via the other referenced issue fixes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants