[ Team LiB ] |
Packaging and Deploying SoftwareAfter the software has been built, it needs to be packaged and deployed. The first step is packaging. A Java Web application is packaged in a Web archive file (*.war). If the application uses other J2EE components, such as Resource Adapters or EJBs, the .war file and the other components are packaged in an enterprise archive file (*.ear). Packaging on the command line or with simple batch scripts can be done using the Java jar command. Ant, as previously discussed, can do this for you when using WebLogic's Ant tasks. It's also possible to build and package applications from the IDE you are using. For example, JBuilder 8 has the option to package your application and EJBs in an .ear file. Of course, there's no need to package software when deploying on WebLogic—just a properly defined directory is required. However, it's much easier to move the application from one server to another because the application is self-contained. Chapter 7, “Deploying Web Applications,” covers this in greater depth. After the application is packaged, the next step is deployment. Software using WebLogic Server 8.1 can be deployed either locally on the same machine or remotely on a separate machine. Deployment can be done by using the WebLogic Administrator, the standalone deployment tool, an IDE, in Ant, or in a shell or batch script. Local deployments are easier because the Web application doesn't have to physically move locations. When remote deployment is required, a shared directory, FTP, or Web address that contains a link to the packaged application is required. An archived application can also be uploaded using the console. In most large-scale applications, development work is done in the development system, and deployed and unit tested by individual developers. Then the application is transferred from development to a testing server, where full functional tests are performed by separate testers or by automated testing scripts. If everything is fine, the software can be moved to production or another development iteration can begin. |
[ Team LiB ] |