3 Replies Latest reply on Feb 19, 2010 7:46 PM by Zemian Deng

    proper examples cleanup?

    Zemian Deng Apprentice



      In few of the jms examples I saw, they have this cleanup code in a finally block:


               if (initialContext != null)
               if (connection != null)




      You probably should add another try/catch block to "initialContext.close();" because if it were to throw exception, you jms connection.close() will not be called.