Vaadin7 - Root OSGi support


right now i am writing an OSGi integration for vaadin 7.

The Application is prepared like the vaadin 6 OSGi integration does.

By vaadin 7 OSGi integration the Root object is provided by a declarative OSGi service.

I have to ensure, that the componentFactoryInstance will be disposed after the removal of a root. But i can not find any code in Application.class that does so. It seems that Root objects will never be removed again.
What is about closing a tab? Will the object be recycled?

Florian Pirchner

In the current alpha release, Roots are never removed and will thus be kept in memory until the Application is closed or the session timeout occurs.

The main reason for this is that the framework can’t detect when a tab is closed as Opera doesn’t support the unload event. Even for browsers where the unload event is supported, the Root might still be required if root preserving is enabled (Application.setRootPreserved) and the user returns to the page after the unload event (e.g. if the page is refreshed or if the user navigates back to the application after visiting some other page).

The roadmap for alpha3 (due in a couple of months) contains improvements to session handling and support for server push. We are planning to use these features to keep track of whether a Root is still in use and allow defining a timeout after which the Root will be released if it hasn’t contacted the server. This is covered by ticket

Thanks! Will start with a basic implemenation and will enhance the vaadin OSGi integration for all further releases and changes to that issue.

Florian Pirchner

When will the OSGI support for Vaadeen7 be available?



sorry for the late answer. It is already available in the redVoodo git repository - branch uikit_libo.


Following bundles are required:

// demos the use of the bundles

Florian Pirchner


I am trying to figure out how to deploy the bundles.
I cloned the repository branch you mentioned.
What I see is that the version number for vaadin in the META-INF for application is 6.6.7, I am changing it to the one I find in the latest jar file.

Can you please give me quick steps to how to get this working? Do I need to create the jar files for each of these bundles and then deploy those, along with the demo bundle?

  • Anu


thanks for you answer!

I am going to create a new repo that contains only the bundles mentioned below. Then i will write a little blog about it that shows how to run that stuff.

But will take until weekend. Currently i am in a hurry.

Will post here again after weekend.


Thank you so much Florian, look forward to new repo.

  • Anu

Hello Florian,

I am badly stuck at a minor point, (not so minor really), the getRoot method is called (by application), however, it does not display any thing.
Any clue where I am going wrong, I have all your code implemented.

  • Anu

Hi Anu,

i have prepared a simple download with install instructions.

Just download “vaadin7 osgi demo - HowTo.pdf” and “vaadin7 osgi” from

Then follow the instructions from the pdf. Only a few steps to run the demo.

If you have any questions reqarding installation, you are welcome to send me an email. It is contained in the .pdf.

I hope it will work without any troubles.

Best, Florian

Thanks Florian, I will try this today. I got it working yesterday, but my servlet did not work as a factory.
I sure want to find out how to get it working.
Thanks for all your help. Will let you know how it goes.

  • Anu

Anu could make it run. Was really strange.

Changing the reference bind made it run:
My reference bind:

Anus reference bind which also works for felix.

Only the name of the reference is different. Maybe equinox and felix do some different interpretations?

Dear Florian,
currently i am looking for a possibility to integrate vaadin7 in osgi.
Through the google search i found your solution.
Sadly the link was dead.
Is there any other download providing your solution including your pdf?
With kind regards,
John Winkler

Hi John,
i am sorry. I missed your entry. Well, see!/thread/3201578
for newest information.

Best Florian