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.
There are significant difference between the 'Run' and 'Undeploy and Deploy' action that make 'Run' the best choice for iterative development against Glassfish V2. Few people know about the differences and end up using the "wrong" item as part of their work flow. It is likely that both actions will cause a project to be directory deployed if it targets GF V2. Some of the other processing that takes place has significant and time consuming differences, that should be clarified for users.... Reaction to the Run action: 1. sub projects are compiled. 2. new and changed files are copied from a subproject's build directory to the ear's deployment directory. 3. the directory is used to redeploy the app. 4. The "client" for the ear is triggered -- this usually means that a web app will open in the browser or an app client will get executed. Reaction to the 'Undeploy and Deploy' action: 1. sub projects are compiled. 2. the app is undeployed from the app server. 3. the ear project's deployment directory is cleared (all the content is deleted). 4. all the files in the build subdirectories for each of the subprojects gets copied into the ear's deployment directory. 5. the directory is used to redeploy the app. Step 3 and 4 can chew up a fair bit of time and have a significant affect on the user experience. And this effect gets worse as the project scales up...
related blog post: http://www.adam-bien.com/roller/abien/entry/re_deployment_problems_of_ears1
Troy, Ken, can you please take a look at this issue? Probably, the difference between 'Run' and 'Undeploy and Deploy' is already described in the current docs? If not, do you think it is worth adding it?
Wow, this issue was filed over 2 years ago! Vince, if possible, could you please clarify the following? * The 'Undeploy and Deploy' option was removed in a previous release (6.5?). If a project is already deployed to GF, does the 'Deploy' option behave in the same way? * Taking into consideration the Compile on Save feature, if an EAR project has this feature enabled, what purpose does the 'Deploy' option now serve in a developer's workflow? * The steps you outlined were for GF2. Are there any differences that should be mentioned for GF3? I think it would be good to add this information to the Javahelp (if not there already). I don't think the current Java EE tutorials really go into the details of these differences. I could make several notes, where appropriate, for the upcoming release.
I made changes/updates to the following files that better reflect this information: * Web applications - Working with Web Applications - Web Application Deployment Tasks: Quick Reference - Deploying a Web Application * Enterprise applications - Working with Enterprise Applications - Enterprise Application Tasks: Quick Reference - Deploying an Enterprise Application The information is most concisely summarized in Deploying an Enterprise Application. http://hg.netbeans.org/main/rev/3bcd211df841 http://hg.netbeans.org/main/rev/e779c2424e0a