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:

Prerequisites

Before starting this tutorial, 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.

Procedure

Follow these steps to put 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. Invoke the Administration Console for MedRecServer by entering the following URL in your browser:
    http://127.0.0.1:7101/console
    
    

  2. Enter weblogic as the username and password, then click Sign In.

  3. In the left pane, open the Servers node.

  4. Right-click MedRecServer and select Start/Stop This Server.

  5. In the right pane, click Graceful shutdown of this server.

  6. Click Yes.

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 standalone servers in separate domains, 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:
    cd c:\bea\user_projects\domains\MedRecDomain
    
    

  2. Open the startWebLogic.cmd or startWebLogic.sh script in a text editor:
    notepad startWebLogic.cmd
    
    

  3. Look for the PRODUCTION_MODE script variable:
    set PRODUCTION_MODE=
    
    

  4. Add "false" to the value of the PRODUCTION_MODE variable to ensure the server starts in development mode:
    set PRODUCTION_MODE=false
    
    

  5. Save your changes and exit the text editor.

Step 3: Restart the server and verify development mode.

After editing the server start script, reboot the server to ensure that it starts up in development mode:

  1. Start the MedRec server by executing its startup script:
    C:\bea\user_projects\domains\MedRecDomain\startWebLogic.cmd
    
    

  2. Observe the server startup message to determine the startup mode. The following line indicates that the server is using development mode:
    <Jul 10, 2003 5:40:01 PM PDT> <Notice> <WebLogicServer> 
    <BEA-000331> <Started WebLogic Admin Server "MedRecServer" for 
    domain "MedRecDomain" running in Development 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 working 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