Moving to Production Mode

Tutorial 17: Moving from a Development to a Production RDBMS Such As Oracle

This tutorial describes how to move from the Pointbase database, typically used for development, to an Oracle database that could be used in a production environment.

The tutorial includes the following sections:

 

 

 

Prerequisites

Before starting this tutorial:

 

 

 

Procedure

Follow these steps to move to an Oracle database:

Question: Do users need to redeploy the application for the changes to take effect?

When you rerun the MedRec application, it will be using the Oracle database rather than the Pointbase database.

Step 2: Create the MedRec Tables and Populate Them With Data

Stuff to talk about:

Step 3: Shut down MedRecServer (If Currently Running)

You must shut down the MedRecServer because you edit its start script to update the CLASSPATH variable of the server.

If the MedRecServer is not currently running, go to Step 4: Add the Oracle JDBC Driver Class to the MedRecServer CLASSPATH.

  1. Invoke the Administration Console by entering the following URL in your browser:
    http://host:7101/console
    

    where host is the computer on which the WebLogic Administration Server is running.

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

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

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

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

  6. Click Yes.

Step 4: Add the Oracle JDBC Driver Class to the MedRecServer CLASSPATH

The MedRecServer server needs to have the Oracle JDCB driver class added to its CLASSPATH variable before it can connect to an Oracle database. You update the WebLogic Server CLASSPATH variable by editing the script that starts the MedRecServer server, as described in the following procedure.

  1. Open a command prompt window.

  2. Change to MedRecDomain domain directory.

    The MedRecDomain directory is bea_home\user_projects\MedRecDomain, where bea_home refers to the main BEA home directory, typically c:\bea.

  3. Edit the files startWebLogic.cmd and startManagedWebLogic.cmd, adding the following lines after the SETLOCAL command:
    PUT ORACLE INFO HERE
    

    replacing bea_home with the main BEA home directory, typically c:\bea.

Step 5: Restart the MedRec Server

  1. From the Windows Start menu, choose:

    Start—>Programs—>BEA—>WebLogic Platform 7.1—>User Projects—>MedRecDomain—>Start Server

  2. As the server starts, the system prompts you to enter a username to start the server. Enter weblogic (or the username you specified for the administrative user when creating the domain in Tutorial 1: Creating WebLogic Domains and Server Instances for Development) and click Enter.

  3. The system also prompts you to enter the password for the administrative user. Enter weblogic (or the password you specified for the administrative user when creating the domain in Tutorial 1: Creating WebLogic Domains and Server Instances for Development) and click Enter.

Step 6: Invoke the Administration Console in Your Browser

  1. Enter the following URL in your browser:
    http://host:7101/console
    

    where host is the computer on which the WebLogic Administration Server is running.

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

Step 7: Create a JDBC Connection Pool for Oracle

Step 8: Update the JDBC DataSource to Use the Oracle Connection Pool

 

 

 

Best Practices

 

 

 

The Big Picture

Describe how the material covered in this tutorial fits into the big-picture architecture of Medrec.

 

 

 

Related Reading

 

back to top