vaain 7 - osgi contribution

Currently i am writing a contribution for vaadin to provide OSGi services that allow to register SessionInitListeners at the vaadin core.


http://dev.vaadin.com/ticket/10061

Any hints and discussions are welcome.

Best, Florian

Any progress in this Topic?

I’m interesting an OSGI solution for Vaadin 7.

As far my Idea is based on the #10061 Ticket is the following:

extend the VaadinServlet and override the servletinitialized Method, and add a custom SessionInitListener.

	@Override
	protected void servletInitialized() throws ServletException {
		super.servletInitialized();
		super.getService().addSessionInitListener(new OSGISessionInitListener());
	}

This custom sessionInitListener can provide the custom UIProvider for Vaadin like this:

public class OSGISessionInitListener implements SessionInitListener {
	@Override
	public void sessionInit(SessionInitEvent event) throws ServiceException {
		event.getSession().addUIProvider(uiProvider);

	}
}

As far as I see the problem is with this solution, it is not handling the osgi bundle dynamism.