@Test public void force_session_create() { HttpServletRequest sr = mockHttpServletRequest(); TapestrySessionFactory sf = newMock(TapestrySessionFactory.class); Session session = mockSession(); expect(sf.getSession(true)).andReturn(session); replay(); Request request = new RequestImpl(sr, CHARSET, sf); assertSame(request.getSession(true), session); verify(); }
public Session getSession(boolean create) { if (session != null && session.isInvalidated()) { session = null; } if (session == null) { session = sessionFactory.getSession(create); } return session; }
RequestImpl implements Request { public Session getSession(boolean create) { if (session != null && session.isInvalidated()) { session = null; } if (session == null) { session = sessionFactory.getSession(create); } return session; } }
RequestImpl implements Request { public Session getSession(boolean create) { if (session != null && session.isInvalidated()) { session = null; } if (session == null) { session = sessionFactory.getSession(create); } return session; } RequestImpl(
            HttpServletRequest request,
            String applicationCharset,
            TapestrySessionFactory sessionFactory); }
RequestImpl implements Request { public Session getSession(boolean create) { if (session != null && session.isInvalidated()) { session = null; } if (session == null) { session = sessionFactory.getSession(create); } return session; } RequestImpl(
            HttpServletRequest request,
            String applicationCharset,
            TapestrySessionFactory sessionFactory); List<String> getParameterNames(); List<String> getHeaderNames(); String getParameter(String name); String[] getParameters(String name); String getHeader(String name); String getPath(); String getContextPath(); boolean isSessionInvalidated(); Session getSession(boolean create); Locale getLocale(); long getDateHeader(String name); boolean isXHR(); boolean isSecure(); boolean isRequestedSessionIdValid(); Object getAttribute(String name); List<String> getAttributeNames(); void setAttribute(String name, Object value); String getMethod(); String getServerName(); int getLocalPort(); int getServerPort(); String getRemoteHost(); }
RequestImpl implements Request { public Session getSession(boolean create) { if (session != null && session.isInvalidated()) { session = null; } if (session == null) { session = sessionFactory.getSession(create); } return session; } RequestImpl(
            HttpServletRequest request,
            String applicationCharset,
            TapestrySessionFactory sessionFactory); List<String> getParameterNames(); List<String> getHeaderNames(); String getParameter(String name); String[] getParameters(String name); String getHeader(String name); String getPath(); String getContextPath(); boolean isSessionInvalidated(); Session getSession(boolean create); Locale getLocale(); long getDateHeader(String name); boolean isXHR(); boolean isSecure(); boolean isRequestedSessionIdValid(); Object getAttribute(String name); List<String> getAttributeNames(); void setAttribute(String name, Object value); String getMethod(); String getServerName(); int getLocalPort(); int getServerPort(); String getRemoteHost();  }