Hi,
I would like to known, if ICE allow the creation to any server on the basis of a model.
The file xml describe our application. We have two services template and each service had an adapter. Each allocatable object of adapter had the same Type (::OSL::MSG).
The node CDT had 2 icebox server and each server Icebox had one service from a template MSGService1 and MSGService2.
Actually, if we want to run for example 10 services, we must duplicate the service template, the adapter, the server and the service.
Is it possible to create a configuration who allow to icegrid to create automaticly a service from a unique client request with a unique ID? But the services must be totally indepentdent each other.
Currently, we have this Python client code:
Loop for the research of the list of allocatable objects of the each apadapter
Loop for the connexion:Code:registry = IceGrid.RegistryPrx.checkedCast(self._communicator.stringToProxy("SYSTEAM/Registry")) try : session = registry.createSession("root", "racine") sessionAdmin = registry.createAdminSession("root", "racine") admin = sessionAdmin.getAdmin() tabappli=admin.getAllApplicationNames() for appli in tabappli: TemplateDescriptorDict=admin.getApplicationInfo(appli).descriptor.serviceTemplates listekeys = TemplateDescriptorDict.keys() for key in listekeys: listAdapter = TemplateDescriptorDict[key].descriptor.adapters nbadapter=0 for adapter in listAdapter: adapters = TemplateDescriptorDict[key].descriptor.adapters[nbadapter] for allocatable in adapters.allocatables: self.listeallocatable.append(allocatable.id.name) nbadapter=nbadapter+1 except: print "Unexpected error:", sys.exc_info()[0], sys.exc_info()[1]
ThanksCode:for self.allocatable in self.listeallocatable: session.setAllocationTimeout(5) try: self.ObjId=session.allocateObjectById(self.communicator().stringToIdentity(self.allocatable)) self.twowayMSGIceBox = OSL.MSGPrx.checkedCast(self.ObjId) if self.twowayMSGIceBox!= None: self.KeepSession = SessionRefreshThread(registry.getSessionTimeout() / 10, session) self.KeepSession.start() break except: print self.allocatable.__str__() + " Allready use" self.allocatable="" self.twowayMSGIceBox = None
Gilles

Reply With Quote