Integrating two vaadin applications

Hi,

Are there any guidelines on how to integrate two vaadin applications ?

We have two applications, each with it’s own menu bar. We would like that some of the menu items start the other application, in the same browser window.

At this moment we do this by using com.vaadin.server.Page.open() method:


URLFragmentPair url = new URLFragmentPair(“#!WinCalendar”);
Page.getCurrent().open(URL + url.toFragment(), “_blank”);

This seems to be working.
We have noticed that :
. the httpsession remains the same
. vaadin starts new windows (the v-uiId changes)

Can this have an impact on the HEARTBEAT’s ?
Is it possible to avoid that new windows are created ?

In short we would like to be adviced if this way of integrating two vaadin applications is correct.

Greetings,
Ivan Belis

The HTTP session is shared, because both applications are packaged inside the same WAR file. If they are deployed separately, then also separate HTTP sessions are applied.

The second application opens up in a new window, because you have the target “_blank” (which means “open up in a blank page”). Try removing it.

Heartbeats are what keep track of UIs. If you have two windows open, then you’ll have two UI instances, each with their own heartbeats. If you open a new UI instance in the same browser window, then you will not get heartbeats to the first UI instance.

Could you please elaborate a bit on what you are trying to achieve? What do you mean by integrating two applications? Just combine them into on app?

It are two different apps, each with it’s own ear file, deployed on weblogic, via menu-items we allow the users to switch between the two applications, navigating directly to specific windows in the app.

We have menu items that opens the other vaadin app in the same window, using null instead of _blank.

Page.getCurrent().open(SURL + “#!WinTasks” + "/timestamp,null);

I’ve noticed that after that switch, the browser will no longer sent HEARTBEAT’s to the first application.
This is fine because if the user goes back to the first app, using the same menu items (and .open() method), vaadin will create a new UI.

I am asking this because we receive sometimes a ‘communicatin error’. At this moment we do not have a repeatable scenario for this but i was suspecting that alternating between the two apps has something to do with the error.
Therefore i woul like inform if using the .open() on another vaadin application is good practice or not.

PS: there is a known communication problem with the back button, but that’s anther issue