Communication between two applications


I have two separate Vaadin applications, located in two different war files. I need to be able to send data back and forth between these applications. What is the correct way to go about doing this? I have tried just about everything, such as ICEpush and Liferay, but nothing seems to work. Can someone please point me in the right direction?

Thank you,


If you have two separate wars, then it’s best to think of the problem of how to get two completely separate applications to talk to each other - even if they are deployed within the same VM. I guess it depends upon what level of “integration” you need between the two apps : would “events” be sufficient? Or do you want shared data structures?

One tool that we are finding useful at the moment is
(Apache 2 License). It allows you to share maps/lists/queues between multiple VMs, as well as inter-process locking and I believe it also supports pub/sub event broadcasting as well. We’re using it to share metadata and cached data between our webapp and our server app (we have an nTier architecture).

You could also roll your approach using JMS (embed ActiveMQ maybe)? It really depends upon your architecture and requirements.

Depending you needs, you may want to push the updates to the browser (e.g. if a row is added/remove from a table) - that’s where the likes of IcePush et al come in.

I would treat those as separate problems, though - first get the two web-apps to communicate with each other and share data; this is nothing to do with Vaadin, just a general J2EE problem. Once that is solved, then try and address out the Vaadin issues.

Hope that’s of some help.



Hi Charles,

Thanks for the reply. I’ve realized that there is actually no reason for the two applications to be contained in separate war files, and I can actually put them in the same war file, which should simplify the problem. I am also only going to be passing pretty simple data back and forth, namely Strings. Based upon this infrastructure, do you think that Liferay is the way to go, or should I use one of the other methods you suggested? Also, if I do use Liferay, I believe I would need to use WSRP as the two applications will be located on the same server, but at different URLs. Is that correct?


If the apps are in same war and in same server, communications is as simple as normal method calls between the applications.

Liferay has little to do with the communications. If there is no clear need for a portal, you would be better without one. In case you are using a portal: If the applications and the portal are located in the same server, there is no need for WSRP.