By multiple threads of activity do you mean the user has multiple windows
open? If so, perhaps in the user's session you could have a Map of business
logic beans instead of just one. And somehow have the client identify which
thread of activity the currenty action is part of, from there get the
apprpriate bean and you're back in single-threaded mode (o: Then again, if
this isn't what you mean, then thats probably no use!
is that what you mean?
cheesr
dim
On Wed, 20 Jun 2001 08:08, Russ Freeman wrote:
> Hi folks, I have a question about building robust beans.
>
> Context:
> Building a Model-2 application with tomcat that uses a home-grown MVC
> framework (probably going to replaced with struts).
>
> My concern is over the design of my business logic beans, which are
> stateful controllers. Each of my user sessions can have one or more of
> these beans and each represents a separate thread of activity for the user.
>
> This is working OK except for the threading issue in that multiple requests
> (accidentally) sent the to same controller cause obvious problem. I have
> since added a level of synchronization and am hoping this will deal with
> most problems. Something I certainly don't want to do is to move away from
> stateful controllers (to avoid the threading problem) because I believe
> this is the right approach.
>
> Also from reading the struts docs carefully it appears that this is still
> something that must be considered with struts, i.e. once the Action object
> has passed on control to a bean, the bean has the concurrecy problem to
> deal with.
>
> So,
> I would be interested in people's opinion on their approach to managing
> concurrency in controller/business logic beans.
>
> Thanks in advance,
> Russ