diff options
author | Artur Signell <artur@vaadin.com> | 2015-10-05 19:58:28 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-10-07 06:54:21 +0000 |
commit | 1ba6dec41c2f02afbed81a1369c35e7a940c6720 (patch) | |
tree | ec27937cdbcf05111754a4901b921df479a5479f /server/tests | |
parent | 6a0919f6680eabb8dae0878854f45c2c67932b39 (diff) | |
download | vaadin-framework-1ba6dec41c2f02afbed81a1369c35e7a940c6720.tar.gz vaadin-framework-1ba6dec41c2f02afbed81a1369c35e7a940c6720.zip |
Move session store/load/remove logic to service from session (#9782, #18998)
The session storage logic when implemented in VaadinSession was and must be
partly static. This makes it impossible to override the storage logic.
To be able to support storage customizations for portals (storing using
APPLICATION_SCOPE), the logic was moved to VaadinService.
For portals, all storage operations now use APPLICATION_SCOPE. Previously
only the store operation was done using APPLICATION_SCOPE, leading to
some portals not being able to load the session at all (the default
scope for reading attributes in portals is PORTLET_SCOPE).
Change-Id: I3d112608d98c883a457e650c0a25bf10c81acc78
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java | 2 | ||||
-rw-r--r-- | server/tests/src/com/vaadin/server/VaadinSessionTest.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java b/server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java index 0e094bfabb..38f3b85043 100644 --- a/server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java +++ b/server/tests/src/com/vaadin/server/VaadinPortletServiceTests.java @@ -200,7 +200,7 @@ public class VaadinPortletServiceTests { when(mockLock.isHeldByCurrentThread()).thenReturn(true); WrappedSession emptyWrappedSession = Mockito - .mock(WrappedSession.class); + .mock(WrappedPortletSession.class); when(emptyWrappedSession.getAttribute("null.lock")).thenReturn( mockLock); VaadinRequest requestWithUIIDSet = Mockito diff --git a/server/tests/src/com/vaadin/server/VaadinSessionTest.java b/server/tests/src/com/vaadin/server/VaadinSessionTest.java index fa7e892066..4944d37856 100644 --- a/server/tests/src/com/vaadin/server/VaadinSessionTest.java +++ b/server/tests/src/com/vaadin/server/VaadinSessionTest.java @@ -93,7 +93,7 @@ public class VaadinSessionTest { }; session = new VaadinSession(mockService); - session.storeInSession(mockService, mockWrappedSession); + mockService.storeSession(session, mockWrappedSession); ui = new UI() { Page page = new Page(this, getState(false).pageState) { |