nalla srinivas wrote:yes
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
K. Tsang wrote:
nalla srinivas wrote:yes
Not true. In order to write thread-safe servlets, you need explicitly make it thread-safe by either synchronizing the code block or implement the SingleThreadModel (which I think is deprecated).
Bear Bibeault wrote:It's a very bad idea to [...] use synchronization
Ulf Dittmer wrote:Like everything, synchronization can be misused, but there's nothing wrong with it to make an absolute statement like this true.
Bear Bibeault wrote:
K. Tsang wrote:
nalla srinivas wrote:yes
Not true. In order to write thread-safe servlets, you need explicitly make it thread-safe by either synchronizing the code block or implement the SingleThreadModel (which I think is deprecated).
Also not accurate. It's a very bad idea to either use synchronization, or to use the deprecated SingleThreadModel.
Rather, the servlet needs to be written in a thread-safe manner. 99% of that is avoiding instance variables.
we can make threadsafe by using SingleThreadModel
Ankur Garg (SCJP,SCWCD)
Bring out your dead! Or a tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
|