Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-18-2005
mwilson mwilson is offline
Registered User
 
Name: Mark Wilson
Organization: University of Rochester
Project: Omega EP laser
 
Join Date: Jul 2005
Location: Rochester, NY
Posts: 73
Problem with IceStorm

I've set up an IceStorm service and run it with network trace set to 2. I start my service, it connects okay, I start up a "listener" client, connects okay, then I run a client that makes calls on the service, which publishes events to the IceStorm service.

Tracing shows that IceStorm receives the events from the service just fine, but the listener doesn't seem to receive anything.

Here is the listener code:

class MSCApplication : virtual public Ice::Application
{
public:
virtual int run(int, char **)
{
//
// Set up for IceStorm.
//
Ice::ObjectPrx obj = communicator()->stringToProxy(
"MSCEventService/TopicManager:tcp -h cactus -p 9999");

IceStorm::TopicManagerPrx topicManager =
IceStorm::TopicManagerPrx::checkedCast(obj);


Ice::ObjectAdapterPtr adapter =
communicator()->createObjectAdapter("MonitorAdapter");

MSC::MonitorPtr monitor = new MonitorI;
Ice::ObjectPrx proxy = adapter->addWithUUID(monitor);

IceStorm::TopicPrx topic;
try
{
topic = topicManager->retrieve("ActuatorControl");
IceStorm::QoS qos;
topic->subscribe(qos, proxy);
}
catch (const IceStorm::NoSuchTopic&)
{
std::cerr << "No topic found" << std::endl;
}

adapter->activate();

communicator()->waitForShutdown();

return 0;
}
};

I have no idea what I am doing wrong (most likely something simple, but I'm at a lose right now). The string "ActuatorControl" is correct, and I actually have error checking code (took it out to make this shorter) that passes just fine. Seems like it should work.

Help!

Thanks,
Mark
__________________
Mark E. Wilson
Lead Programmer/Analyst
Omega EP Project
Laboratory for Laser Energetics (www.lle.rochester.edu)
University of Rochester
Rochester, NY 14623
Reply With Quote
  #2 (permalink)  
Old 07-18-2005
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Hi Mark,

One reason for this behavior is invalid endpoints for the listener's object adapter. For example, if the IceStorm service is running on a different host than the listener, then it's important to define an endpoint that contains the appropriate host information.

What endpoints have you defined for MonitorAdapter?

Take care,
- Mark
Reply With Quote
  #3 (permalink)  
Old 07-18-2005
mwilson mwilson is offline
Registered User
 
Name: Mark Wilson
Organization: University of Rochester
Project: Omega EP laser
 
Join Date: Jul 2005
Location: Rochester, NY
Posts: 73
I guess I thought that addWithUUID did that. I don't explicitly set up an endpoint. I just went by the example in Chapter 41, p. 1173...
__________________
Mark E. Wilson
Lead Programmer/Analyst
Omega EP Project
Laboratory for Laser Energetics (www.lle.rochester.edu)
University of Rochester
Rochester, NY 14623
Reply With Quote
  #4 (permalink)  
Old 07-18-2005
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Mark,

Ice allows object adapters to be created without endpoints. This is useful for example when using bidirectional connections, because a client doesn't need to establish a separate endpoint for accepting incoming connections yet still requires an object adapter in order to receive callback requests.

If you call createObjectAdapter("MonitorAdapter"), then the object adapter will check for the presence of a configuration property named MonitorAdapter.Endpoints that defines its endpoints.

Take care,
- Mark
Reply With Quote
  #5 (permalink)  
Old 07-18-2005
mwilson mwilson is offline
Registered User
 
Name: Mark Wilson
Organization: University of Rochester
Project: Omega EP laser
 
Join Date: Jul 2005
Location: Rochester, NY
Posts: 73
Okay, that did the trick. Thanks!
__________________
Mark E. Wilson
Lead Programmer/Analyst
Omega EP Project
Laboratory for Laser Energetics (www.lle.rochester.edu)
University of Rochester
Rochester, NY 14623
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with IceStorm noce more zweit Help Center 4 02-13-2006 02:22 PM
IceStorm problem sepp Help Center 2 04-05-2005 09:10 AM
IceStorm problem freshman Help Center 1 03-01-2005 12:10 AM
IceStorm problem freshman Help Center 2 01-26-2005 05:43 AM
Problem with IceStorm minifat Help Center 2 08-19-2004 02:54 AM


All times are GMT -4. The time now is 11:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.