Loading into table from thread

I am having a few issues while loading beans into a table from a separate thread, and I am looking for some guidance.

Basically I use a progress bar to update the visual components, while a background thread creates beans from a database and then adds them to a bean container. Sometimes the beans are available quickly, 10 or so per second, and other times they trickle in 1 per 3 seconds.

The problem I have is that the adding of the beans causes the table to jump around, and will also sometimes cause the table to appear blank after the background thread completes. I’ve tried using addall for adding beans to my bean container to delay change events, as well as ICE push. Neither has made loading any smoother.

Has anyone out there experienced similar issues, or can anyone point me to some sample code of the ideal way to load data into a table from a background thread?

Thanks everyone!

Did you synchronize on Application (Vaadin 6) or used VaadinSession#lock() (Vaadin 7)?

Trying this now.