• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

WAS4.0 AE - Persistent session on single node

 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have the following scenario/problem:
I have configured persistent sessions for my application - a single app server running on a node and not in a server group. I have set the session mangement to write the session to the database after the end of every servlet service() method. I then connect to the webapp with a browser and a session is created - the SESSIONS table in the database has rows associated with the session ID that is returned. This is correct and what I expect to see. My session management (except for the persistence) has default settings
As a test I leave my browser open and stop the app server. I then restart the app server a couple of seconds after it has stopped and then click on the browser page to see the contents of my shopping cart. However, despite the fact that the session ID is the same an empty shopping cart is displayed.
Since I have set logging to Trace' in the web server plugin config file I can see that the session ID is received at the web server and sent on to WAS for processing. I can also see that it matched the CloneID that is attached to the session ID and sent it to the correct server.
My questions are:
Why was my shopping cart empty when the session was persisted to the database?
If I shutdown an application/app server rather than it failing are all sessions invalidated even if they have not timed out?
Does this single node need to be part of a Server Group in order for the app server to look in the database for the persisted session?
Thanks in advance for your help,
Steve
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe a dumb question, but is the data you are attempting to save in the session serializable? If you are using a complex object graph to represent the shopping cart contents, then you need to be sure that the whole thing is serializable, otherwise it won't/can't be persisted.
Matt
 
Steve Granton
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Yes the objects are serializable - we've migrated the application from a clustered setup on Weblogic 6.1 and it was working fine there. Also, I wouldn't expect it to be able to write any data to the SESSIONS table in the database if the object was not serializable (there is data in there) - I would expect an exception to be thrown.
WAS seems to be having a problem when it should be retrieving the session from the database as it isn't in its memory?
Can anyone else offer a solution?
Cheers,
Steve
[ May 14, 2002: Message edited by: Steve Granton ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic