-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
7> Can anyone think of a reason why a servlet would leave threads hanging
out?
a servlet remains persistent in memory even once it has been loaded until
the servlet engine shuts down or reloads it. so, u have to be extremely
careful about where and how you allocate resources for use. typically, you
should only allocate resources in the service() method because that is what
is called @ runtime when the servlet is invoked. always remmember to put a
finally clause @ the end to make sure that you deallocate the resources.
sorry, cant be much help unless i look @ the code itself.
> It seems like the doGet method must be completely executing, since the
html
> page it builds is being returned correctly, but I can't figure out why the
> threads are hanging and the WClient objects are being left instantiated.
> Are there any issues relating to a multi-threaded servlet that I'm
missing,
> like synchronizing the method that uses the WClient object?
that is not necessarily true, unless the last statement @ the end of the
service()/doGet() method is HttpResponse.getOuptutStream().println( ...).
are these threads which u r creating? if so, i would recommend naming them
to something so u know what they r. Thread.setName() is extremely useful =)
fyi, i am writing a program similar to OptimizeIt which monitors a servlet
env. @ runtime. it is close to completion and i have put some docs up @
http://nimret.penguinpowered.com/vmspy .. feedback greatly appreciated.
btw, if anyone wants to c this running on my box, pls lemme know so i can
provide access to it.
regs,
--------------------------------------
Nimret Sandhu
Dev Geek
http://nimret.penguinpowered.com
EC Direct Corp
http://www.ecdirect.com
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]