Using EventBus and how to identify that event in the user session

Hi,

I am thinking of using an event bus approach im my app based on the Spring event mechanism to make the diferrent components of the app more loose coupled.
But in doing so I think I will have to have any to identify that a given event message is for a given ui component in a user session, so I will have to inject the user object in evrey component component and pass the useId in every event.
As anyone gone this road, or do you see any downside to this approach.

Thank you, kindly
Luis Oscar

If you are using Vaadin Spring in your application and intent to use Eventbus, I would recommend to check these add-ons. There is Eventbus add-on included.

https://github.com/peholmst/vaadin4spring

Hi Tatu,

Found the vaadin4spring eventbus very good is this currency published or in a maven repo or I have to build it locally ?

Thank you, kindly
Luis Oscar

Check maven repository info below. Note, you need to check version dependencies againsta Vaadin 7 or 8 and Vaadin Spring add-on. https://mvnrepository.com/artifact/org.vaadin.spring.extensions/vaadin-spring-ext-security/2.0.0.RELEASE