DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31328>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31328 DeltaRequest unable to handle two concurrent requests per session Summary: DeltaRequest unable to handle two concurrent requests per session Product: Tomcat 5 Version: 5.0.27 Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Catalina:Cluster AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] As described in the javadoc of DeltaRequest.java this class is not thread save. But if you use one DeltaRequest per session, you still have the problem with two (or more) concurrent requests per session and therefor you need to be thread save. Otherwise you will get exceptions like these: java.util.NoSuchElementException java.util.LinkedList.remove(LinkedList.java:579) java.util.LinkedList.removeFirst(LinkedList.java:131) org.apache.catalina.cluster.session.DeltaRequest.addAction(DeltaRequest.java:102) Therefore this class should be at least synchronized to avoid this. But I am not sure if this is enough to solve all possible error scenarios: there are some public methods that should be called in one synchronized block from "outside" an instance, like: synchronize (deltaRequest) { deltaRequest.writeExternal(out); // nobody should be able to use addAction before reset() is called deltaRequest.reset(); } Maybe reset() should be declared private and called in writerExternal(). As a workaround I switched back to SimpleTcpReplicationManager. Please comment. Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]