Configure Codar to mitigate frequently dropped database connections

If you are experiencing frequently dropped database connections, configure the JBoss data source connections to mitigate the problem.

In a standalone environment, complete the following steps:

  1. Stop the Codar service, see Stop Codar.

  2. Edit the CSA_HOME\jboss-as\standalone\configuration\
    standalone.xml
    file:

    1. Find the dataSource tag which is used for Codar database configuration.
    2. Add the following after the line that ends with </security>:

      Oracle:

      <validation>
      <check-valid-connection-sql>select 1 from DUAL</check-valid-connection-sql>
      <validate-on-match>false</validate-on-match>
      </validation>

      MS SQL or PostgreSQL:

      <validation>
      <check-valid-connection-sql>select 1</check-valid-connection-sql>
      <validate-on-match>false</validate-on-match>
      </validation>

  3. Start the Codar service, see Start Codar.

     

In a clustered environment, complete the following steps:

  1. Stop the Codar service, see Stop Codar.

  2. Edit the CSA_HOME\jboss-as\domain\configuration\domain.xml file:

    1. Find the dataSource tag which is used for Codar database configuration.
    2. Add the following after the line that ends with </security>:

      Oracle:

      <validation>
      <check-valid-connection-sql>select 1 from DUAL</check-valid-connection-sql>
      <validate-on-match>false</validate-on-match>
      </validation>

      MS SQL or PostgreSQL:

      <validation>
      <check-valid-connection-sql>select 1</check-valid-connection-sql>
      <validate-on-match>false</validate-on-match>
      </validation>

  3. Start the Codar service, see Start Codar.