[omniNotify] resolving Notification Service
Andy Goetz
goetz@esrf.fr
Thu Jan 30 10:27:01 2003
Hi,
I have partly resolved my problem of bootstrapping. In my program which
was converting the ior to an EventChannel I had mistyped /tmp/rdfact.ior
and /tmp/rdchan.ior ! Once I had corrected this stupid mistake I could
correctly resolve these two references to their correct types. I still
cannot get the resolve_initial_references on "NotificationService" to
work however. Is this supposed to work ? I do not see it being used in
any of the examples.
Now I get a CORBA::SystemException when I try to :
structuredProxyPushConsumer -> connect_structured_push_supplier(
CosNotifyComm::StructuredPushSupplier::_nil());
Up to then everything seems to work fine. Any ideas about what the
beginner is doing wrong again ?
Thanks
Andy
On Thu, 30 Jan 2003, Andy Goetz wrote:
> Hi,
>
> I am new to omniNotify so please be patient if my question has an obvious
> answer.
>
> I am trying to get a VERY simple example working with a server and client
> for omniNotify building them from scratch. I have hacked the examples code
> to send my own events but I do not find it very clear. I would like to
> write a server and client from scratch using the COS Notification API
> directly. My first example fails just trying to get the
> EventChannelFactory.
>
> My code to get a handle on the EventChannelFactory looks like this :
>
> CosNotifyChannelAdmin::EventChannel_var eventChannelFactory;
> try
> {
> CORBA::Object_var obj =
> orb -> resolve_initial_references("NotificationService");
>
> //
> // Narrow the CORBA_Object reference to an EventChannelFactory
> // reference so we can invoke its methods
> //
> eventChannelFactory =
> CosNotifyChannelAdmin::EventChannelFactory::_narrow(obj);
>
> }
> catch(...)
> {
> cerr << "Cannot resolve `NotificationService'" << endl;
> exit(1);
> }
>
> //
> // Make sure the CORBA object was really an EventChannelFactory
> //
> if(CORBA::is_nil(eventChannelFactory))
> {
> cerr << "`NotificationService' initial reference is not "
> << "a CosNotifyChannelAdmin::EventChannelFactory"
> << endl;
> exit(1);
> }
>
> But it never resolves the EventChannelFactory. I have tried resolving the
> IOR in the /tmp/rdifact.ior file as well but when I do the narrow it says
> this is not an EventChannelFactory.
>
> My questions are :
>
> (1) is the bootstrap method via "NotificationService" supported ?
>
> (2) why can I not narrow /tmp/rdifact.ior to
>
> CosNotifyChannelAdmin::EventChannelFactory ?
>
> Thanks for any help you can give on this.
>
> Andy Gotz
>
> --
> European Synchrotron Radiation Facility
> 6, rue Jules Horowitz,
> Grenoble, 38043
> FRANCE
>
> tel: (+33)-476882646
>
> email: goetz@esrf.fr
> andy_gotz@yahoo.fr
>
> _______________________________________________
> omninotify-list mailing list
> omninotify-list@omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omninotify-list
>
--
European Synchrotron Radiation Facility
6, rue Jules Horowitz,
Grenoble, 38043
FRANCE
tel: (+33)-476882646
email: goetz@esrf.fr
andy_gotz@yahoo.fr