Close a subscriber

marikamarika Member Marika RodegherOrganization: University of VeronaProject: Client-Server
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

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • marikamarika Member Marika RodegherOrganization: University of VeronaProject: Client-Server
    Thank you! you're right, it gets well now!
    Bye, Marika
Sign In or Register to comment.