On 31/01/13 03:21, Arne Vajh?j wrote:
On 1/30/2013 5:48 PM, Lew wrote:
lipska the kat wrote:
Lew wrote:
[snip]
What we are skeptical about is you claim that all Java apps
are multi threaded. That seems to be based on a rather unsual
definition of multi threaded.
I think this is the point. What exactly is a multi-threaded application.
The OP asked a question re Tomcat
When you write a web app you have no conventional Java entry point
(public static void main(String[] args), you are actually extending the
server. IIRC the Tomcat docs explicitly advise against instantiating new
threads. I don't think that anyone would argue against the fact that
*Tomcat* is a multi-threaded application. Does this make your web-app
multi-threaded ... Well yes it does but only as a *side effect* of the
way the container manages multiple requests for the same resource, if
you extend a multi-threaded application then by implication your
application is multi-threaded.
That's my view of things anyway.
Applications with a single public static void main(String args[]) entry
point are different. If you don't explicitly create new Threads then I
don't think you would call your application multi-threaded. The fact the
the JVM uses multiple threads to do houskeeping tasks is an
implementation detail. The clincher is that the JVM isn't a Java
application (in the way that Tomcat is). There is a difference of course
between green and native threads but that discussion is beyond the scope
of this document :-)
Or maybe you disagree
I don't think there is much disagreement about the Tomcat web app.
The discussion is whether all Java apps are multi threaded.
And I think we agree on that topic.