Integrating Spring service layer with Vaadin

I recently started looking for a way to integrate Spring service layer with Vaadin. I didn’t find any existing solution that would suit my needs. Compile-time bytecode weaving seemed too heavyweight and other examples only showed working solution for injecting beans into the main Application object. I simply wanted to get my Vaadin component’s annotated fields to be auto-wired.

A came up with a simple solution using two of Spring’s servlet lifecycle listeners and a custom injector used during component initialization. This way any Vaadin component can have annotated fields automatically injected and available for use in component code. The solution is described in more detail at
http://psponcoding.blogspot.com/2011/03/vaadin-spring-integration.html
.

For any one of you struggling with Vaadin Spring integration, go and have a look!

In your Injector class, you use AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT which is deprecated.
Any alternative solution?

Maybe you can choose AUTOWIRE_BY_NAME instead of AUTOWIRE_AUTODETECT.

Hope this helps

Javi.