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.
- 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.
- Enter weblogic as the username and password, then click Sign In.
- In the left pane, click to open the Servers node.
- Right-click MedRecServer and choose Start/Stop This Server.
- In the right pane, click Graceful shutdown of this server.
- 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.
- Open a command prompt window.
- 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.
- 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
- From the Windows Start menu, choose:
Start—>Programs—>BEA—>WebLogic Platform 7.1—>User Projects—>MedRecDomain—>Start Server
- 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.
- 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
- Enter the following URL in your browser:
http://host:7101/console
where host is the computer on which the WebLogic Administration Server is running.
- 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
|
Copyright © 2002 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
|