Beispiel #1
0
 public static void CloseMQConnection()
 {
     if (mqconn != null)
     {
         mqconn.CloseChannel(sendChannel);
         mqconn.CloseChannel(receiveChannel);
         mqconn.closeConnection();
         mqconn = null;
     }
 }
Beispiel #2
0
 /**
  * 一个客户端只能维护一个长连接
  */
 private static void InitConnection()
 {
     if (mqconn == null)
     {
         lock (obj)
         {
             if (mqconn == null)
             {
                 mqconn = new MQConnection(defaultConnectionFactory(), connStatus);
             }
         }
     }
 }