RE: Shutdown hook for correctly unloading drivers

2010-04-07 Thread Propes, Barry L
Ok, thanks. Having a bit of an issue early on, since I'm notusing an IDE of any 
kind to embed it. 

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Tuesday, April 06, 2010 5:56 PM
To: Tomcat Users List
Subject: Re: Shutdown hook for correctly unloading drivers

On 06/04/2010 23:38, Propes, Barry L wrote:
 Hi Mark,
 
 I've downloaded this profiler, but it tells me it's good for 15 
 dayswhat's the provision for having this free?

I have an OpenSource license. A full license isn't that expensive. I've bought 
one a couple of times when I needed one for projects at work.

Mark

 
 Thanks,
 
 Barry
 
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Friday, March 26, 2010 7:27 AM
 To: Tomcat Users List
 Subject: Re: Shutdown hook for correctly unloading drivers
 
 On 26/03/2010 11:52, Timo Meinen wrote:
 Hi,

 I would like to know, if there is a shutdown-hook for Tomcat 
 available. Or what the prefered way is, to correctly unload drivers 
 like JDBC drivers.

 Unloading the drivers seems to be important for us, because after 
 redeploying the web appliction to often during continuous integration 
 leads to a OutOfMemory-Errors. And although Tomcat tells me, that it 
 forces the driver to unload, I can see a significant amount of memory 
 allocated additionally each time the webapp is redeployed.
 
 Tomcat has unloaded the driver. That won't be causing your memory leak.
 
 The memory leak prevention doesn't detect every possible cause of a leak. Get 
 yourself a profiler (I use YourKit because they give open source committers 
 free licenses) and follow these steps:
 
 http://markmail.org/message/fcbvwapt6afyndxn
 
 Mark
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Shutdown hook for correctly unloading drivers

2010-04-06 Thread Propes, Barry L
Hi Mark,

I've downloaded this profiler, but it tells me it's good for 15 dayswhat's 
the provision for having this free?

Thanks,

Barry 

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Friday, March 26, 2010 7:27 AM
To: Tomcat Users List
Subject: Re: Shutdown hook for correctly unloading drivers

On 26/03/2010 11:52, Timo Meinen wrote:
 Hi,
 
 I would like to know, if there is a shutdown-hook for Tomcat 
 available. Or what the prefered way is, to correctly unload drivers 
 like JDBC drivers.
 
 Unloading the drivers seems to be important for us, because after 
 redeploying the web appliction to often during continuous integration 
 leads to a OutOfMemory-Errors. And although Tomcat tells me, that it 
 forces the driver to unload, I can see a significant amount of memory 
 allocated additionally each time the webapp is redeployed.

Tomcat has unloaded the driver. That won't be causing your memory leak.

The memory leak prevention doesn't detect every possible cause of a leak. Get 
yourself a profiler (I use YourKit because they give open source committers 
free licenses) and follow these steps:

http://markmail.org/message/fcbvwapt6afyndxn

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Shutdown hook for correctly unloading drivers

2010-04-06 Thread Mark Thomas
On 06/04/2010 23:38, Propes, Barry L wrote:
 Hi Mark,
 
 I've downloaded this profiler, but it tells me it's good for 15 
 dayswhat's the provision for having this free?

I have an OpenSource license. A full license isn't that expensive. I've
bought one a couple of times when I needed one for projects at work.

