Avitek Medical Records Development Tutorials

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

 


Developing the MedRec Applications

 


Tutorial 13: Compiling the Entire MedRec Project

Previous tutorials explained how to compile, build, and deploy parts of individual MedRec applications. In this tutorial, you compile and build the entire MedRec application suite using the project-level build.xml file. Compiling the entire application suite is necessary to deploy all components on your system and verify that MedRec is running and usable.

The tutorial includes:

 


Prerequisites

Create the project directory using the instructions in Tutorial 5: Creating the MedRec Project Directory.

 


Procedure

The project directory contains a master build.xml script that compiles and stages all of the MedRec applications in the correct order. To run this script:

  1. Open a command shell and set the development environment:
  2. prompt> c:\bea\user_projects\domains\MedRecDomain\bin\setDomainEnv.cmd
  3. Move to the src subdirectory of the MedRec project directory:
  4. prompt> cd c:\medrec_tutorial\src
  5. Use the Ant command to execute the master build.xml script with the deploy.dev target:
  6. prompt> ant deploy.dev

    The build process displays messages indicating the progress for each application. The entire build process take approximately 2 to 5 minutes to complete, depending on the speed of your computer. The script should complete with the following message:

    build:
    [echo] #### E N D M E D R E C ####
    BUILD SUCCESSFUL
    Total time: 2 minutes 22 seconds

 


Best Practices

 


The Big Picture

The MedRec application suite has many dependencies that require coordination during the build process. When you run the master build file, the following events occur:

  1. The contents of startBrowserEar and initEar are compiled using the wlcompile task.
  2. The contents of the security directory are compiled using the javac task.
  3. The contents of common are compiled. The common directory contains the Java source code for several kinds of objects used by different MedRec applications:
    • Utility classes—constants used throughout the application suite, exceptions, factories, and the ServiceLocator class. Servlets in the Web Tier of the MedRec application suite use ServiceLocator to lookup generic services such as Enterprise JavaBeans.
    • Value objects—classes that represent data passed between tiers of the MedRec suite.
    • Action classes—classes used by the struts framework to control page flow in the Web tier of the MedRec suite.
    • JavaBeans—component beans used in the Web tier.
  4. The medrecEar Enterprise Application is compiled. Although medrecEar uses the split development directory structure and the WebLogic Ant tasks in the build script, the application has several internal dependencies that are hard-coded in its build.xml script, using the include and exclude options to wlcompile.
  5. The physicianEar application is compiled. The Web Service clients in this application that invoke the Web Services of both the physicianEar and medrecEar applications are generated from the .wsdl files that were previously generated into the build directory by the jwsc Web Services Ant task.
  6. The MedRec application suite client applications, located in the clients directory, are compiled.

The deploy.dev target of the master build.xml file takes an additional step of packaging up the contents of the build directory for each application (initEar, medrecEar, and so on) and creating an exploded directory for each application in the dist directory. These exploded directories can be deployed to WebLogic Server in the standard way, outside of the split development directory framework. The next tutorials in this suite (Tutorial 14: Packaging MedRec for Distribution and Tutorial 15: Using WLST and the Administration Console to Deploy the MedRec Package for Production) go into more detail.

 


Related Reading


  Back to Top       Previous  Next