Setting up data source for WebLogic

Setting up data source for WebLogic 8.1

The following section will take one database type (ASA/SQL Anywhere database with jConnect JDBC driver) as an example to show you how to create a data source for WebLogic, you can later create data sources for other database types by taking the same steps below but specifying different parameters according to Data source parameters.

You can create a connection pool and a data source using either the WebLogic server console or the configuration wizard.

Note: the JNDI name specified for the data source will be regarded as the data source name by Appeon Server and AEM.

Creating a JDBC connection pool

1. Start the WebLogic Server for your domain.

2. Log on to the WebLogic Server Console.

3. Go to Services > JDBC > Connection Pools.

Figure 2. Configure a JDBC connection pool

Configure a JDBC connection pool

4. Click the Configure a new JDBC Connection Pool link.

5. Select the database type and driver from the dropdown list boxes and click Continue.

Figure 3. Choose database

Choose database

6. Choose a name for the new connection pool (for example, appeontutor) and fill in the blanks for the ASA/SQL Anywhere database. Click Continue.

Table 14. Connection pool properties

Name

Input the name of the new connection pool

Driver classname

com.sybase.jdbc2.jdbc.SybDriver

URL

jdbc:sybase:Tds:hostname:2638/dbname (The default port of the ASA/SQL Anywhere database is 2638)

Database User name

Type the database login username. The username is set at the database server.

Password

Type the database login password. The password is set at the database server.


Figure 4. Data source properties

Data source properties

7. Test your connection to verify that you can connect to your database.

8. Create and deploy the new connection pool.

Configuring a JDBC data source

1. Go to Services > JDBC > Data Sources.

Figure 5. Configure a JDBC data source

Configure a JDBC data source

2. Click the Configure a new JDBC Data Source link.

3. Specify the new data source name and JNDI name and click Continue. You can use default values for the other options.

Note: The JNDI name will be used as the data source in AEM.

Figure 6. Data source properties

Data source properties

4. Select the newly created connection pool in the dropdown list box and click Continue.

Figure 7. Select the connection pool

Select the connection pool

5. Select the server to which you want to deploy the JDBC data source, and click Create.

Figure 8. Target the data source

Target the data source

6. Confirm the Deployed status of the data source is "true" in the JDBC Data Sources window.

Figure 9. Deployed status

Deployed status

Setting up data source for WebLogic 11g

The following section will take one database type (ASA/SQL Anywhere database with jConnect 6.0 JDBC driver) as an example to show you how to create a data source for WebLogic, you can later create data sources for other database types by taking the same steps below but specifying different parameters according to Data source parameters.

You can create a data source using either the WebLogic server console or the configuration wizard.

Detailed steps are as below:

Step 1: Start the Admin Server for WebLogic Server Domain.

Step 2: Log on to the WebLogic Server Administration Console.

Step 3: In the Domain Structure section, select Services > JDBC > Data Sources.

Step 4: On the summary of Summary of JDBC Data Sources page, click New.

Figure 10. The Summary of JDBC Data sources page

The Summary of JDBC Data sources page

Step 5: On the JDBC Data Source Properties page, enter or select the following information and then click Next.

Figure 11. JDBC Data Source Properties page

JDBC Data Source Properties page

Fill in details as required in the table below.

Table 15. JDBC Data Source Properties

Field

Description

Value

Name

Enter a desired new JDBC data source name.

Appeonsample

JNDI Name

Enter a JNDI name that you like to assign to your new JDBC Data Source.

Note: The JNDI name will be used as the data source name in AEM.

Appeonsample

Database Type

Select the database type from the dropdown list box.

SAP

Database Driver

Select the database drive from the dropdown list box.

SAP's Driver (Type 4) Versions:6.X


Step 6: On the Transactions Options page, check the Supports Global Transactions checkbox and select the One-Phase Commit radio button, and then click Next.

Figure 12. Transaction options

Transaction options

Step 7: On the Connection Properties page, enter the following information, and then click Next.

Figure 13. Connection Properties page

Connection Properties page

Fill in details as required in the table below.

Table 16. Connection Properties page

Field

Description

Value

Database Name

Enter a database name that you would like to connect.

Appeonsample

Host Name

Enter a host name or IP address of the database server.

192.0.3.142

Port

Enter a database port on the database server used to connect to the database.

2638

Database User Name

Enter the database account user name that you want to use to create the database connections.

dba

Password

Enter the database account password that you want to use to create the database connections.

sql

Confirm Password

Enter the same password for confirmation.

sql


Step 8: On the Test Database Connection page, specify the Driver Class Name and the URL, and then click Test Configuration. If the test is successful, A "Connection test succeeded" message appears at the top of the page. If the test is unsuccessful, you should correct any configuration errors and retry the test. And then click Next.

Figure 14. Test Database Connection page

Test Database Connection page

Fill in details as required in the table below.

Table 17. Specify the Driver Class Name and the URL

Field

Description

Value

Driver Class Name

Enter the driver name of the database specified.

com.sybase.jdbc3.jdbc.SybDriver

URL

Enter the server name of the database specified.

jdbc:sybase:Tds:Hostname:Port/ServiceName

For example: jdbc:sybase:Tds:192.0.3.142:2638/Appeonsample.


Step 9: On the Select Targets page, select the AdminServer check box, and then click Finish.

Figure 15. Select Targets Page

Select Targets Page

Step 10: On the Summary of JDBC Data Sources page, the Data Source that you created appears in the list, and then click the link to the name of the new data source in the Data Sources window.

Figure 16. Summary of JDBC Data Sources page

Summary of JDBC Data Sources page

Step 11: (Important) On the Settings for the base_domain page, click appeon in the Domain Structure section and then select Security tab page. Select Anonymous Admin Lookup Enabled check box and click Save. This will allow AEM to read the JNDI Names.

Figure 17. Settings for the base_domain page

Settings for the base_domain page

Step 12: Choose All Programs > Oracle WebLogic > User Projects > appeon from the Windows Start menu to restart your WebLogic server for configuration changes to take effect.

Step 13: In order to test the connection, please log on to Appeon AEM to configure a Transaction Object and then test it.