tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siraj Haider <si...@algomod.com>
Subject Re: [OT] Thread Pool
Date Mon, 11 Jun 2007 21:54:48 GMT
Thanks alot all for the help, yes it was my bad... I was not calling 
run() method instead of calling start{} method...

regards
-Siraj

Johnny Kewl wrote:
> Ha, well spotted... Chris
> Yes should look like this...             runner = new Thread(this);
>        runner.start();
> Yes, thats why connection is holding... is this group good or what ;)
>
> ----- Original Message ----- From: "Christopher Schultz" 
> <chris@christopherschultz.net>
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Sent: Monday, June 11, 2007 11:27 PM
> Subject: Re: [OT] Thread Pool
>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Siraj,
>>
>> Siraj Haider wrote:
>>> Hello, Now I have changed my servlet.  I have created a new class 
>>> ResultFetcher extended by thread and now I am doing the checking 
>>> part inside that Thread.run() method.  and calling the new class 
>>> like this :
>>>
>>>       ResultFetcher rf = new ResultFetcher(something);
>>>       rf.setDaemon(true);
>>>       rf.run();
>>
>> Thread.run does not actually launch the new thread. It merely calls the
>> "run" method on it, synchronously. If you re-read the javadoc, you'll
>> see that Thread.start is what you really want to call.
>>
>> You can ignore the stabbing-in-the-dark advise that others are
>> attempting to give you... things like setting daemon status and closing
>> connections are unrelated to this problem (but actually very good things
>> to do).
>>
>> - -chris
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.7 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFGbb5O9CaO5/Lv0PARAobjAKC9/4h/UAAHv4W4O19GRMjd8ywQEACdE+/e
>> EwOXUQ1ouqAHi3EA/2Sib+A=
>> =adMl
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>



This electronic mail message and any attachments may contain information which is privileged,
sensitive and/or otherwise exempt from disclosure under applicable law. The information is
intended only for the use of the individual or entity named as the addressee above. If you
are not the intended recipient, you are hereby notified that any disclosure, copying, distribution
(electronic or otherwise) or forwarding of, or the taking of any action in reliance on, the
contents of this transmission is strictly prohibited. If you have received this electronic
transmission in error, please notify us by telephone, facsimile, or e-mail as noted above
to arrange for the return of any electronic mail or attachments. Thank You.



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message