3 Replies Latest reply on Feb 6, 2012 10:15 AM by Tom Cunningham

    SqlTableGatewayListener does not recover from DB failure

    Brian Blasko Newbie

      I have a simple ESB where I use SqlTableGatewayListener to listen for data.  If the DB goes down when listening, the gateway will attempt to reconnect but after the max number of retries of 5(hard coded in JdbcCleanConn.connection, it returns a null connection. 

       

      This then causes a NPE in pollForCandidates which in turns causes the thread to exit.

       

      Then when the DB comes back up, the listener will not restart.

       

      Is there a way to get the listener to recover from this?