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.

For more information about the components of the MedRec application, see Overview of the Avitek Medical Records Development Tutorials.

The tutorial includes the following sections:

Prerequisites

Before starting this tutorial:

Procedure

  1. Start the MedRec server, if it is not already running.

    From the Windows start menu:

    Start->Programs->BEA WebLogic Platform 8.1->User Projects->MedRecDomain->Start Server

    From the command line:

    C:\bea\user_projects\domains\MedRecDomain>startWebLogic.cmd
    
    

  2. Open the Administration Console.

    Once the server starts, open http://localhost:7101/console in a browser, where localhost is the network name of your computer.

  3. Undeploy applications from previous tutorials:

    1. Expand Deployments in the left pane of the Console and click the Applications folder. The right pane of the Console may show existing deployments from the previous tutorials (medrec_deployment and wlpackage_tutorial).

    2. Click the trash can icon to the right of an existing deployment. The Console prompts you to undeploy the application.

    3. Click Yes to remove the deployment, then click Continue.

    4. Repeat the above steps for any other MedRec deployments on the server.

  4. Deploy the MedRec applications to MedRecServer:

    1. Expand Deployments in the left pane of the Console.

    2. Right-click Applications and select Deploy a New Application.

      This initiates the Enterprise Application Deployment Assistant in the right panel.

    3. Use the links in the Location field to navigate to C:\medrec_tutorial\dist.

      The Deploy an Application page table contains three applications that were created in Tutorial 12: medrecEar, physicianEar, and startupEar. Deploy all three applications, starting with medrecEar.

    4. Select medrecEar and click Continue.

    5. Click Deploy.

      The Console displays the Deploy panel, which shows the deployment status of applications and deployment activities on the server. The table in this page shows that the deployment is underway, and then refreshes to report the success or failure of the deployment.

    6. Use steps a to c to return to the Deploy an Application page, and select and deploy physicianEar.

    7. Use steps a to c to return to the Deploy an Application page, and select and deploy startupEar.

  5. Access the MedRec applications to confirm that they are deployed. In a browser, navigate to http://127.0.0.1:7101/physician, and log in using the username and password supplied in the text fields.

Best Practices

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.

Related Reading

 Back to Top Previous Next