This is off-topic, but I've never understood why the only two standard
concurrency models are free threaded or single threaded servlets. What I
want most of the time is session level serialization of requests so that
only one transaction may run on a particular HTTP session at a time but
transactions on other http sessions may run concurrently. If this model is
used,  session variables become threadsafe and it seems to work just fine
for the average web-app where the user logs in and does one thing at a time.

I actually implemented a filter in front of the stripes filter to establish
that model for the rest of my application. To avoid eating up request
processing threads, I put a limit on the amount of work that can be queued
against a particular session and a limit on how long the request will wait
for the "right to execute". With that in place,  my team doesn't have to
worry about thread problems with session state and it provides some level of
double submit protection for the action beans (the 2nd submit does not run
in parallel so it will reliably see and act on the complete effects of the
first).

Is there an easier way to get the "single transaction per session" thread
model?


On Fri, Sep 3, 2010 at 5:10 PM, Karen <ka...@kdeveloper.com> wrote:

> -----Original Message-----
> >I looked at Spring 3 briefly and liked what I saw. I didn't dig deep, so I
> can't form a real opinion (there is more to a real web app than a hello
> world form), but at least the "Spring requires too much configuration"
> argument is no longer valid. Spring 3 does its part in using convention
> over configuration, and using annotations instead of XML.
>
> I did notice the same thing. But then I looked closer and noticed that the
> big difference between Stripes and Spring MVC still is, that Stripes action
> beans are threat safe and Spring 3 MVC beans are not threat safe. Just like
> Servlets the Spring MVC beans are singletons with multiple active threats
> running through them. Unlike Stripes they can't use instance variables. Thus
> the Spring beans have to use local variables, a programming model that leads
> to more complex procedural code.
>
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>



-- 
Ross Sargant
Software Engineer
p: 954-623-6015 x2108
email: rsarg...@tvrc.com

TVR Communications LLC
541 S. State Road 7,Suite 5,Margate, Florida,33068

http://www.tvrc.com
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to