Sun Identity Manager 8.1 Installation

Configuring a WebLogic Data Source for Identity Manager

Use the following procedure to update the repository configuration in Identity Manager to point to a WebLogic Data Source.

This section is organized into the following steps:

Create a WebLogic Data Source

This example procedure describes configuration steps to use an Oracle database driver. Specific entries you make will differ, depending on your database type.

Note –

These steps assume that you have:

Create a Connection Pool

ProcedureTo Create a Connection Pool

  1. Log in to the WebLogic Administrator Web console (by default, http://localhost:7001/console/).

  2. Expand the Services folder for the domain located in the navigation (left) pane.

  3. Expand the JDBC folder.

  4. Expand the Connection Pools folder.

  5. In the right pane (JDBC Connection Pools), click Configure a new JDBC Connection Pool.

  6. For Database Type select Oracle. You can use any of the applicable types. Note that drivers must be installed in order to use them.

  7. Select an applicable drive in the Database Driver selection box. In this example, select Oracle’s Driver (Thin).

  8. Click Continue.

  9. Configure the JDBC driver as follows:




    Choose a unique name that identifies your connection pool. For example: myOraConnPool. 

    Database Name 

    Select the name of the Oracle database that you wish to connect to. In this example myOraDB. 

    Host Name 

    Specify the host name of the Oracle DB server. 


    Specify the port (default is 1521) for the database server. 

    Database User Name 

    Specify the database account user's name used in the connection. 


    Specify the password for the account user. 

  10. Click Continue.

  11. Test the database connection on this page or click Skip this step. You may need to add additional properties depending on your installation. See the administrator’s guide for your target database.

    Note –

    The following Connection Pool Settings are dependent on the driver that you select. The following options are for the Oracle driver and may not be applicable if you choose another kind of driver.

    The JDBC drivers must be installed for this to succeed. Follow the instructions provided with your target driver.

  12. Click Create and deploy.

  13. Configure connection settings for this connection pool:

    Example Connection Settings:
    Initial Capacity:20
    Maximum Capacity:100
    Capacity Increment: 10
    Statement Cache Type: LRU
    Statement Cache Size: 20

Create a JDBC Data Source

ProcedureTo Create a JDBC Data Source

  1. Expand the Services folder for the domain located in the navigation (left) pane.

  2. Expand the JDBC folder.

  3. Expand the Data Source folder.

  4. In the right pane (JDBC Data Sources), click Configure a new JDBC Data Source.

  5. Configure the JDBC Data Source as follows:




    Choose a unique name for this data source. This name is used as a reference throughout the WebLogic Console. For example, MyOraDataSource. 

    JNDI Name 

    Specify the JNDI name. This can be the same as the Data Source name. For example MyOraDataSource. 

    Honor Global Transactions  

    Select this check box (selected by default) if you want to enable global transactions using this data source (see WebLogic online help for more information concerning this option). In this example we keep the default. 

    Emulate Two-Phase Commit for non-XA Driver 

    See the WebLogic documentation for further information. 

  6. Click Continue.

  7. Select the connection pool from part A. This allows an application to get a connection from the underlying connection pool.

  8. Click Continue.

  9. Select the servers on which you want deploy the new data source.

  10. Click Create.

    Note –

    The configuration steps are saved in your WebLogic config.xml file for a given domain. Changes to the XML file appear as:

    <JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
    Name="myOraConnPool" Password="{3DES}7Ne5r7/NaLfLyXYQGBHoYg=="
    Properties="user=myuser" Targets="myserver"
    TestTableName="SQL SELECT 1 FROM DUAL" URL="jdbc:oracle:thin:@my.hostname:1521:mydatabasename"/>
    <JDBCTxDataSource JNDIName="MyOraDataSource"
    Name="MyOraDataSource" PoolName="MyOraConnPool" Targets="myserver"/>

Point the Identity Manager Repository to the Data Source

ProcedureTo Point the Identity Manager Repository to the Data Source

  1. Set the WSHOME environment variable to point to your Identity Manager installation; for example:

    set WSHOME=C:\bea\user_projects\domains\mydomain\applications\idm
  2. Make sure that the JAVA_HOME environment variable is set correctly; for example:

    set JAVA_HOME=C:\j2sdk1.5
  3. Make sure that your chosen database drivers are installed for you Weblogic Server. See the WebLogic documentation for further information. In this example, the Oracle drivers and classes12.jar are installed in following directory:

    1. On Windows, set the class path to include these files:

      set CLASSPATH=%CLASSPATH%;WeblogicHome\server\lib<MyDBLibrary>

      For Oracle, set the class path to include these files:

      set CLASSPATH=%CLASSPATH%;c:\bea\weblogic81\server\lib\

  4. Include weblogic.jar in your CLASSPATH. On Windows, enter:

    set CLASSPATH=%CLASSPATH%;WeblogicHome\server\lib\weblogic.jar

    For example:

    set CLASSPATH=%CLASSPATH%;c:\bea\weblogic81\server\lib\weblogic.jar
  5. Change to the %WSHOME% directory (Windows), or $WSHOME (UNIX).

  6. Remove the j2ee.jar file from WEB-INF\lib\ after making a backup.

  7. Change directory to the %WSHOME%\bin directory (Windows), or $WSHOME/bin directory (UNIX).

  8. Point the repository to the new location. For example:

    lh setRepo -v -tOracle -iweblogic.jndi.WLInitialContextFactory -fDatasourceName 
    -u"t3:Server:Port" -U"Username" -P"Password"

    For example:

    lh setRepo -v -tOracle -iweblogic.jndi.WLInitialContextFactory -fMyOraDataSource 
    -u"t3://localhost:7001/" -U"weblogic" -P"weblogic"

    Note –

    Change the -f location flag to match the value you selected for the JNDI Name field.

  9. If there are no reported errors, restart WebLogic to pick up the changes. (This also restarts the Identity Manager system.)