2 Replies Latest reply on Nov 25, 2014 1:47 AM by newbie.one

    auto reconnect to database in jboss-as-7.1.1.Final

    newbie.one

      Hello everyone,

       

      I have installed jboss-as-7.1.1.Final for my webapp. Its running normally for every activity except one thing.
      When ms sql server services was restarted or stopped a while, my jboss wouldn't rebuild the connection to datasource automatically.
      I must restarting jboss manually, so it can rebuild the connection again.
      Below is my datacource config, could you tell me please what i am miss for this configuration?

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      ....

      <datasource jndi-name="java:jboss/MsSqlDS" pool-name="MsSqlDS" enabled="true" use-java-context="true" use-ccm="false">

             <connection-url>jdbc:sqlserver://localhost:1433;databaseName=dummy</connection-url>

             <driver>sqlserver2008</driver>

             <pool>

                    <min-pool-size>5</min-pool-size>

                    <max-pool-size>50</max-pool-size>

                    <prefill>false</prefill>

                    <use-strict-min>false</use-strict-min>

                    <flush-strategy>FailingConnectionOnly</flush-strategy>

             </pool>

             <security>

                    <user-name>sa</user-name>

                    <password>*******</password>

             </security>

             <validation>

                    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/>

             </validation>
      </datasource>

      ....

      -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

       

      Thanks & Regards

      Newbie