Step 4: Creating a data source and connection pool
Create a JDBC data source and connection pool.
Procedure
- In the WebLogic Server administration console, in Domain Configurations, under Services click Data Sources.
- In the Summary of JDBC Data Sources page, on the Configuration tab, in the Data Sources table, click New > Generic Data Source.
- In the Create a New JDBC Data Source page, name your data source (for example, Rule Execution Server Data Source) and type jdbc/resdatasource for the JNDI name.
- Select the type from the Database Type drop-down menu and click Next. For example, select Derby.
- In the next panel, select a driver from the Database
Driver drop-down menu to connect to the database and click Next.
The best practice is to use the XA database driver.
- If you created a connection pool with a non-XA driver and you want to allow your data source to be involved in XA transactions, select Emulate Two-Phase Commit. The Supports Global Transactions option is selected by default. Click Next.
- Define the Connection Properties and
click Next. For example, for a Derby database:
Table 1. Connection properties for a Derby database Property Value Database name resdb;create=true Host name localhost Port number 1527 Database user name resdbUser Password resdbUser - In the Test Database Connection page,
click Test Configuration to ensure that the
connection pool is operational, and then click Next. If the console displays the following message, your connection
pool is ready to be used.
Connection test succeeded. - In the next panel of the Create a New JDBC Data Source page, in the Servers table, select the AdminServer check box and click Finish.
Results
Parent topic: Configuring Rule Execution Server on WebLogic Server