[omniORB] omnievents between 2 separate machines

Paul McMahon pwm_spam at onetel.com
Thu Feb 1 09:36:58 GMT 2007


When using omnievents between 2 machines, does the client need to have 
omnievents daemon running?

Or is it sufficient for client to just link with a local copy of omnievents 
library and use the naming service on the server to obtain the EventChannel 
and then receive events?

So far I have got the following working:

server
------------
omnievents running on server
eventchannelfactory and eventchannel created (and appear in nameclt list)
pushes events correctly according 
to /var/lib/omniEvents/omnievents-hostname.log

client
----------
uses PushConn.java example supplied with omnievents.
obtains namingservice correctly from server
BUT search for eventchannel always returns "Failed to find EventChannel in 
NameService. NamingContext::NotFound"

			//
			// Obtain object reference to EventChannel
			// (from command-line argument or from the Naming Service).
			if (g.getOptind() < args.length) {
				action = "convert URI from command line into object reference";
				obj = orb.string_to_object(args[g.getOptind()]);
			} else {
				action = "resolve initial reference 'NameService'";
				obj = orb.resolve_initial_references("NameService");
				NamingContext rootContext = NamingContextHelper.narrow(obj);
				if (rootContext == null)
					throw new OBJECT_NOT_EXIST();

				NameComponent name[] = { new NameComponent(channelName,
						channelKind) };

				action = "find EventChannel in NameService";
				System.out.println(action);

Following line throws NotFound Exception--->
				obj = rootContext.resolve(name);
			}

(channelName and channelKind are set to "EventChannel" which matches what's on 
the server).

Any help much appreciated.

-Paul McMahon



More information about the omniORB-list mailing list