0 Replies Latest reply on Apr 13, 2015 5:21 AM by Lokesh Malla

    Auto reconnect the db connection in jboss esb after restarting the db server

    Lokesh Malla Newbie

      Hi All,

       

                I am using jboss Esb 4.12 with jboss AS 5.1, i am facing the db connection issue in the application after restarting db server. My ESB will access two different data bases along with jbpm db all are in same local server. I want to know how to reconnect the data connection in esb with out restarting the server after restarting the db.

       

               I have tried to configure below in  postgres-ds.xml in server but it doesn't work, please any one help me out in this issue.

       

      <?xml version="1.0" encoding="UTF-8"?>

      <datasources>

      <local-tx-datasource>

      <jndi-name>DefaultDS</jndi-name>

      <connection-url>jdbc:postgresql://localhost/localDB</connection-url>

      <driver-class>org.postgresql.Driver</driver-class>

      <user-name>messaging</user-name>

      <password>messaging</password>

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

      <max-pool-size>200</max-pool-size>

      <autoReconnect>true</autoReconnect>

      <check-valid-connection-sql>SELECT user_id, passwd, clientid FROM jbm_user</check-valid-connection-sql>

      <failOverReadOnly>false</failOverReadOnly>

      <maxReconnects>50</maxReconnects>

      <initialTimeout>15</initialTimeout>

      <metadata>

      <type-mapping>PostgreSQL</type-mapping>

      </metadata>

      </local-tx-datasource>

      </datasources>

       

      Exception:

      bpmJobExector@172.25.249.19:Dispatcher] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 08006

      14:43:03,635 ERROR [STDERR] 8155810 [JbpmJobExector@172.25.249.19:Dispatcher] ERROR org.hibernate.util.JDBCExceptionReporter - An I/O error occured while sending to the backend.

       

       

       

      Thanks,

      Lokesh