Advertisement
Guest User

Untitled

a guest
Aug 13th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.68 KB | None | 0 0
  1.  
  2.         if( textMessage != NULL ) {
  3.             text = textMessage->getText();
  4.         } else {
  5.             text = "NOT A TEXTMESSAGE!";
  6.         }
  7.  
  8.         try{
  9.             if( destination != NULL ) delete destination;
  10.         }catch (CMSException& e) { e.printStackTrace(); }
  11.         destination = NULL;
  12.  
  13.         try{
  14.             if( consumer != NULL ) delete consumer;
  15.         }catch (CMSException& e) { e.printStackTrace(); }
  16.         consumer = NULL;
  17.  
  18.         // Close open resources.
  19.         try{
  20.             if( session != NULL ) session->close();
  21.             if( connection != NULL ) connection->close();
  22.         }catch (CMSException& e) { e.printStackTrace(); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement