CAFE

WebLogic

[Portal]Portal DataSource 를 MultiDataSource 로 변경하는 방법

작성자Luke|작성시간08.08.09|조회수332 목록 댓글 0
Replace the JDBC data sources in your domain (except appsGroupSpaceDataSource) with multi-data sources pointing to your Oracle RAC.
  1. For each JDBC data source, create one physical data source pointing to each node in the RAC. For example, for p13nDataSource, create physical data sources p13nDataSource-1 to p13nDataSource-N, each pointing to one RAC node. Use the WebLogic Server Administration Console to create these data sources.

    Alternatively, you could create them by copying and updating the sample jdbc.xml files in the WL_HOME/portal/db/jdbc/oracle_thin directory following the steps below:

    1) Copy the dataSourceName-jdbc.xml file to DOMAIN_HOME/config/jdbc directory, and name it dataSourceName-n-jdbc.xml, where n is the sequence number of the n-th RAC node.

    2) Edit the file dataSourceName-n-jdbc.xml. Replace @DB_USER@, @DB_USER_PASSWD@, @DB_HOST@, @DB_PORT@ and @DB_NAME@. For @DB_HOST@ and @DB_NAME@, use the hostname and SID of the n-th RAC node.

    3) Edit config.xml to add this newly created JDBC data source as a JDBC system resource.

  2. Create a multi-data source for each of the JDBC data sources, which encompasses the physical data sources created above. For example, create a p13nDataSource multi-data source which includes p13nDataSource-1 to p13nDataSource-N created above.

    If you use the WebLogic Server Administration Console, you would need to first remove the existing data source with the same name, and then create the multi-data source. Also, since the WebLogic Server Administration Console does not provide a way to configure the value of global-transaction-protocol attribute for a multi-data source, you need to manually add the attribute into the corresponding jdbc.xml later.

    Alternatively, you could manually edit the corresponding jdbc.xml following the steps below:

    1) Open the corresponding jdbc.xml file, delete the jdbc-driver-params element and the jdbc-connection-pool-params element, including all their children elements:

    2) Between the jndi-name and the global-transactions-protocol elements, add the following two elements. Determine the value of algorithm-type from Table . The value of data-source-list is a comma-separated list of all the underlying physical data sources.

    <algorithm-type>Load-Balancing</algorithm-type>

    or

    <algorithm-type>Failover</algorithm-type>

    <data-source-list>portalDataSourceAlwaysXA-1,
    portalDataSourceAlwaysXA-2 </data-source-list>

  3. An alternative to the manual procedure described above in steps 1 and 2 is WLST scripting. The sample build.xml, oraracconf.py and oraracconf.py.properties provide an example of how to configure an existing WebLogic Portal domain to point to an Oracle RAC database. These files are listed in Sample WLST Scripts. To use the sample, follow the steps below:

    1) Download these files into your DOMAIN_HOME directory.

    2) Open the file oraracconf.py.properties. Edit the values in the "Database usernames and passwords" and the "ORACLE RAC configuration" sections to reflect your Oracle RAC environment.

    3) Open a command prompt, change current directory to DOMAIN_HOME/bin. Execute the following script:

    . ./setDomainEnv.sh (or setDomainEnv.cmd)

    4) Execute ant.

http://e-docs.bea.com/wlp/docs92/db/oracle.html#wp1076511

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