New GlassFish Integration Feature: Directory Deployment of Enterprise Application Projects
By vbkraemer on Jun 19, 2007
NetBeans has been able to directory deploy web apps to GlassFish for a while. There has actually been code in place that would allow the IDE to directory deploy all kinds of Java EE modules, but it has never gotten a real work-out.
Over the last couple of weeks, I dove into it to see what I could make it do. And I was pretty successful. If you create an Enterprise Application project in a recent build of NetBeans and target it to deploy on a domain "powered by" GlassFish V2 B49 (or greater), the app will deploy from a directory in the project's dist directory. It is directory deployed.
This removes a lot of significant I/O operations from the work-flow for developing enterprise applications. In previous releases, packaging for archive based deployment was creating a bunch of jar files and then the deployment operation was undoing all that work. Now the unpacking operations are eliminated.
There is still more that can be done. Enterprise Application projects suffer from their own "variant" of http://www.netbeans.org/issues/show_bug.cgi?id=97118.
Now that the enterprise application projects are directory deployable, the build processing can be optimized to remove unnecessary packaging steps for situations where the user wants to run the code of their application. The time savings from these optimizations can be significant. The IDE currently does three jar operations to create an ear for a simple servlet-calling-session-bean hello world sample application... BEFORE the application is deployed. Three unjar operations also need to take place to get the application deployed.
Almost all of these operations can be eliminated when an enterprise application is directory deployed. The savings are not very high for "sample" applications, but the savings can become substantial as the scope of the app expands.