아는 것이 좋은 것이다.

[JEUS] DB 이중화 설정 본문

서버

[JEUS] DB 이중화 설정

start0 2016. 2. 3. 12:58

JEUSMain.xml 파일을 열어서 아래와 같이 property를 작성하여 준다.


<database>

    <vendor>oracle</vendor>

    <export-name>sbdc_online</export-name>

    <data-source-target>container1</data-source-target>

    <data-source-class-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-class-name>

    <data-source-type>ConnectionPoolDataSource</data-source-type>

    <property>

       <name>URL</name>

       <type>java.lang.String</type>

       <value>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=OFF)(FAILOVER=ON) (ADDRESS=(PROTOCOL=TCP)(HOST=[아이피-1])(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=[아이피-2])(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=[서비스 이름 (SID로 하면 이중화 불가)])))</value>

    </property>

    <property>

       <name>User</name>

       <type>java.lang.String</type>

       <value>[계정 아이디]</value>

    </property>

    <property>

       <name>Password</name>

       <type>java.lang.String</type>

       <value>[계정 패스워드]</value>

    </property>

    <connection-pool>

       <pooling>

 <min>40</min>

 <max>40</max>

 <step>10</step>

 <period>3600000</period>

       </pooling>

       <wait-free-connection>

 <enable-wait>true</enable-wait>

 <wait-time>60000</wait-time>

       </wait-free-connection>

       <check-query>select 1 from dual</check-query>

       <check-query-timeout>60000</check-query-timeout>

       <check-query-period>600000</check-query-period>

    </connection-pool>

 </database>



'서버' 카테고리의 다른 글

[JEUS] DB 커넥션 설정  (0) 2016.01.08
Comments