Deploying

 

Overview

Deployment is the activity in which applications are placed onto appservers, without needing to customize the application code for each server environment.

 

Packaging and class loading

You can package your apps as a J2EE application EAR file or as an enterprise bean or Web module. You must also consider the class loading relationships among modules.

 

Uninstalling and redeploying applications

At some point, you will need to uninstall your deployed applications. Or you might need to update your applications and deploy them again. You might be able to use hot deployment and dynamic reloading, where you do not need to restart the appserver (or the application in some cases) after deploying an updated application.

 

Deployer role

The appeal of the J2EE specification is that one can write and package applications once, for deployment to many different environments. This is possible because...

For example, when the application is assembled, security roles can be defined in the deployment descriptor of the application. The Deployer maps these security roles to specific users or groups that exist in the particular environment.

Module-to-server relationships are important information for the deployer to furnish during deployment. The management logic of WAS facilitates deployment of different modules of the same application to different servers or clusters. A single application module can be deployed on one or more servers or clusters or combination of both.

Deployment of a module on a cluster is particularly helpful in achieving load balancing (the balancing of incoming requests for module components) and for continuous availability of module artifacts in long-running production cycles where individual member servers of the cluster can be recycled from time to time.

In addition to installing the application, the deployer also assumes the responsibility to start and stop applications as needed. When an appserver starts, all the modules installed on that server are started. making them available to client applications. Stopping an application server stops all the installed modules. Additionally, the administrative tools also allow starting and stopping of applications without having to start and stop application servers.

After the application is installed and started the deployer might receive new versions of the application from the development team from time to time. The administrative tools allow the deployer to update an installed application with newer versions of application logic. Similar to installation experience, the deployer is presented with an interface where environment-specific configuration can be entered for the new version of the application. The administrative tools perform smart merging of configuration information from the newer version of the application with the one in the older version, and also choose appropriate defaults wherever required, making the job of deployment easy.