2009. 5. 27. 10:13

jboss 4.2.3 AS datasource failover 설정






<datasources>
  <local-tx-datasource>
    <jndi-name>jdbc.dsCizle</jndi-name>
<connection-url>jdbc:mysql://xxx.xxx.xxx.xxx:3306,xx2.xx2.xx2.xx2:3306/ticketbox?failOverReadOnly=false</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>xxxx</user-name>
    <password>xxxx</password>
    <min-pool-size>10</min-pool-size>
    <max-pool-size>100</max-pool-size>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>

<check-valid-connection-sql>select '1'</check-valid-connection-sql>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <metadata>
       <type-mapping>mySQL</type-mapping>
    </metadata>
  </local-tx-datasource>

</datasources>