Notify Vaadin application about data changes

I am looking for general suggestion nothing specific.

I have an application which displays a table grid with data from a database, what I am trying to do is to update this table when data changes in the database without constantly refreshing the table, I want to refresh the table only when the data changes.

I have an external application which monitors the database and knows where there are changes, so my question is how can I notify Vaadin application from this external app about the data changes? And how would I listen for these external messages in Vaadin application.

I imagine when I open the page which contains the table data grid the Vaadin app will have to make a call to the external application and say here I am send me the messages. (Not sure how to do that)

Any suggestions or pointers will be appreciated!

Thank You.

There are several ways. If the external application is not running on the same machine, you can take advantage of the fact that your Vaadin application is running as a web application and simply send an Http request to your Vaadin application. You would add a servlet to your Vaadin app to handle the request. The request could include data that your Vaadin application needs to know. There are many tools to automate the generation of such web services.

Another way, if you need guaranteed delivery, is to use JMS to deliver the message.

Thanks for ideas, that’s what I needed.

I think I’ll will go the JMS way.