380866 maxIdleTime set to 0 after session migration
This commit is contained in:
parent
58dd9c3bf1
commit
97fffb4e6a
|
@ -77,6 +77,7 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI
|
||||||
_accessed=accessed;
|
_accessed=accessed;
|
||||||
_lastAccessed=accessed;
|
_lastAccessed=accessed;
|
||||||
_requests=1;
|
_requests=1;
|
||||||
|
_maxIdleMs=_manager._dftMaxIdleSecs>0?_manager._dftMaxIdleSecs*1000L:-1;
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("new session "+_nodeId+" "+_clusterId);
|
LOG.debug("new session "+_nodeId+" "+_clusterId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,11 +111,11 @@ public abstract class AbstractSessionMigrationTest
|
||||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
|
||||||
{
|
{
|
||||||
HttpSession session = request.getSession(false);
|
HttpSession session = request.getSession(false);
|
||||||
if (session == null) session = request.getSession(true);
|
|
||||||
|
|
||||||
String action = request.getParameter("action");
|
String action = request.getParameter("action");
|
||||||
if ("set".equals(action))
|
if ("set".equals(action))
|
||||||
{
|
{
|
||||||
|
if (session == null) session = request.getSession(true);
|
||||||
int value = Integer.parseInt(request.getParameter("value"));
|
int value = Integer.parseInt(request.getParameter("value"));
|
||||||
session.setAttribute("value", value);
|
session.setAttribute("value", value);
|
||||||
PrintWriter writer = response.getWriter();
|
PrintWriter writer = response.getWriter();
|
||||||
|
@ -125,6 +125,8 @@ public abstract class AbstractSessionMigrationTest
|
||||||
else if ("get".equals(action))
|
else if ("get".equals(action))
|
||||||
{
|
{
|
||||||
int value = (Integer)session.getAttribute("value");
|
int value = (Integer)session.getAttribute("value");
|
||||||
|
int x = ((AbstractSession)session).getMaxInactiveInterval();
|
||||||
|
assertTrue(x > 0);
|
||||||
PrintWriter writer = response.getWriter();
|
PrintWriter writer = response.getWriter();
|
||||||
writer.println(value);
|
writer.println(value);
|
||||||
writer.flush();
|
writer.flush();
|
||||||
|
|
Loading…
Reference in New Issue