• 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

Persisting Sessions to Database

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The company I am working for is trying to get our application to Enterprise strength and have been working on server failover issues. I've never had to solve a solution like this before and was hoping for some advice.

As of right now I'm not a fan of the current clustering solution that is offered by tomcat and have decided to try and use the PersistentManager/JDBCStore solution.

Please see the following link for an example:

http://www.ingrid.org/jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/JDBCStore-howto.html

Unfortuanantly using the PersistentManager the HttpSession gets written to the database about 10 to 15 seconds after a new HttpSession gets created.

We wrote a custom HttpSessionAttributeListener that listens for the one attribute we actually store in our HttpSession and when we receive that event we persist the session to the Database.

Will this solution work for server failover for an Enterprise system?

I like this solution because in theory we don't have to ever worry about adding clustering to the server.xml and in theory we don't ever have to worry about bringing down a server or set of servers if we need to.

Thank you for your time.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have doubt how useful the Listener concept will be in case of a server failure. The listener too in running under the server and when the server itself is not stable then...

Sorry don't have much to contribute.
 
reply
    Bookmark Topic Watch Topic
  • New Topic