Hello everyone!

I think I have found bug in orion 1.5.2.
There is problem with sessions. When I invalidate session and then get new
session, sometimes (not always) I get same invalidated session.
Does anybody have same problem? Any solution except that I remove all data
from session?
Thanks in advance.


Here is code that demonstrates bug:

session = request.getSession(true);
System.out.println("session = request.getSession(false);\t" +
session.hashCode());
System.out.println("session = " + session);
session.invalidate();
System.out.println("session.invalidate();\t" + session.hashCode());
System.out.println("session = " + session);
session = request.getSession();
System.out.println("session = request.getSession();\t" +
session.hashCode());
System.out.println("session = " + session);


Orion's output:

session = request.getSession();    2935133
session = HTTP Session AKAEMHOGAJOD
session.invalidate();   2935133
session = HTTP Session AKAEMHOGAJOD
session = request.getSession();         2935133
session = HTTP Session AKAEMHOGAJOD

Exception is
java.lang.IllegalStateException: Session was invalidated
        at com.evermind.server.http.EvermindHttpSession.setAttribute(Unknown
Source)
        at
isvu.kadrovska.web.command.LoginCommand.execute(LoginCommand.java:161)
        at isvu.kadrovska.web.Kadrovska.doPost(Kadrovska.java:183)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
        at com.evermind._cxb._abe(Unknown Source)
        at com.evermind._cxb._uec(Unknown Source)
        at com.evermind._io._twc(Unknown Source)
        at com.evermind._io._gc(Unknown Source)
        at com.evermind._if.run(Unknown Source)


With tomcat everything works OK.
Tomcat's output:

session = request.getSession();    7616245
session = org.apache.tomcat.session.StandardSession@7436f5
session.invalidate();           7616245
session = org.apache.tomcat.session.StandardSession@7436f5
session = request.getSession(); 4461550
session = org.apache.tomcat.session.StandardSession@4413ee



Denis Kranjcec


Reply via email to