본문 바로가기

Server/JBoss

DB별 validation 설정

- Oracle 기준

<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<stale-connection-checkerclass-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
<exception-sorterclass-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
<background-validation-millis>60000</background-validation-millis>
</validation>

 

- MSSQL기준

<validation>
<valid-connection-checker classname="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"></valid-connection-checker>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<background-validation-millis>60000</background-validation-millis>
</validation>


 

- SYBASE 기준

<validation>
<valid-connection-checker classname="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseValidConnectionChecker"></valid-connection-checker>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<exception-sorter classname="org.jboss.jca.adapters.jdbc.extensions.sybase.SybaseExceptionSorter"/>
<background-validation-millis>60000</background-validation-millis>
</validation>

 

- DB2 기준

<validation>
   <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2ValidConnectionChecker"/>
    <check-valid-connection-sql>select count(1) from SYSIBM.SYSDUMMY1</check-valid-connection-sql>
   <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.db2.DB2StaleConnectionChecker"/>
   <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
</validation>     

'Server > JBoss' 카테고리의 다른 글

Datasources  (0) 2015.05.14