This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Websphere and the fly likes session.setAttribute for session persistence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "session.setAttribute for session persistence" Watch "session.setAttribute for session persistence" New topic
Author

session.setAttribute for session persistence

david chan
Ranch Hand

Joined: Jun 10, 2002
Posts: 46
Hi,
I have a question about WAS 5 memory-to-memory session persistence:
If I have a user object stored in session in the begining the object created,
Do I need to call session.setAttribute each time the user object got updated, so that it will be updated on other node?
Thanks.
David
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Yes, absolutely, positively. If you do not call setAttribute() it will most certainly NOT get updated. The same, by the way, applies for using a shared database as the session sharing mechanism -- if you don't call setAttribute() it won't get persisted!
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
jQuery in Action, 2nd edition
 
subject: session.setAttribute for session persistence