Home Comments

Shutdown a service

spicyspicy Member Issifou BAROOrganization: ENIB (French Graduate Engineering School)Project: Market access
Here is my problem:
I have a service with an associated adapter. When i try to shutdown the service without shutting or destroying the communicator by doing this : adapter.destroy(), nothing happened. So i need a way to shutdown a service without destroying is communicator.
Thanks

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Sorry, but its very hard to answer your question without knowing what you want to achieve. What do you mean by "shutdown" in this case and why do you want to shutdown your service without destroying the communicator?
  • spicyspicy Member Issifou BAROOrganization: ENIB (French Graduate Engineering School)Project: Market access
    Thanks a lot. In fact i want to destroy the adapter of a particular service without destroying the communicator, to keep other services alive, because i use one communicator for all the services. So destroying it, will shutdown all the services.
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    What you want then is to stop servicing requests through that object adapter? Are you trying to call ObjectAdapter::destroy() in a method invocation on an object hosted by that OA? If so that will block indefinitely since destroy calls ObjectAdapter::waitForDeactivate which cannot possibly complete while the invocation is in process. What you should do instead is to call deactivate(). If you want to ensure that all resources are released in a timely manner (ie: not when the communicator is eventually destroyed) then you need to call ObjectAdapter::destroy() in another thread.
Sign In or Register to comment.