Hello all, I have extended the AxisHttpSession class form Glen
Daniels, cause the Method touch is missing some logic. Now it is possible to touch the session, and the new timeout
of the session (HttpSession) will move foreward. Therefore I have also changed the constructors of the
class. I hope you will take this changes in further axis
releases and like it. If you don't like it - you are free to
kick it. The following is the code to generate new Session in
my SessionHandler: private
synchronized
String getNewSession(MessageContext
context){ wsLogger.debug("[Methode: getNewSession()] -
Enter method"); HttpServletRequest request = (HttpServletRequest)
context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST); HttpSession httpSession = request.getSession(true); int
sessionTimeoutParam = Integer.parseInt((String) this.getOption("sessionTimeout")); if(sessionTimeoutParam != 0){ defaultSessionTimeout = sessionTimeoutParam; } AxisHttpSession session = new AxisHttpSession(httpSession, defaultSessionTimeout); String id =
session.getSessionID(); wsLogger.debug("[Methode: getNewSession()] -
New session was generated with ID : " + id); session.set("listener", new SessionTimeoutNotifier()); activeSessions.put(id, session); return id;
} Thanks Thomas |
AxisHttpSession.java
Description: Binary data