From e6cfd3ae001bc870a1480ef9e9c729e1b11fe5ef Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Tue, 18 Jun 2013 18:54:31 +0300 Subject: Reinitialize pendingAccessQueue after deserialization (#12097) Change-Id: I5e6d192093f19df1a07e95dff643babd6f532426 --- server/src/com/vaadin/server/VaadinSession.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index 82f245594f..504788d479 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -203,7 +203,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * session is serialized as long as it doesn't happen while some other * thread has the lock. */ - private transient final ConcurrentLinkedQueue pendingAccessQueue = new ConcurrentLinkedQueue(); + private transient ConcurrentLinkedQueue pendingAccessQueue; /** * Create a new service session tied to a Vaadin service @@ -1250,6 +1250,11 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @return the pending access queue */ public Queue getPendingAccessQueue() { + if (pendingAccessQueue == null) { + // pendingAccessQueue is transient, so will be null after + // deserialization + pendingAccessQueue = new ConcurrentLinkedQueue(); + } return pendingAccessQueue; } -- cgit v1.2.3