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


Configuring Domains and Servers


Tutorial 4: Using WebLogic Server Development Mode

This tutorial describes how to set up and use the new MedRec server instance in development mode. WebLogic Server provides two distinct server modes—development mode and production mode—that affect default configuration values and subsystem behavior for all server instances in a domain.

Development mode enables you to use the demonstration trusted CA certificates for security, and also allows you to deploy the MedRec applications directly from a development environment. (You will create the development environment in the next set of tutorials). For these reasons, you should always use development mode when building or testing your own applications.

Note: Because newly installed WebLogic Server instances use development mode by default, the steps in this tutorial are not strictly required. However, later tutorials that describe how to move from a development to a production environment depend on the changes you make now.

The tutorial includes the following sections:



Create the MedRec server domain. See Tutorial 1: Creating a WebLogic Domain and Server Instance for Development. You will modify the server start script that was created during that tutorial.



To put the MedRec server in development mode:

Step 1: Shut down the MedRec server (if currently running).

You must shut down the MedRec server because you edit its start script to explicitly place the server in development mode.

If the server is not currently running, go to Step 2: Edit the server startup file.

  1. Open the Administration Console by navigating in a browser to:
  2. http://host:7101/console

    where host refers to the computer on which MedRecServer is running. If your browser is on the same computer as MedRecServer, then you can use the URL http://localhost:7101/console.

  3. Specify weblogic for both the username and password and click Log In.
  4. In the left pane, expand MedRecDomainArrow symbolEnvironments.
  5. Click Servers.
  6. In the right pane, in the Servers table, click MedRecServer(admin).
  7. Select the ControlArrow symbolStart/Stop tab.
  8. At the bottom of the page, in the Server Status table, check MedRecServer(admin).
  9. Click ShutdownArrow symbolWhen Work Completes.
  10. Click Yes.
  11. Note: Because you are shutting down the Administration Server, which is what you connect to when you invoke the Administration Console, you will get message in your browser once the server actually shuts down, saying it is no longer available.

Step 2: Edit the server startup file.

Development mode (or production mode) is set for all servers in a given domain by supplying a command line option to the domain’s Administration Server. Because the MedRec tutorials use two stand-alone servers in separate domains, you must edit each server’s startup script to add the command line option.

  1. In a command-line shell, move to the root directory of the MedRec domain:
  2. prompt> cd c:\bea\user_projects\domains\MedRecDomain\bin
  3. Open the setDomainEnv.cmd (Windows) or setDomainEnv.sh (UNIX) script in a text editor:
  4. prompt> notepad setDomainEnv.cmd
  5. Look for the line that sets the PRODUCTION_MODE script variable:
  7. Add “false” to the value of the PRODUCTION_MODE variable to ensure the server starts in development mode:
  8. set PRODUCTION_MODE=false
  9. Save your changes and exit the text editor.

Step 3: Restart the server and verify development mode.

Reboot the server to ensure that it starts up in development mode:

  1. Start the MedRec server by executing its startup script:
  2. prompt> c:\bea\user_projects\domains\MedRecDomain\startWebLogic.cmd
  3. Observe the server startup message to determine the startup mode. The following line indicates that the server is using development mode:
  4. <Apr 5, 2007 10:39:39 AM PDT> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "MedRecServer" for domain "MedRecDomain" running in Development Mode>
    <Apr 5, 2007 10:39:40 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Apr 5, 2007 10:39:40 AM PDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>


Best Practices


The Big Picture

The MedRec application uses the sample trusted CA certificates installed with WebLogic Server to enable SSL authentication and demonstrate WebLogic Server security features in later tutorials. Development mode allows you to use the sample certificate files when you work through later security tutorials.

In the next series of tutorials, you will create a development directory structure for MedRec that shows how to manage source code and compiled code separately when developing Enterprise Applications with WebLogic Server. Development mode allows you to deploy applications directly from the development directory, without having to package applications into .jar files or exploded .jar directories.


Related Reading

  Back to Top       Previous  Next