vaadin4spring
vaadin4spring copied to clipboard
Reconfigure the UI beans after deserialization
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.
Any idea how we can automatically test this?
This task might be transferred to the official add-on team once the first version of the Vaadin official Spring add-on is released.
hi Petter is there an approximate timeline for the official add-on release
I think the beta will be released in a few weeks, but it will not include support for serializable sessions.
http://stackoverflow.com/questions/34400416/enableredishttpsession-fails-with-vaadin
Am I having the problem described here?
Can I do something about it?
Yes, that's the problem, and it is deep inside Vaadin Spring so there is no easy way of fixing it.
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.
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.
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.
Okay I will. Thank you!
+1. I'm evaluating vaadin whether it can work in clustering environment. I‘m aslo look forward to this bug be fixed soon.
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 https://github.com/vaadin/spring/pull/32) to the vaadin's spring integration it all seems to work.
Wanted to check. Is this issue fixed via the other referenced issue fixes?