Spring and Vaadin can’t do this out-of-the-box, but it would be possible. I haven’t done this myself, by the way, so I might be missing something.
Make sure you have the
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
[/code] added to your web.xml, to allow session scoped beans.
2) Add your application bean to the spring context, with a session scope[code]
<bean scope="session" id="application" class="com.acme.thing.MySuperApplication">
Create your extension of com.vaadin.terminal.gwt.server.AbstractApplicationServlet, implementing getNewApplication(HttpServletRequest request) and getApplicationClass() (both looking stuff up from the context)
Change your web.xml to use your new ApplicationServlet.
As I say, I’ve not tried it - but it all looks feasiblle and not very tricky.
the addon class using : ( complete code and more info are in the add on )
public class SpringApplicationServlet extends AbstractApplicationServlet {
All working good , now the question is how in additional to use the ThreadLocal pattern using Spring according to the explain in the Vaadin Book :bashful: