Archived
This forum has been archived. Please start a new discussion on GitHub.
Shutdown a service
spicy
in Comments
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
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
0
Comments
-
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.0
