Re: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-02 Thread Mark Thomas
On 02/08/2011 09:54, Bob DeRemer wrote:
> Should YourKit be able to pinpoint this?  I've used it for memory and
> other profiling, but haven't used it to see what might be holding
> onto JARs after a webapp has been shutdown.

It should do. I have used it in the past to track down locked files.

Mark

> 
> Thanks again, Bob
> 
> -Original Message- From: Mark Thomas
> [mailto:ma...@apache.org] Sent: Tuesday, August 02, 2011 3:52 AM To:
> Tomcat Users List Subject: Re: HOW TO: re-deploy or undeploy a webapp
> when additional files are added after initial deployment
> 
> On 02/08/2011 02:11, Bob DeRemer wrote:
>> Hi Mark,
>> 
>> Actually, in the logs it does tell me that ExpandWar deleteDir
>> failed. This is because my "extensions" I have are actually JAR
>> files that we're dynamically loaded so we don't have to restart the
>> webapp.  I'm using the addUrl hack, but by casting the main
>> webapp's Thread.currentThread().getContextClassLoader() to a
>> URLClassLoader. From a dynamic loading standpoint, it works great!
>> It allows extension classes in an extension JAR to derive from
>> classes in our built-in product JAR(s) loaded by the same [I'm
>> assuming] webapp classloader.
>> 
>> The problem is, when I shutdown/undeploy the webapp, everything
>> else gets deleted, but not the JAR(s) that are dynamically loaded.
>> Tomcat should not be holding on to these because I am NOT using the
>> System class loader to load them.  Problem is, I'm not sure why
>> these are not being unloaded.
> 
> You'll need to get a profiler to see what is holding on to references
> to those JARs.
> 
>> Is there any way to force tomcat to release these?  I tried putting
>>  the antiJARLocking="true" in the main Context.xml as well as a
>> local context.xml in META-INF and neither of these worked.
> 
> Without knowing what is holding on to the reference, it is pretty
> much impossible to determine the best way to solve this problem.
> 
> Mark
> 
>> 
>> Thanks in advance, Bob
>> 
>> -Original Message- From: Mark Thomas
>> [mailto:ma...@apache.org] Sent: Monday, August 01, 2011 3:44 PM
>> To: Tomcat Users List Subject: Re: HOW TO: re-deploy or undeploy a
>> webapp when additional files are added after initial deployment
>> 
>> On 01/08/2011 20:32, Bob DeRemer wrote:
>>> Thanks, but I need to do this in a production environment, where
>>>  we're deploying/re-deploying a WAR and there is no eclipse IDE.
>>> In addition, I am dynamically adding extensions to our webapp
>>> without having to restart our webapp, which is what republishing
>>> from Eclipse does.
>> 
>> Any messages in the logs? Tomcat 7 will report if it can't delete a
>>  file. I don't recall if Tomcat 6 does.
>> 
>> If a file is under the docBase and is not deleted it is because 
>> something (probably your app) still has the file open. You need to
>>  close the files before you redeploy.
>> 
>> 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
> 


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



RE: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-02 Thread Bob DeRemer
Should YourKit be able to pinpoint this?  I've used it for memory and other 
profiling, but haven't used it to see what might be holding onto JARs after a 
webapp has been shutdown.

Thanks again,
Bob

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Tuesday, August 02, 2011 3:52 AM
To: Tomcat Users List
Subject: Re: HOW TO: re-deploy or undeploy a webapp when additional files are 
added after initial deployment

