0

implicit object "session" sometimes is different with Sessions.getCurrent()

asked 2009-05-05 09:24:33 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Hi guys:
I found that (especially second login with same account) implicit object "session" sometimes is a different object with Sessions.getCurrent().
I also found one of them is _invalided =true

why? is it caused by no invalidate session when logout?

because I have 3 composer , CompanyComposer get user account profile from database and store it in session.
session.setAttribute();
the other 2 composers (RComposer, MyRRComposer) get user account profile from session by sessionScope.getAttribute();

the first time login, everything goes well, but logout and login again.
the page which apply that 2 composers(RComposer, MyRRComposer) can't get the user account profile from session, after I traced the code, I found that session sometimes is the old, invalidated session, and Sessions.getCurrent() will be the current one.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-05-05 09:58:07 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hi hawk,

before my sessions are managed by spring. I must call the following line that the session are cleared:

Sessions.getCurrent().invalidate();

regards
Stephan

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-05-05 09:24:33 +0800

Seen: 291 times

Last updated: May 05 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More