From 5b69c166f29d228581f23d5e21ba41366336fc07 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Thu, 28 Sep 2017 16:38:20 +0300 Subject: [PATCH] Revert "Store Vaadin session after each update" (#10112) This reverts commit 48e202a80653c2c8a9e31db11814d23b87d6ec19. Also reverts the related release notes update. --- all/src/main/templates/release-notes.html | 1 - .../java/com/vaadin/server/VaadinSession.java | 4 ---- server/src/test/java/com/vaadin/ui/UITest.java | 17 ----------------- 3 files changed, 22 deletions(-) diff --git a/all/src/main/templates/release-notes.html b/all/src/main/templates/release-notes.html index 36ed08ad6b..8db3ef8670 100644 --- a/all/src/main/templates/release-notes.html +++ b/all/src/main/templates/release-notes.html @@ -93,7 +93,6 @@
  • The browser time zone can be obtained from WebBrowser if the browser supports it
  • AbstractDateField now supports formatting of time zone information
  • PushState based navigation support
  • -
  • VaadinSession is now stored to the HTTP session at the end of each access to support clustering
  • Grid WAI-ARIA support has been improved (aria-sort added)
  • Client side ErrorLevel support
  • VaadinService, VaadinServlet and VaadinServletService have protected no-args constructors to make DI integrations simpler
  • diff --git a/server/src/main/java/com/vaadin/server/VaadinSession.java b/server/src/main/java/com/vaadin/server/VaadinSession.java index d3da73d993..a49c286f4a 100644 --- a/server/src/main/java/com/vaadin/server/VaadinSession.java +++ b/server/src/main/java/com/vaadin/server/VaadinSession.java @@ -1035,10 +1035,6 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { + ui.getUIId(), e); } - // Store session after modifications have been done so that - // Spring Session and possibly other implementations realize - // that something has changed inside the session attribute - service.storeSession(this, session); } } } finally { diff --git a/server/src/test/java/com/vaadin/ui/UITest.java b/server/src/test/java/com/vaadin/ui/UITest.java index f2fcdcb055..8bc3c98470 100644 --- a/server/src/test/java/com/vaadin/ui/UITest.java +++ b/server/src/test/java/com/vaadin/ui/UITest.java @@ -8,9 +8,7 @@ import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import javax.servlet.ServletConfig; -import javax.servlet.http.HttpSession; -import org.easymock.EasyMock; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; @@ -22,7 +20,6 @@ import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServlet; import com.vaadin.server.VaadinServletService; import com.vaadin.server.VaadinSession; -import com.vaadin.server.WrappedHttpSession; import com.vaadin.server.communication.PushConnection; import com.vaadin.shared.communication.PushMode; import com.vaadin.util.CurrentInstanceTest; @@ -178,21 +175,7 @@ public class UITest { VaadinServletService service = new VaadinServletService(servlet, deploymentConfiguration); MockVaadinSession session = new MockVaadinSession(service); - HttpSession mockHttpSession = EasyMock.createMock(HttpSession.class); - WrappedHttpSession mockWrappedSession = new WrappedHttpSession( - mockHttpSession) { - @Override - public Object getAttribute(String name) { - String lockAttribute = service.getServiceName() + ".lock"; - if (lockAttribute.equals(name)) { - return session.getLockInstance(); - } else { - return super.getAttribute(name); - } - } - }; session.lock(); - session.refreshTransients(mockWrappedSession, service); ui.setSession(session); ui.doInit(Mockito.mock(VaadinRequest.class), 1, "foo"); session.addUI(ui); -- 2.39.5