/** * Stores this VaadinSession in the HTTP session. * * @param service * The service this session is associated with * @param session * The HTTP session this VaadinSession should be stored in * @deprecated as of 7.6, call * {@link VaadinService#storeSession(VaadinSession, WrappedSession)} * instead */ @Deprecated public void storeInSession(VaadinService service, WrappedSession session) { service.storeSession(this, session); }
serviceSession.getLockInstance()); service.storeSession(serviceSession, newSession); serviceSession.setAttribute(PRESERVE_UNBOUND_SESSION_ATTRIBUTE, null);
/** * Creates and registers a new VaadinSession for this service. Assumes * proper locking has been taken care of by the caller. * * * @param request * The request which triggered session creation. * @return A new VaadinSession instance * @throws ServiceException */ private VaadinSession createAndRegisterSession(VaadinRequest request) throws ServiceException { assert ((ReentrantLock) getSessionLock(request.getWrappedSession())) .isHeldByCurrentThread() : "Session has not been locked by this thread"; VaadinSession session = createVaadinSession(request); VaadinSession.setCurrent(session); storeSession(session, request.getWrappedSession()); // Initial WebBrowser data comes from the request session.getBrowser().updateRequestDetails(request); // Initial locale comes from the request Locale locale = request.getLocale(); session.setLocale(locale); session.setConfiguration(getDeploymentConfiguration()); session.setCommunicationManager( new LegacyCommunicationManager(session)); ServletPortletHelper.initDefaultUIProvider(session, this); onVaadinSessionStarted(request, session); return session; }
serviceSession.getLockInstance()); service.storeSession(serviceSession, newSession); serviceSession.setAttribute(PRESERVE_UNBOUND_SESSION_ATTRIBUTE, null);
/** * Creates and registers a new VaadinSession for this service. Assumes * proper locking has been taken care of by the caller. * * * @param request * The request which triggered session creation. * @return A new VaadinSession instance * @throws ServiceException */ private VaadinSession createAndRegisterSession(VaadinRequest request) throws ServiceException { assert ((ReentrantLock) getSessionLock(request.getWrappedSession())) .isHeldByCurrentThread() : "Session has not been locked by this thread"; VaadinSession session = createVaadinSession(request); VaadinSession.setCurrent(session); storeSession(session, request.getWrappedSession()); // Initial WebBrowser data comes from the request session.getBrowser().updateRequestDetails(request); // Initial locale comes from the request Locale locale = request.getLocale(); session.setLocale(locale); session.setConfiguration(getDeploymentConfiguration()); onVaadinSessionStarted(request, session); return session; }