• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Do servlet servers sill have trouble with sessions?

 
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many moons ago I worked on a servlet intensive project using JRun. After a lot of frustration we discovered that the JRun servlet session stuff had some serious problems and we had to handle sessions manually.
Later, I found out that the new JRun stuff had not fixed the problem. Then, talking to some engineers using other J2EE servers, discovered that this is a very common problem.
Now I'm about to get hip deep in a new project that will require sessions. Should I roll my own or should I trust the built in stuff?
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't say that I've had any problems with sessions in the last couple of years to be honest. Perhaps with the early Tomcat and WebLogic releases but nothing recently.
Simon
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We run JRun 3.1 with no noticable problem with sessions. You do have to be sure all of the objects in the session are serializable.
Bill
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No other Server that I know of has any problems with sessions, even when clustered. There's just two rules to live by:
(1) Make everything in them serializable (and use transient fields for things that aren't).
(2) If you're using clustering, keep the sessions relatively small in total size (<16K each) for performance reasons.
Kyle
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul
Can you remember any specifics at to what the issues were?
Thanks
 
paul wheaton
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I remember that we had an applet that needed access to the session. Since the applet was treated by the server as a seperate session, we would get the browser session ID and pass it to the applet. The applet would pass that to the server when it needed information and the session would be pulled up by ID. Sometimes passing in the right ID gave you back somebody else's session.
It seems there were some other problems that I cannot remember.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you describe might have been caused by sloppy coding using servlet instance variables or otherwise mixing up objects outside the session mechanism.
Bill
 
paul wheaton
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know that in the end it turned out to be bugs within JRun. When bringing the issue up with other engineers over the year or two afterward, I came to the conclusion that it was a common problem and many folks had ended up rolling their own session management (not always a light task).
 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I run 5 different sites that rely heavily on sessions & have NEVER had a problem with them. I use Linux, Cobal & Webppliance servers, Tomcat & Resin servlet engines.... I even have one that dumps hundreds of rows from a db into an object, then session so the cust so go thru one record at a time approving them.....never even blinks!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic