Ejemplo n.º 1
0
def main(rid,input,omniorb_config_file,enable_GSI): # directory_service_oid
    from CORBAProgram import CORBAProgram
    server = CORBAProgram(server=True,config_file=omniorb_config_file,enable_GSI=enable_GSI)

    master_servant = createServant(rid,server)
    master = master_servant._this()
    ior_filename = "MasterOID"
    file(ior_filename,"w").write(server.orb.object_to_string(master))
    logger.info("RunMaster activated, IOR in file %s",ior_filename)    

    master_servant.bootstrapContacts()
    master_servant.startProcessing(input)
    server.start()
Ejemplo n.º 2
0
def main(master_oid,omniorb_config_filename,enable_GSI=False):
    import os, tempfile

    from CORBAProgram import CORBAProgram
    program = CORBAProgram(server=False,config_file=omniorb_config_filename,enable_GSI=enable_GSI)

    #install_exception_handlers()
    
    master = program.orb.string_to_object(master_oid)

    # set default timeout to master reference
    master = copy_ref_with_timeout(master,config.HEARTBEAT_TIMEOUT)

    # create the worker agent object
    # and start client loop in a separate thread
    worker_agent = WorkerAgent(program,master,False,[])
    worker_agent.start()

    program.start()