SOLVED: Requests from different Sessions waiting for each other

Hi all,

i have a really strange problem. We are trying to start some shell programs from a vaadin ui. Upon termination of the shellscript the user will see the output in a label. Different Users should be able to log in from different computers at the same time and execute the program, the programs should run in parallel.

Now the problem:
If User A starts a long-running session of lets say 3 Minutes and User B is also logged in on a different machine. User B can’t do anything at all and sees only the loading icon until User A’s Process is finished.

This can be reproduced easily with the attached test classes and Thread.sleep.

My assumption is that somehow it has todo with servlet concurrency and that the request of User A is kept open until the end of the shellscript and meanwhile the Request of User B is not answered.

How can I get rid of this problem, or how is this dealt with in other applications? I think this should be an issue with every vaadin-Multiuser application, but I just don’t know where to look for the solution.

We are using glassfish 3.1.1 (i also tested it on 3.1.2).

Here are the example classes:

package com.example.vaadinwinestore;

import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;

import com.vaadin.Application;
import com.vaadin.terminal.gwt.server.AbstractApplicationServlet;

@WebServlet(urlPatterns = "/*")
public class VaadinServlet extends AbstractApplicationServlet {
	private VaadinwinestoreApplication application;

	protected Application getNewApplication(HttpServletRequest request)
			throws ServletException {
		return this.application;

	protected Class<? extends Application> getApplicationClass()
			throws ClassNotFoundException {
		return this.application.getClass();

package com.example.vaadinwinestore;


import javax.ejb.LocalBean;
import javax.ejb.Stateful;
import javax.enterprise.context.SessionScoped;

import com.vaadin.Application;
import com.vaadin.terminal.ExternalResource;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Window;

public class VaadinwinestoreApplication extends Application implements Serializable{
	public void init() {
		setMainWindow(new StoreWindow());

package com.example.vaadinwinestore;

import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;

public class StoreWindow extends Window implements ClickListener {
	Label display = new Label("Init");
	public Label servlet = new Label("servlet");
	Button longclick = new Button("long process");
	Button shortclick = new Button("short process");
	/* (non-Javadoc)
	 * @see com.example.vaadinwinestore.VaadinwinestoreInterface#init()
	public StoreWindow() {
		this.addComponent(new Label(this.toString()));

	/* (non-Javadoc)
	 * @see com.example.vaadinwinestore.VaadinwinestoreInterface#buttonClick(com.vaadin.ui.Button.ClickEvent)
	public void buttonClick(ClickEvent event) {
		// TODO Auto-generated method stub
		if(event.getButton() == longclick) {
			try {
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
			display.setValue("longclick finished");
		if(event.getButton() == shortclick) {

This morning I found a thread which deals with the topic. So this can be considered closed.