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

Comments

  • benoit
    benoit Rennes, France
    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.
  • Thank you! you're right, it gets well now!
    Bye, Marika