I have to agree with Yoav.  You shouldn't use the isThreadSafe
directive unless you absolutely have to (why would you?).  I would
reconsider your design if you think you need to use this directive.

On the other hand, AFAIK, the servlet spec only requires the container
to guarantee synchronized access to the servlet when the isThreadSafe
directive is set to true.  It doesn't specify how it is implemented. 
The SingleThreadModel has been deprecated so I wouldn't expect any
recent Servlet container to implement it.  I would guess, as I have
never used this directive, that the JSP translator would synchronize
the methods on the Servlet.  Have you checked the access modifiers on
the servlet methods?  There are probably several ways a container can
achieve synchronized access to the servlet.


Regards,
Andre Van Klaveren, SCJP
http://www.vanklaverens.com


On Mon, 6 Dec 2004 23:22:57 +0800, zerol tib <[EMAIL PROTECTED]> wrote:
> Howdy,
> 
> I compared two servlets' source code compiled from JSPs,
> at the beginning of  one jsp I add page directive:
> <[EMAIL PROTECTED] isThreadSafe="false" %>
> and  the other, <[EMAIL PROTECTED] isThreadSafe="true" %>.
> 
> But the two servlet are the same , I had thought the first
> servlet will implement interface SingleThreadModel, but it
> didn't. Could anyone give me a hint?
> 
> BTW, jsp compiler (Lomboz) says SingleThreadModel
> is deprecated.
> 
> Thanks in advance.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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

Reply via email to