Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

thread leak

Thread view: 
timothy ma and constance lee - 30 Oct 2007 04:30 GMT
Sir/madam

What is thread leak?

How can I trace where the application has thread leak?

Do you know how to enable connectionLeak in JVM level for JDBC connection?

THanks
Leonard Milcin - 30 Oct 2007 14:06 GMT
> Sir/madam
>
> What is thread leak?

Thread leak is when application does not close threads properly. Threads
do not exit and the number of unused threads grow with time.

> How can I trace where the application has thread leak?

If you have thread leak then with time you'll get lots of unused
threads. Try to find out what kind of threads is leaking out (give
descriptive names, log entry/exit to/from run(), whatever). When you
find the class that is leaking out threads check how new threads are
instantiated and how they're closed. Is it quaranteed that the thread
will close properly regardless of what happens? No, it's not, otherwise
you wouldn't have leaks.

Regards,
Leonard

Signature

It is wrong always, everywhere, and for anyone, to believe anything
upon insufficient evidence.
                                        -- William Kingdon Clifford

Roedy Green - 03 Nov 2007 19:34 GMT
On Tue, 30 Oct 2007 14:06:33 +0100, Leonard Milcin
<leonard@wytnij.milcin.pl> wrote, quoted or indirectly quoted someone
who said :

>Thread leak is when application does not close threads properly.

A leak implies a bug in the memory management system.  When you don't
close a thread, there is no problem with memory management.  It is
just you are not going to use it again. You potentially could, so it
is not a bug in the sense of  memory leaks with C++.

I use the term "packratting" for holding onto something you did not
really need to.  It can cause just as much trouble as a leak.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Roedy Green - 03 Nov 2007 18:50 GMT
On Tue, 30 Oct 2007 03:30:28 GMT, "timothy ma and constance lee"
<timcons1@shaw.ca> wrote, quoted or indirectly quoted someone who said

>What is thread leak?

see http://mindprod.com/jgloss/leak.html
http://mindprod.com/jgloss/packratting.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.