[omniNotify] resolving Notification Service

Andy Goetz goetz@esrf.fr
Thu Jan 30 21:54:01 2003


Hi,

thanks a lot for the answer. I think my problem now is with the
connect_structured_push_supplier(). All examples I have seen show you can
use CosNotifyComm::StructuredSupplier::_nil() as argument but it fails
with a CORBA:SystemException under omniNotify 1.2. I do not fully
understand the example which is delivered with omniNotify. Things like
_this() are a mystery to me. That is why I tried to write a simple example
from scratch. I guess I will have to hack the omniNotify example to get
something working even if I don't understand all the code.

Andy

 On 30 Jan 2003, Janet Tvedt wrote:

> Andy,
> 
> I don't know the answer to your question about whether or not you
> should/can use resolve_initial_references to find the notification
> service.  However, you can use this call to find the naming service:
> 
> CORBA::Object_var name_service;
> CosNaming::NamingContext_var name_context;
> name_service = orb->resolve_initial_references("NameService");
> name_context = CosNaming::NamingContext::_narrow(name_service);
> 
> Then use the name service to locate the channel factory and/or default
> event channel:
> 
>   CosNaming::Name name;
>   name.length(1);
>   name[0].id   = CORBA::string_dup((const char*)"EventChannel");
>   name[0].kind = CORBA::string_dup((const char*)"EventChannel");
>   CORBA::Object_var channel_ref = name_context->resolve(name);
> 
> Have a look at at omniNotify/examples/get_channel.h for details.
> 
> Janet Tvedt
> 

--
European Synchrotron Radiation Facility
6, rue Jules Horowitz, 
Grenoble, 38043 
FRANCE

tel: (+33)-476882646

email: goetz@esrf.fr
       andy_gotz@yahoo.fr