Oracle WebLogic Server ships with the PointBase database management system so that you can run code examples with a functional database server. The samples installed also include scripts to recreate the "demo" database in PointBase or create it in Oracle or another database management system (DBMS). See the following sections for more information:
PointBase Server is for demonstration (that is, non-production) use only. For more information about PointBase, see Using PointBase with Oracle WebLogic Server.
The examples installed with Oracle WebLogic Server include the PointBase "demo" database. The wl_server examples domain includes JDBC data sources configured to use the demo database out-of-the-box. You do not need to configure the database or database connectivity when running the examples in the wl_server domain. PointBase documentation is located in the WL_HOME/common/eval/pointbase/../../docs/ directory of your installation. The information in the following sections can help you configure database connectivity if you want to run the examples from a different domain or if you want to recreate the data in the database.
Make sure that the PointBase server is running and that you have the following information:
The PointBase server starts automatically when the examplesServer in the wl_server domain is started. To make sure that the PointBase server is running, you can open the PointBase Console. See Opening the PointBase Console. If you are running examples in a different domain, you can manually start the PointBase server. See Starting PointBase Server.
Follow these steps to configure Oracle WebLogic Server example property values and populate the PointBase database with sample data:
This Ant target creates the tables and inserts sample data.ant db.setup.pointbase
Some Oracle WebLogic Server examples use database connections from JDBC data sources configured in the wl_server domain installed with the Oracle WebLogic Server examples. If you want to run an example in a different domain, you may need add one or more of the data sources to your WebLogic domain.
Name of - Enter examples-demo.
JNDI Name - Enter examples-dataSource-demoPool.
Database Type - Select PointBase or the DBMS of the database to which you want to connect. If your DBMS is not listed, select Other.
Database Driver - Select PointBase's Driver (Type 4) Versions:4.X,5.X or another non-XA JDBC driver that you want to use to connect to the database.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The PointBase driver is installed with Oracle WebLogic Server.
Click Next to continue.
Click Next to continue.
Database Name - Enter demo or the name of the database to which you want to connect.
Host Name - Enter localhost or the DNS name or IP address of the server that hosts the database.
Port - Enter 9092 for PointBase or enter the port on which the database server listens for connections requests.
Database User Name - Enter examples for the "demo" database installed with the Oracle WebLogic Server examples or if you are using a different database, enter the database user account name that you want to use for each connection in the data source.
Password/Confirm Password - Enter examples for the "demo" database or enter the password for the database user acccount specified above.
Click Next to continue.
Oracle WebLogic Server attempts to create a connection from the Administration Server to the database. Results from the connection test are displayed at the top of the page. If the test is unsuccessful, you should correct any configuation errors and retry the test.
If the JDBC driver you selected is not installed on the Administration Server, you should click Next to skip this step.
Click Next to continue.
Name of - Enter examples-demoXA.
JNDI Name - Enter examples-dataSource-demoXAPool.
Database Type - Select PointBase or the DBMS of the database to which you want to connect. If your DBMS is not listed, select Other.
Database Driver - Select PointBase's Driver (Type 4 XA) Versions:4.X,5.X or another XA JDBC driver that you want to use to connect to the database.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The PointBase driver is installed with Oracle WebLogic Server.
Click Next to continue.
Database Name - Enter demo or the name of the database to which you want to connect.
Host Name - Enter localhost or the DNS name or IP address of the server that hosts the database.
Port - Enter 9092 for PointBase or enter the port on which the database server listens for connections requests.
Database User Name - Enter examples for the "demo" database installed with the Oracle WebLogic Server examples or if you are using a different database, enter the database user account name that you want to use for each connection in the data source.
Password/Confirm Password - Enter examples for the "demo" database or enter the password for the database user acccount specified above.
Click Next to continue.
Oracle WebLogic Server attempts to create a connection from the Administration Server to the database. Results from the connection test are displayed at the top of the page. If the test is unsuccessful, you should correct any configuation errors and retry the test.
If the JDBC driver you selected is not installed on the Administration Server, you should click Next to skip this step.
Click Next to continue.
Name of - Enter examples-demoXA-2.
JNDI Name - Enter examples-demoXA-2.
Database Type - Select PointBase or the DBMS of the database to which you want to connect. If your DBMS is not listed, select Other.
Database Driver - Select PointBase's Driver (Type 4 XA) Versions:4.X,5.X or another XA JDBC driver that you want to use to connect to the database.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The PointBase driver is installed with Oracle WebLogic Server.
Click Next to continue.
Database Name - Enter demo or the name of the database to which you want to connect.
Host Name - Enter localhost or the DNS name or IP address of the server that hosts the database.
Port - Enter 9092 for PointBase or enter the port on which the database server listens for connections requests.
Database User Name - Enter examples for the "demo" database installed with the Oracle WebLogic Server examples or if you are using a different database, enter the database user account name that you want to use for each connection in the data source.
Password/Confirm Password - Enter examples for the "demo" database or enter the password for the database user acccount specified above.
Click Next to continue.
Oracle WebLogic Server attempts to create a connection from the Administration Server to the database. Results from the connection test are displayed at the top of the page. If the test is unsuccessful, you should correct any configuation errors and retry the test.
If the JDBC driver you selected is not installed on the Administration Server, you should click Next to skip this step.
Click Next to continue.
If you prefer to run samples using an Oracle DBMS, you can create the appropriate data in your Oracle database and configure the wl_server domain to connect to your Oracle database.
Before you begin, ensure that you have access to an Oracle database with a user account with the appropriate privileges for creating and dropping tables and inserting records. Make sure that the database server is running and that you have the following information:
This information is available in the tnsnames.ora file, which typically resides in $ORACLE_HOME/network/admin on unix.os platforms and ORACLE_HOME\network\admin on Windows platforms. Additional information about your Oracle setup can be found in the listner.ora file, which resides in the same directory. See http://docs.oracle.com/.
The listed property values are used to connect to the database server when updating the database with tables and data required by Oracle WebLogic Server to run the sample applications.
Follow these steps to configure Oracle WebLogic Server example property values and populate the Oracle Database with sample data:
This Ant target creates tables and inserts sample data.ant db.setup.oracle
To use a database server other than PointBase, Oracle, or MySQL, create a db.setup.db_vendor target in the build.xml file, similar to db.setup.pointbase, and set the driver class, url, and host, user, and password for the server.
To use an Oracle database with the Oracle WebLogic Server examples, after configuring the database, configure JDBC data sources in the wl_server domain or the domain in which you want to run the examples. Follow the steps in the following sections to configure data sources used in sample applications. These instructions assume that you are modifying the existing data sources in the wl_server domain or that you created following instructions in Configuring JDBC Data Sources for PointBase.
URL - Enter the database URL in the following format: jdbc:bea:oracle://db_server:port
Driver Class Name - Enter weblogic.jdbc.oracle.OracleDriver
Properties - Enter the following properties, and replace the values with values for your environment:
user=dbuser
portNumber=1521
SID=db_service_name
serverName=db_server
Password/Confirm Password - Enter the password for the database user account specified in the properties list.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The WebLogic Type 4 Driver for Oracle driver is installed with Oracle WebLogic Server.
URL - Enter the database URL in the following format: jdbc:bea:oracle://db_server:port
Driver Class Name - Enter weblogic.jdbcx.oracle.OracleDataSource
Properties - Enter the following properties, and replace the values with values for your environment:
user=dbuser
portNumber=1521
SID=db_service_name
serverName=db_server
Password/Confirm Password - Enter the password for the database user account specified in the properties list.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The WebLogic Type 4 XA Driver for Oracle driver is installed with Oracle WebLogic Server.
URL - Enter the database URL in the following format: jdbc:bea:oracle://db_server:port
Driver Class Name - Enter weblogic.jdbcx.oracle.OracleDataSource
Properties - Enter the following properties, and replace the values with values for your environment:
user=dbuser
portNumber=1521
SID=db_service_name
serverName=db_server
Password/Confirm Password - Enter the password for the database user account specified in the properties list.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The WebLogic Type 4 XA Driver for Oracle driver is installed with Oracle WebLogic Server.
Some code examples that demonstrate Oracle advanced features may require an additional data source that uses the Oracle Thin driver. The examples-oracleXA is configured in the wl_server domain, but must be modified to fit your environment.
URL - Enter the database URL in the following format: jdbc:oracle:thin:@db_server:port:SID
Driver Class Name - Enter oracle.jdbc.xa.client.OracleXADataSource
Properties - Replace the user value with a database user name for your database:
user=dbuser
Password/Confirm Password - Enter the password for the database user account specified in the properties list.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The Oracle Thin driver is installed with Oracle WebLogic Server.
If you prefer to run samples using an MySQL DBMS, you can create the appropriate data in your MySQL database and configure the wl_server domain to connect to your MySQL database.
The listed property values are used to connect to the database server when updating the database with tables and data required by Oracle WebLogic Server to run the sample applications.
Follow these steps to configure Oracle WebLogic Server example property values and populate the MySQL Database with sample data:
This Ant target creates tables and inserts sample data.ant db.setup.mysql
To use a database server other than PointBase, Oracle, or MySQL, create a db.setup.db_vendor target in the build.xml file, similar to db.setup.pointbase, and set the driver class, url, and host, user, and password for the server.
To use a MySQL database with the Oracle WebLogic Server examples, after configuring the database, configure JDBC data sources in the wl_server domain or the domain in which you want to run the examples. Follow the steps in the following sections to configure data sources used in sample applications. These instructions assume that you are modifying the existing data sources in the wl_server domain or that you created following instructions in Configuring JDBC Data Sources for PointBase.
URL - Enter the database URL in in the jdbc:mysql://host_name:port/database_name format
Driver Class Name - Enter com.mysql.jdbc.Driver
Properties - Not needed if you use an anonymous account. Otherwise, set user=your user name.
Password/Confirm Password - If needed, enter the password for the database user account specified in Properties.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The MySQL driver is not installed with Oracle WebLogic Server. See Using Third-Party JDBC Drivers with Oracle WebLogic Server.
URL - Enter the database URL in in the jdbc:mysql://host_name:port/database_name format
Driver Class Name - Enter com.mysql.jdbc.Driver
Properties - Not needed if you use an anonymous account. Otherwise, set user=your user name.
Password/Confirm Password - If needed, enter the password for the database user account specified in Properties.
Note: You must install JDBC drivers before you can use them to create database connections. Some JDBC drivers are installed with Oracle WebLogic Server, but not all listed drivers are installed. The MySQL driver is not installed with Oracle WebLogic Server. See Using Third-Party JDBC Drivers with Oracle WebLogic Server.
Copyright © 1996, 2009, Oracle and/or its affiliates. All Rights Reserved.