File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Persisting Sessions to Database

 
Nathan Hook
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Kaustabh Singha Roy
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic