|
|
|
|||||
|
Ice.Communicator.shutdown() not working
Hi all,
I'm using an Ice.Communicator (IC) for an IceStorm service. I am subscribing to the topic appropriately, and calling IC.waitForShutdown(). This works fine. However, I want to unsubscribe to the topic and call IC.shutdown(), then call IC.destroy(). However, when I try to call these three methods, only IC.destroy() seems to work, and I get an Exception: Code:
Ice.CommunicatorDestroyedException at IceInternal.Instance.proxyFactory(Instance.java:78) at Ice.ObjectPrxHelperBase.__handleException(ObjectPrxHelperBase.java:820) at IceStorm.TopicPrxHelper.unsubscribe(TopicPrxHelper.java:257) at IceStorm.TopicPrxHelper.unsubscribe(TopicPrxHelper.java:235) at imaq.matlab.IMAQObserverClient.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Code:
try {
topic = topicManager.retrieve(topicName);
Map qos = null;
topic.subscribe(qos, subscriber);
} catch (IceStorm.NoSuchTopic e) {
throw new Exception();
}
adapter.activate();
ic.waitForShutdown();
topic.unsubscribe(subscriber);
Code:
public void stop() {
System.err.println("DEBUG: attempting to unsubscribe");
topic.unsubscribe(subscriber);
System.err.println("DEBUG: attempting to shutdown IC");
ic.shutdown();
System.err.println("DEBUG: attempting to destroy IC");
ic.destroy();
}
Is there another way I should be doing this? I don't like destroying the IC and getting an Exception. Do I need to provide more information for a reliable answer? Thank you very much, Dan |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ice::Communicator | gesly | Comments | 4 | 04-25-2007 02:50 PM |
| python: shutdown of communicator hangs | hiasl | Help Center | 6 | 02-05-2007 02:50 PM |
| Ice 3.1: Communicator.setDefaultContext() | stephan | Help Center | 8 | 07-20-2006 04:40 PM |
| Notification on communicator shutdown | stephan | Help Center | 11 | 10-13-2004 05:38 PM |
| Ice timeouts, callbacks, and shutdown. | rhochmuth | Help Center | 1 | 09-09-2004 11:50 AM |