Monday, November 19, 2012

Configuring Data Sources in WebLogic Server 11g


Steps to Create and Configure  Data Sources


Step 1:
Login to Adminstration Console, in the Change Center  click Lock & Edit

Step2:
In the Domain Structure tree, expand Services, then select Data Sources

Step3:
On the Summary of Data Sources page, click New and select Generic Data Source

Step 4:
On the JDBC Data Sources Properties page, enter or select the following information:
    • Name -Enter a name for this JDBC data source.
    • JNDI Name - Enter the JNDI path to where this JDBC data source will be bound
    • Database Type - Select the type of database that you want to connect to.
              Click Next to continue
Step 5:
Select the database driver that you want to use to connect to database

Step 6:



  • On the Transaction Options page, follow these steps.
  • Depending on the driver you selected on the JDBC Data Source Properties page, you may not need to specify any of these options.

    Supports Global Transactions - Select this check box (the default) to enable global transaction support in this data source. 

    If you selected Supports Global Transactions, select an option for transaction processing: (available options vary depending on whether you select an XA driver or a non-XA driver)

    1. Two-Phase Commit - Select this option to enable standard XA processing. (This option is only available when you select an XA JDBC driver to make database connections)
    2. Logging Last Resource - Select this option to enable a non-XA JDBC connection to participate in global transactions using the Logging Last Resource (LLR) transaction optimization. This option is only available when you select a non-XA JDBC driver to make database connections.
    3. Emulate Two-Phase Commit - Enables a non-XA JDBC connection to emulate participation in distributed transactions using This option is only available when you select a non-XA JDBC driver to make database connections.
    4. One-Phase Commit - Select this option to enable the non-XA connection to participate in a global transaction as the only transaction participant. This option is only available when you select a non-XA JDBC driver to make database connections.
         Click Next to continue


    Step 7:
    On the Connection Properties page, enter values for the following properties:

    • Service Name
    • Database Name 
    • Host Name 
    • Port 
    • Database User Name
    • Password
    • Confirm Password

    Click Next to continue

    Step 8:
    On the Test Database Connection page, review the connection parameters and click Test Configuration. WebLogic 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 configuration errors and retry the test.

    Click Next to continue.

    Step 9:
    On the Select Targets page, select the servers or clusters on which you want to deploy the data source.

    Step 10:
    Click Finish to save the JDBC data source configuration and deploy the data source to the targets that you selected. To activate these changes, in the Change Center of the Administration Console, click Activate Changes.