How to inject data into UI?

I use Vaadin in an OSGi environment, without an app server (directly with HttpService). My UI gets initialized and handles requests correctly.
I would like the UI to have access to data from the rest of the application, but I don’t know how the UI should get that reference.
I could use a static MyApp.getData(), but that’s very ugly in my opinion.
I believe, I should inject the relevant data in the VaadinRequest which is passed to init(). But how to do that?
The only class I instantiate extends VaadinServlet and specifies the UI with the @VaadinServletConfiguration annotation (it is registered directly with the HttpService). So I never get to see the requests and so cannot add a data refernce to the VaadinRequest in init().

How should I inject data in my UI?

Thanks Philipp

OK, I think I found a way. In my Servlet which extends VaadinServlet, I can override the service() method, inject my data into the HttpServletRequest which is then wrapped in a VaadinServletRequest. Is this the proper way?

@VaadinServletConfiguration(ui = LocalUI.class, productionMode = false)
public class SimpleVaadinServlet extends VaadinServlet {
    Object data = ...
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setAttribute("myData", data);
        super.service(request, response);
    }
}