I am porting a Tomcat 4.03 JSP application to a new installation that
has a hardware switch ("BIG-IP") routing requests to multiple CPUs.
The switch checks the incoming IP address and routes the user to the
same computer he used previously, but only if he comes back within a
half hour. After that his request is routed randomly to the next
available server.
The application uses session variables to save data, and sessions can
last more than a half hour. So I wrote some code to serialize the
session variables and store them in a database (a story in itself).
However, I'm getting occasional ConcurrentModificationExceptions,
which makes me wonder if Tomcat is updating the session object from
another thread at the same time as I am (though maybe not, there's
probably another explanation for this and if anyone has one, please
speak up!)
In any case, while perusing through Tomcat source code and Catalina
Javadocs I found a JDBCStore class which seems to do exactly what I'm
trying to do.
My questions are:
1. Should application developers use this class?
2. If not, is there a higher level interface that should be used?
3. Is there a better way to do what I'm trying to do?
Thanks.
--
Alan Meyer
AM Systems, Inc.
Randallstown, MD, USA
[EMAIL PROTECTED]
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com