This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190406 - Undeploy all sites before tomcat starts
Summary: Undeploy all sites before tomcat starts
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P4 normal with 3 votes (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 07:31 UTC by bestmike007
Modified: 2016-08-03 09:53 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bestmike007 2010-09-17 07:31:27 UTC
Overview:
When I start to run my web site, tomcat will be started. And before deploying my own application, all the formerly deployed sites will be started and sometimes it takes a long time but it's unnecessary. Why not delete all the deployed applications before starting the tomcat?

Steps to Reproduce:
1. Create a web project and produce a web site which takes a long time to initiate. 
2. Deploy this new web site to tomcat.
3. Stop tomcat by clicking "Stop the Server" button in the output window.
4. Deploy the new web site again.

Actual Results:
1. Starting Tomcat.
2. Starting the deployed web site.
3. Undeploying the web site.
4. Deploying the web site agian.

Expected Results:
1. Starting Tomcat which is clean.
2. Deploying the web site to be run.

Build Date & Platform:
Product Version: NetBeans IDE 6.9 (Build 201006101454)
Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01
System: Windows Server 2008 R2 version 6.1 running on amd64; GBK; en_us (nb)
Userdir: C:\Users\Administrator\.netbeans\6.9

Additional Information:
I don't know whether it would happen on the other platform or not.
It's not a critical bug but I think it's a problem, because it always takes me a long time before it's deploying what I really need to deploy. Tomcat in NetBeans is using a dedicated catalina base folder for development use, so I think the deployed web apps should be removed in case the unnecessary waste of time.

Thanks for your attention.
Comment 1 David Konecny 2010-09-28 22:57:31 UTC
The solution suggested may work in some scenarios but I can imagine also use cases where such behaviour would not be desirable - an app A being deployed depends/cooperates with an already deployed app B. If B was automatically removed then app A would fail.

In general I would say that it is a Tomcat issue - the server should not waste too much time during server startup with apps which may never be run in that session.
Comment 2 ymajoros 2011-05-11 08:48:55 UTC
This isn't Tomcat specific. I'd really like something similar in Glassfish.

Maybe a checkbox on the server definition to enable that. Maybe even a user-definable list of applications that wouldn't be undeployed.
Comment 3 nickcotter 2016-08-03 09:53:37 UTC
(In reply to ymajoros from comment #2)
> This isn't Tomcat specific. I'd really like something similar in Glassfish.
> 
> Maybe a checkbox on the server definition to enable that. Maybe even a
> user-definable list of applications that wouldn't be undeployed.

I agree, this isn't behaviour I'd want in tomcat by itself. As a developer I want a fast turn around time when deploying changes. Furthermore the number of times I've been tracking down an issue in the logs and it turns out it was in the previous deployment...