Sun Java System Application Server, Platform Edition 8 (Application Server PE 8) is
the first production-quality application server that's compatible with Java 2
Platform, Enterprise Edition (J2EE platform) 1.4. Free for development, deployment,
and redistribution, Application Server PE 8 offers J2EE 1.4 API updates along with
fully integrated and enhanced tools and technologies.
This article describes the ways in which you can deploy J2EE applications or modules to Application Server PE 8. Contents
Overview of Deployment
A typical development process for J2EE applications contains two steps:
This article shows you the five ways in which to deploy J2EE applications or modules to Application Server PE 8, some of which help reduce the length of the develop-deploy-debug cycle. However, this article does not address the structure of the deployable units. For details on that structure, see The J2EE 1.4 Tutorial and Chapter 3, "Assembling and Deploying J2EE Applications" in the Sun Java System Application Server Platform Edition 8 Developer's Guide. Method 1: Command Line
Application Server PE 8 includes a command-line interface (CLI), Before deploying with For example, to deploy a WAR called
To undeploy, execute the
For details on the options, see the Method 2: Administration Console
You can also deploy applications or modules from the Administration Console of Application Server PE 8.
Follow these steps:
For example, if your browser is running on the same machine as Application Server PE 8 and you chose, during installation, to use the default administration port 4848, then go to http://localhost:4848/admin.
The page for Application Server PE 8 is displayed. For example, for a WAR module, select Web Applications. For an EAR file, select Enterprise Applications. For example, to have all JSP pages compiled at deployment, select the Precompile: checkbox. You will have deployed your module or application on Application Server PE 8. To undeploy, select the application or module and click Undeploy in step 3.
Method 3: Application Deployment Tool
Application Server PE 8 contains Application Deployment Tool ( To deploy, first load the application or module into To undeploy, select the deployed application or module and then click Undeploy. For details on how to assemble and deploy J2EE modules or applications, see The J2EE 1.4 Tutorial. Method 4: Automatic Deployment
Automatic deployment is the quickest way to deploy applications or modules. To
use this method, simply copy the deployable unit into a directory called
Application_Server_install_dir Also by default, Application Server PE 8 polls the To change those default values:
The Application Configurations page is displayed. To undeploy a unit, simply delete it from the autodeploy directory. Method 5: Directory-Based Deployment
Often, the environment for your application or module resides in the same directory
structure as required and you would like to deploy the structure rather than
archiving it into a WAR, JAR, or EAR and then deploying the archive with one of the
preceding methods. Application Server PE 8 supports directory-based deployment
with the CLI Here is an example. You are deploying an application called
Assuming that the directory
Here is the complete syntax:
Dynamic Reloading
Frequently, while developing a J2EE application or module, you would like to slightly revise a JSP page, servlet, or an EJB class and quickly test the changes before moving on to the next step. Testing minor changes can become a burdensome task if, for each of them, you must assemble and package the application or module into the appropriate WAR, JAR, or EAR and deploy that archive. To ease and speed up those testing tasks, Application Server PE 8 offers dynamic reloading, with which you deploy your application or module once only. From then on, to test minor changes, you need not repackage and redeploy the entire application or module. Instead, simply replace the latest JSP page, servlet, or EJB class; Application Server PE 8 automatically reloads the most current files. Remember: You must revise the files where they are deployed. For example, after
you've deployed an EAR, that application is at Application_Server_install_dir Once the changes are in place, you can enable the Application Server PE 8 to
determine which files contain updates. Create a file called
By default, dynamic reloading is enabled in Application Server PE 8, and if
The Application Configurations page is displayed. References
Acknowledgment
Special thanks to Qingqing Ouyang and Hong Zhang at Sun, whose comments greatly enhanced this article. About the Authors
Vijay Ramachandran, a member of the Sun Java System Application Server Development Team, has been with Sun for over six years. Previously, Vijay served as technical lead for the Java BluePrints team. He's also the coauthor of Designing Enterprise Applications with the J2EE Platform, 2nd Edition, and a forthcoming book, Designing Web Services with the J2EE Platform.
| |||||||||||||||||||||||||||||||
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
|
| ||||||||||||