throwable = e;
   public void run()   {       Connection conn = null;            int count = 0;            try      {          super.setup();                  log.info("Running drain job ===============");                  conn = cf.createConnection();                  if (clientID != null)         {            try            {               conn.setClientID(clientID);            }            catch (Exception e)            {               //Some providers may provide a connection with client id already set            }         }                  conn.start();               Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);                      MessageConsumer consumer;         if (subName == null)         {                     consumer = sess.createConsumer(dest);         }         else         {            consumer = sess.createDurableSubscriber((Topic)dest, subName);         }                             while (true)         {            Message m = consumer.receive(RECEIVE_TIMEOUT);            //log.info("received message");            if (m == null)            {               break;            }            count++;         }                  log.info("Finished running job===================");               }      catch (Exception e)      {         log.error("Failed to drain destination", e);         failed = true;      }      finally      {         if (conn != null)         {            try            {               conn.close();            }            catch (Exception e)            {               log.error("Failed to close connection", e);               failed = true;            }         }      }         } 