Why a long process locks the current user session?

Hi all,

My application starts a long search in database when the user clicks on one button at View 1, then I can see the waiting icon changing from yellow, to orange, and red color…

If I try to open another tab ou window into my browser, Vaadin locks the application and I can’t open my application to navigate to View 2 while the process in View 1 is still running. I noticed debugging Vaadin classes it’s because the VaadinService class can’t get lock Session from current UI.

Why it happens? Web application is not multi-thread by nature? Is there any why to solve this behaviour?

I’d appreciate any help.

thanks…

Ofbiz-

Whenever doing large tasks, make sure that you do that task in a background thread and then push your changes. Check out the book
link
. Make sure you access the UI correctly in order to properly access a lock when pushing. I use manual push which gives me the full control of when the update happens.

I typically try and run a process in a background thread if it takes longer than a few seconds.

Regards,
Eric