On 02/08/2011 02:11, Bob DeRemer wrote:
> Hi Mark,
> 
> Actually, in the logs it does tell me that ExpandWar deleteDir failed.  
> This is because my "extensions" I have are actually JAR files that 
> we're dynamically loaded so we don't have to restart the webapp.  I'm 
> using the addUrl hack, but by casting the main webapp's
> Thread.currentThread().getContextClassLoader() to a URLClassLoader.
> From a dynamic loading standpoint, it works great!  It allows 
> extension classes in an extension JAR to derive from classes in our 
> built-in product JAR(s) loaded by the same [I'm assuming] webapp 
> classloader.
> 
> The problem is, when I shutdown/undeploy the webapp, everything else 
> gets deleted, but not the JAR(s) that are dynamically loaded.  Tomcat 
> should not be holding on to these because I am NOT using the System 
> class loader to load them.  Problem is, I'm not sure why these are not 
> being unloaded.

You'll need to get a profiler to see what is holding on to references to those 
JARs.

> Is there any way to force tomcat to release these?  I tried putting 
> the antiJARLocking="true" in the main Context.xml as well as a local 
> context.xml in META-INF and neither of these worked.

Without knowing what is holding on to the reference, it is pretty much 
impossible to determine the best way to solve this problem.

Mark

> 
> Thanks in advance, Bob
> 
> -Original Message----- From: Mark Thomas [mailto:ma...@apache.org] 
> Sent: Monday, August 01, 2011 3:44 PM To:
> Tomcat Users List Subject: Re: HOW TO: re-deploy or undeploy a webapp 
> when additional files are added after initial deployment
> 
> On 01/08/2011 20:32, Bob DeRemer wrote:
>> Thanks, but I need to do this in a production environment, where 
>> we're deploying/re-deploying a WAR and there is no eclipse IDE.  In  
>> addition, I am dynamically adding extensions to our webapp without  
>> having to restart our webapp, which is what republishing from Eclipse 
>> does.
> 
> Any messages in the logs? Tomcat 7 will report if it can't delete a 
> file. I don't recall if Tomcat 6 does.
> 
> If a file is under the docBase and is not deleted it is because 
> something (probably your app) still has the file open. You need to 
> close the files before you redeploy.
> 
> 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: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-02 Thread Mark Thomas
On 02/08/2011 02:11, Bob DeRemer wrote:
> Hi Mark,
> 
> Actually, in the logs it does tell me that ExpandWar deleteDir
> failed.  This is because my "extensions" I have are actually JAR
> files that we're dynamically loaded so we don't have to restart the
> webapp.  I'm using the addUrl hack, but by casting the main webapp's
> Thread.currentThread().getContextClassLoader() to a URLClassLoader.
> From a dynamic loading standpoint, it works great!  It allows
> extension classes in an extension JAR to derive from classes in our
> built-in product JAR(s) loaded by the same [I'm assuming] webapp
> classloader.
> 
> The problem is, when I shutdown/undeploy the webapp, everything else
> gets deleted, but not the JAR(s) that are dynamically loaded.  Tomcat
> should not be holding on to these because I am NOT using the System
> class loader to load them.  Problem is, I'm not sure why these are
> not being unloaded.

You'll need to get a profiler to see what is holding on to references to
those JARs.

> Is there any way to force tomcat to release these?  I tried putting
> the antiJARLocking="true" in the main Context.xml as well as a local
> context.xml in META-INF and neither of these worked.

Without knowing what is holding on to the reference, it is pretty much
impossible to determine the best way to solve this problem.

Mark

> 
> Thanks in advance, Bob
> 
> -Original Message----- From: Mark Thomas
> [mailto:ma...@apache.org] Sent: Monday, August 01, 2011 3:44 PM To:
> Tomcat Users List Subject: Re: HOW TO: re-deploy or undeploy a webapp
> when additional files are added after initial deployment
> 
> On 01/08/2011 20:32, Bob DeRemer wrote:
>> Thanks, but I need to do this in a production environment, where
>> we're deploying/re-deploying a WAR and there is no eclipse IDE.  In
>>  addition, I am dynamically adding extensions to our webapp without
>>  having to restart our webapp, which is what republishing from
>> Eclipse does.
> 
> Any messages in the logs? Tomcat 7 will report if it can't delete a
> file. I don't recall if Tomcat 6 does.
> 
> If a file is under the docBase and is not deleted it is because
> something (probably your app) still has the file open. You need to
> close the files before you redeploy.
> 
> 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: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-01 Thread Bob DeRemer
Also - I just looked at my local tomcat 6.0.32 server.xml and it has 
JreMemoryLeakPreventionListener on the Server element.  The implicit disabling 
of URL caching this is supposed to do must not have an effect on this scenario.

As an aside, when I used antiJARLocking + antiResourceLocking on the server's 
context.xml, it appeared to work, but that has other documented side effects - 
such as creating a bunch of garbage in the tomcat/temp directory.   As a 
result, this really isn't a solution for us.

Any suggestions on how we can get these JAR(s) not to be locked - without using 
the context attributes?

Thanks,
bob

-Original Message-
From: Bob DeRemer [mailto:bob.dere...@thingworx.com] 
Sent: Monday, August 01, 2011 9:12 PM
To: Tomcat Users List
Subject: RE: HOW TO: re-deploy or undeploy a webapp when additional files are 
added after initial deployment

Hi Mark,

Actually, in the logs it does tell me that ExpandWar deleteDir failed.  This is 
because my "extensions" I have are actually JAR files that we're dynamically 
loaded so we don't have to restart the webapp.  I'm using the addUrl hack, but 
by casting the main webapp's Thread.currentThread().getContextClassLoader() to 
a URLClassLoader.  From a dynamic loading standpoint, it works great!  It 
allows extension classes in an extension JAR to derive from classes in our 
built-in product JAR(s) loaded by the same [I'm assuming] webapp classloader. 

The problem is, when I shutdown/undeploy the webapp, everything else gets 
deleted, but not the JAR(s) that are dynamically loaded.  Tomcat should not be 
holding on to these because I am NOT using the System class loader to load 
them.  Problem is, I'm not sure why these are not being unloaded.

Is there any way to force tomcat to release these?  I tried putting the 
antiJARLocking="true" in the main Context.xml as well as a local context.xml in 
META-INF and neither of these worked.

Thanks in advance,
Bob

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Monday, August 01, 2011 3:44 PM
To: Tomcat Users List
Subject: Re: HOW TO: re-deploy or undeploy a webapp when additional files are 
added after initial deployment

On 01/08/2011 20:32, Bob DeRemer wrote:
> Thanks, but I need to do this in a production environment, where we're 
> deploying/re-deploying a WAR and there is no eclipse IDE.  In 
> addition, I am dynamically adding extensions to our webapp without 
> having to restart our webapp, which is what republishing from Eclipse 
> does.

Any messages in the logs? Tomcat 7 will report if it can't delete a file. I 
don't recall if Tomcat 6 does.

If a file is under the docBase and is not deleted it is because something 
(probably your app) still has the file open. You need to close the files before 
you redeploy.

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: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-01 Thread Bob DeRemer
Hi Mark,

Actually, in the logs it does tell me that ExpandWar deleteDir failed.  This is 
because my "extensions" I have are actually JAR files that we're dynamically 
loaded so we don't have to restart the webapp.  I'm using the addUrl hack, but 
by casting the main webapp's Thread.currentThread().getContextClassLoader() to 
a URLClassLoader.  From a dynamic loading standpoint, it works great!  It 
allows extension classes in an extension JAR to derive from classes in our 
built-in product JAR(s) loaded by the same [I'm assuming] webapp classloader. 

The problem is, when I shutdown/undeploy the webapp, everything else gets 
deleted, but not the JAR(s) that are dynamically loaded.  Tomcat should not be 
holding on to these because I am NOT using the System class loader to load 
them.  Problem is, I'm not sure why these are not being unloaded.

Is there any way to force tomcat to release these?  I tried putting the 
antiJARLocking="true" in the main Context.xml as well as a local context.xml in 
META-INF and neither of these worked.

Thanks in advance,
Bob

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Monday, August 01, 2011 3:44 PM
To: Tomcat Users List
Subject: Re: HOW TO: re-deploy or undeploy a webapp when additional files are 
added after initial deployment

On 01/08/2011 20:32, Bob DeRemer wrote:
> Thanks, but I need to do this in a production environment, where we're 
> deploying/re-deploying a WAR and there is no eclipse IDE.  In 
> addition, I am dynamically adding extensions to our webapp without 
> having to restart our webapp, which is what republishing from Eclipse 
> does.

Any messages in the logs? Tomcat 7 will report if it can't delete a file. I 
don't recall if Tomcat 6 does.

If a file is under the docBase and is not deleted it is because something 
(probably your app) still has the file open. You need to close the files before 
you redeploy.

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: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-01 Thread Chema
2011/8/1 Bob DeRemer :
> Thanks, but I need to do this in a production environment, where we're 
> deploying/re-deploying a WAR and there is no eclipse IDE.  In addition, I am 
> dynamically adding extensions to our webapp without having to restart our 
> webapp, which is what republishing from Eclipse does.

OK.
I'm not expert and I cannot speak so much about this tool, but you
could have a look at LiveRebel

http://www.zeroturnaround.com/liverebel/

But it's not for free

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



Re: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-01 Thread Mark Thomas
On 01/08/2011 20:32, Bob DeRemer wrote:
> Thanks, but I need to do this in a production environment, where 
> we're deploying/re-deploying a WAR and there is no eclipse IDE.  In 
> addition, I am dynamically adding extensions to our webapp without 
> having to restart our webapp, which is what republishing from
> Eclipse does.

Any messages in the logs? Tomcat 7 will report if it can't delete a
file. I don't recall if Tomcat 6 does.

If a file is under the docBase and is not deleted it is because
something (probably your app) still has the file open. You need to close
the files before you redeploy.

Mark

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



RE: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-01 Thread Bob DeRemer
Thanks, but I need to do this in a production environment, where we're 
deploying/re-deploying a WAR and there is no eclipse IDE.  In addition, I am 
dynamically adding extensions to our webapp without having to restart our 
webapp, which is what republishing from Eclipse does.

-bob

-Original Message-
From: Chema [mailto:demablo...@gmail.com] 
Sent: Monday, August 01, 2011 3:02 PM
To: Tomcat Users List
Subject: Re: HOW TO: re-deploy or undeploy a webapp when additional files are 
added after initial deployment

> If anyone has any suggestions on how we can add files into the exploded 
> webapp structure and still perform undeploy/re-deploy of our webapp, I would 
> greatly appreciate it.  Or, if there's a way to tell tomcat to completely 
> remove the directory - regardless of additional files/directories, that would 
> probably work, too.
>

Eclipse Hellios' plugins to deploy web applications work fine for me.
You can try Eclipse IDE for Java EE Developers.

When I change any file deployed , it's automatically republished. And you can 
clean work folders from IDE.

-
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: HOW TO: re-deploy or undeploy a webapp when additional files are added after initial deployment

2011-08-01 Thread Chema
> If anyone has any suggestions on how we can add files into the exploded 
> webapp structure and still perform undeploy/re-deploy of our webapp, I would 
> greatly appreciate it.  Or, if there's a way to tell tomcat to completely 
> remove the directory - regardless of additional files/directories, that would 
> probably work, too.
>

Eclipse Hellios' plugins to deploy web applications work fine for me.
You can try Eclipse IDE for Java EE Developers.

When I change any file deployed , it's automatically republished. And
you can clean work folders from IDE.

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