At 01:42 PM 12/16/2002, you wrote:
I may be wrong, but from what CB has said, it sounds like he *wants* a single instance of TrafficCop -- much like a director to handle which requests get served in which order, perhaps. I say that because (1) He already has a single instance and (2) He already made the add() method synchronized and (3) The method is add(), implying that perhaps he's appending or gathering information in a multi-threaded way.The fact that the add() method is syncronized has no impact on this - only one request is updating at a time. However, later when you ask for the value that was updated, you only get the second value because there is only one trafficCop object to get updated because it is a child of the single servlet.
That said, there's nothing inherently wrong with what he's doing and I think it took quick to blame what he's seeing on this arrangement. To make a conclusive argument, I think we'd have to see the TrafficCop object's code.
justin
I hope this helps, but I am having a hard time explaining it so if it does not, we will keep working on it. :-/Larry
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
