On 1/6/06, Michael Echerer <[EMAIL PROTECTED]> wrote:
> In worst case you won't even achieve what you want using single thread
> mode because according to the servlet specification servlet containers
> are free to pool servlets, if it implements SingleThreadModel. Hence you
> could have multiple pooled instances that be no means guarantee an
> synchronized access to your database in case of simultaneous requests
> hitting different instances.
>
> So SingleThreadModel is deprecated for good reason, since servlet spec
> 2.4 and also for 2.5. You are better of synchronizing yourself. Don't
> rely on SingleThreadModel as an easy way to get around multithreading
> issues.

Nice, but completely wrong. STM in Tomcat uses an instance pool which
allows having a minimal impact (something like 5%), and it will
perform much better than syncing, unless the said sync is trivial.

The reason this is deprecated is because some people thought it would
solve all their syncing problems, while it doesn't address many things
(like session access).

--
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

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

Reply via email to