Community
Participate
Working Groups
Build Identifier: <= 8.1.0.RC2 In web.xml, put a big session time, like 30 days: <session-timeout>43200</session-timeout> Breakpoint in class AbstractSession at line 65: _maxIdleMs=_manager._dftMaxIdleSecs>0?_manager._dftMaxIdleSecs*1000:-1; _maxIdleMs becomes negative because _dftMaxIdleSecs is an integer with value 2592000 seconds and multiplied with the integer 1000. it overlaps. The line should be like below (1000L): _maxIdleMs=_manager._dftMaxIdleSecs>0?_manager._dftMaxIdleSecs*1000L:-1; Reproducible: Always Steps to Reproduce: In web.xml, put a big session time, like 30 days: <session-timeout>43200</session-timeout> Breakpoint in class AbstractSession at line 65: _maxIdleMs=_manager._dftMaxIdleSecs>0?_manager._dftMaxIdleSecs*1000:-1; _maxIdleMs becomes negative because _dftMaxIdleSecs is an integer with value 2592000 seconds and multiplied with the integer 1000. it overlaps. The line should be like below (1000L): _maxIdleMs=_manager._dftMaxIdleSecs>0?_manager._dftMaxIdleSecs*1000L:-1;
If you want big session time, you can use subclass AbstractSession and call just after the constructor super.setMaxInactiveInterval to reset the bad values that has been put in maxIdleMs to the good one. public abstract class SessionSkeleton extends AbstractSession { public SessionSkeleton(HttpServletRequest request) { super(SessionManagerSkeleton.this, request); super.setMaxInactiveInterval(SessionManagerSkeleton.this._dftMaxIdleSecs > 0 ? SessionManagerSkeleton.this._dftMaxIdleSecs : -1); }
thanks. Will be in 7.6 and 8.1