Skip navigation.

Avitek Medical Records Development Tutorials

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Configuring Domains and Servers

 


Tutorial 1: Creating a WebLogic Domain and Server Instance for Development

In this tutorial you use the WebLogic Server Configuration Wizard to create a domain and server to deploy and run the MedRec applications.The tutorial also shows you how to start the server.

The Configuration Wizard asks for information about the domain you want to create based on the configuration template you select, and then creates a config.xml file, along with other supporting configuration XML files, for the domain based on your responses. The Configuration Wizard also creates startup scripts for the server instances in the domain, and other helper files and directories to help you start and use the new domain and its servers. You will work with these scripts and directories in later tutorials.

The tutorial includes:

 


Prerequisites

Before starting this tutorial:

 


Procedure

To create the MedRec domain and the WebLogic Server instance to which you will deploy MedRec, follow these steps. You will use the domain and server in later tutorials.

Step 1: Create the MedRec domain and MedRec server.

The MedRec domain includes a single server that will host the MedRec back-end services, the MedRec Administration application, and the Patient application (both applications are Web applications).

  1. Launch the Configuration Wizard:
  2. Start—>All Programs—>BEA Products—>Tools—>Configuration Wizard

  3. In the Welcome window, select Create a new WebLogic domain.
  4. Click Next.
  5. In the Select Domain Source window, select the option that begins Generate a domain configured automatically ...
  6. For the sake of simplicity, do not check AquaLogic Service Bus or Apache Beehive.

  7. Click Next.
  8. In the Configure Administrative Username and Password window, enter:
  9. You use this username and password when you start the server and log in to the Administration Console.

    Note: In a production environment the user name and password should not be the same.

  10. Click Next.
  11. In the Configure Server Start Mode and JDK window, select:
  12. The Sun SDK is the default choice for Development mode. You can select either the Sun SDK or the JRockit SDK. The Sun SDK offers faster startup times, where as the JRockit SDK offers faster runtime performance on Intel architectures.

  13. Click Next.
  14. In the Customize Environments and Services Settings window, select Yes.
  15. Click Next.
  16. In the Configure the Administration Server window, enter or select:
  17. Click Next.
  18. Select Next in the following windows without making any changes:
  19. In the Review WebLogic Domain window, click on MedRecServer in the left pane and review your choices, then click Next.
  20. In the Create WebLogic Domain window:
    1. Enter MedRecDomain as the Domain Name.
    2. Click Create to create the MedRec domain in the folder displayed in the Domain Location text box. When the Configuration Wizard finishes creating the domain, the Domain Created Successfully! message is displayed.
  21. Click Done to close the Configuration Wizard.
  22. Do not check Start Admin Server.

Step 2: Enable log4j for logging application messages.

The MedRec application suite uses log4j for logging application messages. You must copy the log4j properties file from the pre-configured MedRec domain and identify it using a startup option in MedRecServer startup script. You also need to copy the log4j jar files to the lib directory of the MedRec domain. To complete these steps:

  1. Copy the log4j properties file from the pre-configured MedRec domain (under the main WebLogic Server installation directory) to the new domain you just created.
  2. For example, if you installed WebLogic Server in the c:\bea directory, then enter the following in a command-line shell:

    prompt> copy c:\bea\weblogic91\samples\domains\medrec\log4jConfig.xml c:\bea\user_projects\domains\MedRecDomain
  3. Open the setDomainEnv.cmd script, located in the bin directory of your newly created domain directory, for your new domain in a text editor. For example:
  4. prompt> notepad c:\bea\user_projects\domains\MedRecDomain\bin\setDomainEnv.cmd
  5. Find the following line in the setDomainEnv.cmd script:
  6. if NOT "%LOG4J_CONFIG_FILE%"=="" (
  7. Add the following two lines immediately before the line specified in the preceding step:
  8. set LOG4J_CONFIG_FILE=c:\bea\user_projects\domains\MedRecDomain\log4jConfig.xml
    for %%i in ("%LOG4J_CONFIG_FILE%") do set LOG4J_CONFIG_FILE=%%~fsi

    It is assumed in the preceding text that the MedRecDomain directory is c:\bea\user_projects\domains\MedRecDomain; enter your exact domain directory if it is different.

  9. Save the file and exit your text editor.
  10. Copy the log4j JAR files from the lib directory of the pre-configured MedRec domain to the lib directory of the new domain you just created:
  11. prompt> copy c:\bea\weblogic91\samples\domains\medrec\lib\*.jar c:\bea\user_projects\domains\MedRecDomain\lib 

    All JAR files in the lib subdirectory of a domain directory are automatically added to the WebLogic Server system CLASSPATH when the servers in the domain start up.

Step 3: Add the MedRecDBMSPlugin.jar to the server's CLASSPATH.

The MedRec application suite uses a custom DBMS authenticator to retrieve login credentials from the configured PointBase RDBMS for a given username. The Java class that implements this authenticator is in the MedRecDBMSPlugin.jar file, located in the already-installed MedRec domain. You must add the JAR file to the MedRecServer's CLASSPATH so that you can successfully configure the custom authenticator using the Administration Console (described in Tutorial 3: Configuring WebLogic Server Resources with the Administration Console).

  1. Open the setDomainEnv.cmd script, located in the bin directory of your domain directory, for your new domain in a text editor. For example:
  2. prompt> notepad c:\bea\user_projects\domains\MedRecDomain\bin\setDomainEnv.cmd
  3. Find the following line in the setDomainEnv.cmd script:
  4. set PRE_CLASSPATH=
  5. Update the PRE_CLASSPATH variable by adding the full path name of the MedRecDBMSPlug.jar file, which is located in the WL_HOME\samples\domains\medrec\security directory, where WL_HOME refers to the root directory of WebLogic Server (default c:\bea\weblogic91). For example:
  6. set PRE_CLASSPATH=c:\bea\weblogic91\samples\domains\medrec\security\MedRecDBMSPlugin.jar
  7. Save the file and exit your text editor.

Step 4: Start the MedRec Administration Server.

Start the MedRec Administration Server using one of the following methods:

From the Start menu:

Start—>All Programs—>BEA Products—>User Projects—>MedRecDomain—>Start Admin Server for WebLogic Server Domain

From a script:

  1. In a command-line shell, go to the root directory of the MedRec domain, typically c:\bea\user_projects\domains\MedRecDomain. For example, from the command prompt, enter:
  2. prompt> cd c:\bea\user_projects\domains\MedRecDomain
  3. Invoke the startWebLogic.cmd script to start the MedRec server:
  4. (Windows) prompt> startWebLogic.cmd

    (UNIX) prompt> ./startWeblogic.sh

During startup, you will see a message similar to the following once the server is ready to be used:

<Dec 9, 2005 10:52:20 AM PST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

 


Best Practices

 


The Big Picture

This tutorial is the basis for setting up your development environment. Before you can deploy applications to a server, you must first configure the domains and servers to which you want to deploy the applications. In this tutorial, you created the MedRec domain, which includes one server to host the MedRec applications. You use this domain for most tutorials.

 


Related Reading

 

Skip navigation bar  Back to Top Previous Next