Archived
This forum has been archived. Please start a new discussion on GitHub.
Close a subscriber
Hi!
I would like to know if there is a possibility (in Java) to close a subscriber with System.exit(0);
I tried to put this line in a method of a servant class called by the publisher but it does nothing.
How can I resolve this problem? How can my publisher close the subscriber when (this publisher) ends his task?
Thanks
Marika
I would like to know if there is a possibility (in Java) to close a subscriber with System.exit(0);
I tried to put this line in a method of a servant class called by the publisher but it does nothing.
How can I resolve this problem? How can my publisher close the subscriber when (this publisher) ends his task?
Thanks
Marika
0
Comments
-
Hi,
You should shutdown the subscriber communicator if your subscriber main thread waits for the communicator to be shutdown with waitForShutdown(). See demo/Ice/hello/HelloI.java for example on how to do this (the implementation of the shutdown() method).
Cheers,
Benoit.0 -
Thank you! you're right, it gets well now!
Bye, Marika0