Sun N1 Service Provisioning System User's Guide for BEA WebLogic 8 Plug-In 3.0

Solaris: Running the WebLogic 8 Demonstration Application: Avitek Medical Records

The Avitek Medical Records demonstration is included in the WebLogic 8 Plug-In to illustrate how to provision BEA WebLogic 8 and a custom application. This demonstration runs on the Solaris OS only. All demo-related plans and components exist in the /com/sun/weblogic8/demo/ folder.

Installing the Sample Application

To install the demo application, run the installDemoAppPlan plan. This plan sets up the database and configures the JMS and JDBC resources for the managed server. The JMS and JDBC components are created from existing component types.

The InstallDemoAppPlan performs the following tasks.

ProcedureHow to Compile the Sample Application

Before you install the Avitek Medical Records sample application, you must compile the application. Follow these steps.

Steps
  1. If you created a domain for the sample application, source the environment script in the sample application domain directory.


    # BEA-InstallDirectory/user_projects/domains/medrec/setMedRecEnv.sh
    

    In the previous example, BEA-InstallDirectory specifies the BEA WebLogic home directory, for example, /export/home/bea.

  2. Change directories to the src directory of the sample application.


    # BEA-InstallDirectory/weblogic81/samples/server/medrec/src
    
  3. Use the ant build utility to build the sample application source.


    # ant
    
  4. Create an XML file named package.xml with content that is similar to the following example.

    <project name="tutorial" default="package">
             <target name="package">
                <wlpackage srcdir="/export/home/bea/weblogic81/samples/server/medrec/src/medrecEar"
                           destdir="/export/home/bea/weblogic81/samples/server/medrec/build/medrecEar"
                           toFile="/export/home/bea/weblogic81/samples/server/medrec/dist/medrecEar.ear" />
             </target>
         </project>

    In the wlpackage element, change the paths for srcdir, destdir, and toFile to point to the appropriate directories on your system.

  5. Save this file to the BEA-InstallDirectory/weblogic81/samples/server/medrec/src/medrecEar directory.

  6. Repeat Step 4 and Step 5 to create package.xml files for the physicianEar and startupEar directories.

    Change the paths for srcdir, destdir, and toFile to point to the appropriate physicianEar and startupEar directories. Save each package.xml file to the appropriate subdirectory of the BEA-InstallDirectory/weblogic81/samples/server/medrec/src directory.

  7. Use the ant build utility in each EAR directory to update the build with the contents of the package.xml file.


    # cd BEA-InstallDirectory/weblogic81/samples/server/medrec/src/EAR-dir
    # ant -f package.xml
    

    In the previous example, EAR-dir specifies either the medrecEar, the physicianEar or the startupEar directory.

    The medrecEar.ear, the physicianEar.ear, and the startupEar.ear files are created in the BEA-InstallDirectory/weblogic81/samples/server/medrec/dist directory.

ProcedureHow to Install the Sample Application

Before You Begin

Before you can run the Avitek Medical Records demonstration, the following procedures must be performed.

You must perform the previous procedures after you install or upgrade to the 3.0 version of the WebLogic 8 Plug-In version 3.0.

Steps
  1. Convert the WebLogic demonstration expanded EAR directories to .ear files.

    The WebLogic demonstration files are located at BEA-InstallDirectory/weblogic81/samples/server/medrec/dist/. You need to convert the medrecEar, physicialEar, and startupEar directories.

    1. From inside each directory, create an .ear file.

      Use the following command syntax: jar cvf jar-file input-files


      From the startupEar directory
      # jar cvf startupEar.ear .
  2. Create components out of the demonstration .ear files.

    For more information, see How to Capture a WebLogic Enterprise Application or EAR File.


    Note –

    You need to save your components in a folder that is not owned by the WebLogic 8 plug-in.


  3. Create session variables for the WebLogic application.

    Create the following session variable.

    WL_POINTBASE_PORT

    Specifies the port to use for the WebLogic application. The value for WL_POINTBASE_PORT can be any open port number. The default value is 9092.

  4. From the Common Tasks page, click Demo Application Configuration: Configure.

    The plan Details page displays.

  5. Click Run.

  6. Leave the plan parameter component variables set at the default value.

  7. Select a managed server as the target host.

  8. Install the demo application EAR components.

    1. On the WebLogic plug-in Common Tasks page, click Create in the Enterprise Application (EAR) section.

    2. Navigate to the folder in which you installed the medrecEar.ear component.

    3. Run the component's Default:Install component procedure.

    4. Repeat steps Step b through Step c for the physicianEar.ear and the startupEar.ear components.

  9. View the Avitek Medical Records demonstration applications.

    You can see the three demonstration applications at the following urls.

    • http://RA-hostname:7010/patient

    • http://RA-hostname:7010/admin

    • http://RA-hostname:7010/physician