0
votes

I'm having a stale attribute with the http session within Websphere 6 and may be related to in memory session replication..

Steps:

  1. Object A.0 - Placed into the session with ID "ABC"
  2. Remove A.0 from the session..
  3. Object A.1 (New instance) - placed into Session with ID "ABC"
  4. retrieve object with ID "ABC" from the session - RESULT: A.1 (Correct)
  5. carry out a Servlet forward or a redirect (issues seen on both functions)..
  6. retrieve "ABC" from the session - RESULT: A.0, the object that was removed from the session..

Notes -

  • Same Session object (hashcode/session ID) used in steps 1-5 using in memory replication across 2 JVMs (single cluster)
  • time duration between steps 2 & 5 is total of 4 seconds
  • No other external threads have accessed the session in the interim..
  • Only noticed for 1 specific use-case; haven't encountered this in
    other use-cases..

Anyone seen anything like this before where a stale data is being returned from the websphere application server?

Thanks,

Ian.

1
Ian you got you make yourself clear. I am unable to comprehend the steps(or issues as you call it)Manglu
Are you using a web server with the WebSphere plugin? The replication would only be a factor if you've actually switched cluster members, which, if you're using the WebSphere plugin, you shouldn't do as long as a session is active. Have you customized any of the session settings? Like, what are your Session Management > Custom tuning parameters?dbreaux

1 Answers

0
votes

Are you explicitly writing the changed object back to the session before you forward/redirect? In at least some versions of WebSphere, in some configurations, you must do this to ensure the change is "committed".

(If I find a clear reference for this, I'll update my answer.)