Tutorial 15: Deploying the MedRec Package for Production
This tutorial describes how to use the Administration Console to deploy the MedRec application to a server for production. In this example the application files are packaged in exploded format in directories, rather than as EAR files. The advantage of the exploded format for production is that deployment descriptor files in an exploded directory can be updated without having to be unarchived and then rearchived following the update.
For instructions on packaging the MedRec application into a single archived EAR file, in contrast to the exploded format used in this tutorial, see Tutorial 14: Packaging MedRec for Distribution. The advantage of packaging into an EAR file is that the application is more portable when bundled into a single file, and can more easily be moved or distributed.
The procedures below deploy the exploded contents of the medrecEar, startupEar, and physicianEar subdirectories of the dist directory, created in Tutorial 13: Compiling the Entire MedRec Project.
medrecEar is MedRec's main enterprise application, containing its patient and administrative Web Applications, the Web service used by the physician Web application, and the EJBs that store and run MedRec's logic and data.
physicianEar is a separate component of the MedRec application, with a different set of users, which communicates with medrecEar using a Web Service.
startupEar contains a single class file that starts the browser when the servlets in the Web Applications are initialized.
Use the Administration Console Deployment Assistant to deploy your application in a graphical environment that shows you the choices you can make in your deployment, as an alternative to deploying using the command-line tool weblogic.Deployer or to editing Ant scripts that run deployment targets.
For production, deploy in exploded format to simplify the process of updating the application.
Use the Administration Console to monitor the progress of MedRec deployment and application activities. In case of errors, scroll up in the console text for useful messages.
Big Picture
The split-directory structure introduced in WebLogic Server 8.1 lets you deploy MedRec's compiled and generated files separately from the editable files. This capability is convenient during the development stage, when changes to the application are frequent. The expected format for production is the traditional single-directory structure, with the separate applications in exploded format in separate subdirectories.
In this tutorial, you deployed MedRec's applications from a directories containing the applications and all of their components and support files. The applications' exploded format makes their editable files more accessible than they would be if they were bundled into archives.
Each application subdirectory in dist contains both the compiled classes and generated deployment descriptors from the build directory, and the editable deployment descriptors and other files from the src directory.