Mark

 
 Thanks,
 
 Barry 
 
 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org] 
 Sent: Friday, March 26, 2010 7:27 AM
 To: Tomcat Users List
 Subject: Re: Shutdown hook for correctly unloading drivers
 
 On 26/03/2010 11:52, Timo Meinen wrote:
 Hi,

 I would like to know, if there is a shutdown-hook for Tomcat 
 available. Or what the prefered way is, to correctly unload drivers 
 like JDBC drivers.

 Unloading the drivers seems to be important for us, because after 
 redeploying the web appliction to often during continuous integration 
 leads to a OutOfMemory-Errors. And although Tomcat tells me, that it 
 forces the driver to unload, I can see a significant amount of memory 
 allocated additionally each time the webapp is redeployed.
 
 Tomcat has unloaded the driver. That won't be causing your memory leak.
 
 The memory leak prevention doesn't detect every possible cause of a leak. Get 
 yourself a profiler (I use YourKit because they give open source committers 
 free licenses) and follow these steps:
 
 http://markmail.org/message/fcbvwapt6afyndxn
 
 Mark
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Caldarale, Charles R
 From: Steffen Heil [mailto:li...@steffen-heil.de]
 Subject: AW: Shutdown hook for correctly unloading drivers
 
 This does not hold, as soon as Threads are involved, right?

I don't understand your comment; Thread objects always exist, and what do you 
think that has to do with unloading classes?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Shutdown hook for correctly unloading drivers

2010-03-28 Thread Caldarale, Charles R
 From: Steffen Heil [mailto:li...@steffen-heil.de]
 Subject: AW: Shutdown hook for correctly unloading drivers
 
 However, there are web applications that have own threads
 (file reaper, connection pool, etc.).

It's the application's responsibility to manage those threads, and shut them 
down when the application is stopped.  This is one of the purposes of the 
various lifecycle listeners defined in the servlet spec.  Any application that 
fails to manage the threads it creates is inherently broken.

 I am thinking about a strategy to iterate over all running threads and
 interrupt (and if absolutely necessary stop) all threads started by a
 certain classloader

Threads aren't started by or associated with a classloader, other than 
temporarily inheriting the one from the parent thread (which is dynamically 
changeable).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Shutdown hook for correctly unloading drivers

2010-03-26 Thread Mark Thomas
On 26/03/2010 11:52, Timo Meinen wrote:
 Hi,
 
 I would like to know, if there is a shutdown-hook for Tomcat
 available. Or what the prefered way is, to correctly unload drivers
 like JDBC drivers.
 
 Unloading the drivers seems to be important for us, because after
 redeploying the web appliction to often during continuous integration
 leads to a OutOfMemory-Errors. And although Tomcat tells me, that it
 forces the driver to unload, I can see a significant amount of memory
 allocated additionally each time the webapp is redeployed.

Tomcat has unloaded the driver. That won't be causing your memory leak.

The memory leak prevention doesn't detect every possible cause of a
leak. Get yourself a profiler (I use YourKit because they give open
source committers free licenses) and follow these steps:

http://markmail.org/message/fcbvwapt6afyndxn

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Shutdown hook for correctly unloading drivers

2010-03-26 Thread Timo Meinen
Hi Mark,

thank you for the answer. I do have a YourKit license for our open
source framework, so I will profile my webapp.

 Tomcat has unloaded the driver. That won't be causing your memory leak.
Does this mean, that the additional memory which is allocated after a
redeploy cannot be the mysql-driver?

Timo

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Shutdown hook for correctly unloading drivers

2010-03-26 Thread Mark Thomas
On 26/03/2010 12:35, Timo Meinen wrote:
 Hi Mark,
 
 thank you for the answer. I do have a YourKit license for our open
 source framework, so I will profile my webapp.
 
 Tomcat has unloaded the driver. That won't be causing your memory leak.
 Does this mean, that the additional memory which is allocated after a
 redeploy cannot be the mysql-driver?

Very unlikely. A profiler will show what is really going on.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Shutdown hook for correctly unloading drivers

2010-03-26 Thread Caldarale, Charles R
 From: Steffen Heil [mailto:li...@steffen-heil.de]
 Subject: AW: Shutdown hook for correctly unloading drivers
 
 How does tomcat unload classes?

It doesn't, at least not directly.  Tomcat simply eliminates all references to 
the classes; the actual unloading is done by GC at some point in the future.

 Is there even a way in java to do this?

Just the above.  But making the classes unreachable should be adequate for 
whatever purpose you have in mind.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org