Bob Lee wrote:

I assume this is a bug then, because there's no way for me to do this. It has to be done within Struts.

It depends on what precisely you think needs to be synchronized:

* Adding attributes to the session, or removing them from the session:
 The servlet container takes care of that for you; nothing we need to do.

* Calling methods on beans in session scope. In general, any synchronization
here is the responsibility of your application, because there is no way for a
framework to know what's required. In the particular case of form beans:


 - For standard ActionForm beans, it is your responsibility to synchronize
   for yourself if you need it.  Typically it won't be required for simple
   properties, however, because the ultimate assignment to an instance
   variable inside the bean is idempotent.

- For DynaActionForm beans, the internal HashMap is *not* synchronized
(which is what you really want if you use request scope form beans; the
recommended practice). If you want to use DynaActionForm beans in
session scope, and there is the potential for multiple requests posting to
such a form bean at the same time, synchronization *should* be employed.
I would suggest entering a bug report suggesting we add a property to
DynaActionForm that enables this if you need it. In the mean time, you can
also subclass DynaActionForm and add "synchronized" modifiers on the
methods that matter (contains, get, remove, and set).


Craig

Bob

Kris Schneider wrote:

Nope, don't think so.

Quoting Bob Lee <[EMAIL PROTECTED]>:



Does Struts synchronize on session-scoped forms? For example, can I assume that Stuts won't modify the fields on a session-scoped form in response to one request while an action is still using it?

Thanks,
Bob







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to