Hi just a quick question about Collections.synchronizedList and synchronizedMap:
Is it necessary to use this for the main lists you might have in your database (like the main list of records or the list of locked records) if you always synchronize before using them? E.g. for my main list of records I have a corresponding Lock that guards it and which must be acquired before modifying it (design rule). This should guarantee that the list will not be modified by more than one thread at once - or is there a need for a synchronizedList? Just to make sure thanks
Johan den Boer
posted 8 years ago
I have used the same technique. Works great with synchronized map. I do my locking per record.
Johan<br /> <br />scjp, scjd
Won't you be my neighbor? - Fred Rogers. tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads