There does not seem to be anything in the code snippet you posted below to
indicate that your code is not thread-safe, but it all largely depends on
the implementation of the EnvironmentManager and any dependent classes. On
the assumption that the manager is implemented in the standard fashion, then
it is inherently stateless so can safely be accessed by multiple threads.
Mike
On 1/15/07, maskkkk <[EMAIL PROTECTED]> wrote:
Hello all,
I'm not sure if the following code in my controller is thread-safe,
could you please explain to me why, or why it isn't, thread-safe?
EnviromentController wrote:
>
> ...
> private EnvironmentManager envMgr;
> ...
> /**
> * TODO: FIND OUT IF THIS IS ACTUALLY THREAD SAFE!
> */
> protected void initBinder(HttpServletRequest request,
> ServletRequestDataBinder binder)
> {
> EnvironmentPropertyEditor epe = new EnvironmentPropertyEditor();
>
> // TODO: THIS LINE REALLY MAKES ME WONDER
> // IF THIS IS THREADSAFE!
> epe.setEnvironmentManager(envMgr);
>
> binder.registerCustomEditor(Environment.class, "environment",
epe);
>
> super.initBinder(request, binder);
> }
>
Thank you,
Andrew J. Leer
--
View this message in context:
http://www.nabble.com/Thread-Safey-and-Binding-tf3015849s2369.html#a8375140
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]