DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12741>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12741 Multithreaded Axis client causes serialization exceptions in Axis service ------- Additional Comments From [EMAIL PROTECTED] 2002-09-25 20:49 ------- Your change had no effect. The reason is that you are still not synchronized at one more point of contention. The start of the getSerializerAs method has this code: // Need to add code to check against mechanisms vector. if (share && ser != null) { return ser; } ser = null; // Try getting a specialized Serializer ser = getSpecialized(mechanismType); When the "share" flag is true multiple threads may execute this code and attempt to "getSpecialized" or "getGeneralPurpose" multiple times when once would be enough. In this case you are no longer having the benefit of getting something only the first time. This pattern of checking for "== null" and then calling the get methods is obvious in many places in this code. I believe you either have to put back the synchronized keyword on the getSerializerAs method or try to get all instances of "== null" synchronized individually. As an experiment I put the synchronized keyword at the getSerializerAs method and removed it from the individual code blocks. The result was nil. The real performance benefit was the application of the test for the boolean "firstCall" that was used in the original design before your changes. I believe it eliminated a lot more duplicate calls that are obviously happening as a result of your changes. Maybe it would be beneficial to examine the code as it was before your changes and try to apply the synchronized keyword in the appropriate locations if not at the public interface methods.