Exemple #1
0
 def shutdown(self):
     self.running = False
     self.semaphore.acquire()
     for queue in list(self.queues.keys()):
         self.handle_UNSUBSCRIBE({'destination' : queue}, '')
     self.dbconn.close()
     self.semaphore.release()
     StompConnection.shutdown(self)
 def shutdown(self):
     self.running = False
     self.semaphore.acquire()
     for queue in list(self.queues.keys()):
         self.handle_UNSUBSCRIBE({'destination': queue}, '')
     self.dbconn.close()
     self.semaphore.release()
     StompConnection.shutdown(self)
Exemple #3
0
 def __init__(self, server, conn, addr):
     StompConnection.__init__(self, server, conn, addr)
     self.dbconn = cx_Oracle.connect('%s/%s@//%s:%s/%s' % (server.username, server.passwd, server.oracle_host_and_port[0], server.oracle_host_and_port[1], server.db))
     print("Connected to Oracle")
     self.client_id = self.__get_client_id()
     print("Client Id %s" % self.client_id)
     self.queues = {}
     self.transactions = {}
     self.semaphore = threading.BoundedSemaphore(1)
 def __init__(self, server, conn, addr):
     StompConnection.__init__(self, server, conn, addr)
     self.dbconn = cx_Oracle.connect(
         '%s/%s@//%s:%s/%s' %
         (server.username, server.passwd, server.oracle_host_and_port[0],
          server.oracle_host_and_port[1], server.db))
     print("Connected to Oracle")
     self.client_id = self.__get_client_id()
     print("Client Id %s" % self.client_id)
     self.queues = {}
     self.transactions = {}
     self.semaphore = threading.BoundedSemaphore(1)