Automatically check for incompatible scopes for Vaadin components
A bean that is also a Vaadin Component will typically not work with any other scopes than prototype, view or UI. In any other case, the component will either be unexpectedly destroyed (e.g. request scope) or accidentally attached to multiple UIs (e.g. session or singleton). Especially singleton is quite often used by accident since it's the default scope.
To help users from debugging the relatively cryptic error messages you get when attaching a component to multiple UIs, we could instead implement e.g. a BeanFactoryPostProcessor that checks through all registered beans and fails with a clear error message if there are incompatible beans. We might also want to provide an annotation that can be used in the theoretical cases when such beans should still be permitted.