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