>> Just wondering:
>> In the code of ActionServlet I've noticed that the access to the actions
>> member in the method processActionCreate
>> (in the try - block) is not synchronized.
>>

> Currently, "actions" is implemented as a Hashtable, which guarantees thread safe
> behavior for you without having to synchronize at the application level.

Craig,

this is not generally correct. I've posted some thoughts on actions, thread
safety, and the map a few weeks ago to STRUTS_DEV. I had the impression that
you did acknowledge in your answer, that there are (many) potential problems
with the thread safety of ActionMappings, _even if_ a HashTable is used.
So...

> This would be safe even if a HashMap were used, as long as no thread was
> modifying the underlying collection while the ActionServlet was running.

... you probably meant

Actions are safe, as long as no two threads do concurrently modify the
underlying collection while the ActionServlet is running.

-- 
Matthias                        (mailto:[EMAIL PROTECTED])


Reply via email to