newbie orber question

Niclas Eklund <>
Thu Dec 29 15:35:16 CET 2005


Hello!

I understand that it might be confusing when "NameService" appear twice if
you set orbInitRef to be "NameService=corbaname::vbox:21012". But it do
indicate that there is actually two instances of the naming service
available. But to avoid confusion I'll change this in the next Orber
version. You can perhaps register this as
"RemoteNameService=corbaname::vbox:21012"?!

You can also use:

 erl -orber orbDefaultInitRef \"corbaloc::vbox:21012\"

But this will re-direct all calls to corba:resolve_initial_references/1
(i.e. even those you add by using corba:add_initial_service/2).

To be sure that Orber was configured in the way you intended, use
orber:info() to get a print-out of all settings.

During test/development phase it is usually helpfull to add the following
configuration parameters (see Orber's User's Guide 14 - Debugging):

 * orber_debug_level == 10

 * interceptors == {native, [orber_iiop_tracer_stealth]}

Other key parts of the documentation are:

 * User's Guide - 5.2 Configuration

 * User's Guide - 6 OMG IDL to Erlang Mapping

The latter has recently been updated regarding IC's erl_template-backend.
Hence, you should either download the latest version or consult:

http://erlang.se/doc/doc-5.4.12/lib/orber-3.6.2/doc/html/part_frame.html

Happy New Year!

/Nick

On Sun, 25 Dec 2005, Lonnie Smith wrote:
> Hi -
> 
> I recently began experimenting with CORBA in Erlang, and I'm having some
> trouble with a pretty basic step: resolving an initial NameService
> reference. I've tried to follow the instructions in Orber manual, but so
> far am having no luck.
> 
> $ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"'
> Erlang (BEAM) emulator version 5.4.10 [source] [hipe] [threads:0]
> [kernel-poll]
> 
> Eshell V5.4.10  (abort with ^G)
> 1> mnesia:create_schema([node()]).
> ok
> 2> mnesia:start().
> ok
> 3> corba:orb_init([{domain, "MyDiscSingleNodeORB"}, {orbInitRef,
> "NameService=corbaname::vbox:21012"}, {orber_debug_level, 10}]).
> ok
> 4> orber:install([node()], [{ifr_storage_type, disc_copies},
> {nameservice_storage_type, disc_copies}]).
> ok
> 5> orber:start().
> ok
> 6> NS = corba:resolve_initial_reference("NameService").  
> 
> =ERROR REPORT==== 25-Dec-2005::21:47:50 ===
> Error in process <0.30.0> with exit value:
> {undef,[{corba,resolve_initial_reference,["NameService"]},{erl_eval,do_apply,5},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]}
> 
> ** exited: {undef,[{corba,resolve_initial_reference,["NameService"]},
>                    {erl_eval,do_apply,5},
>                    {erl_eval,expr,5},
>                    {shell,exprs,6},
>                    {shell,eval_loop,3}]} **
> 7> corba:list_initial_services().                                        
> ["NameService","NameService"]
> 
> It seems a bit odd that two "NameServices" are listed. If I call
> corba:list_initial_services() before starting the orber application,
> only one NameService is listed. If I don't specify an orbInitRef
> argument to the corba:orb_init() call, there is only one NameService
> listed, but I get the same error:
> 
> $ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"' 
> Erlang (BEAM) emulator version 5.4.10 [source] [hipe] [threads:0]
> [kernel-poll]
> 
> Eshell V5.4.10  (abort with ^G)
> 1> mnesia:start().
> ok
> 2>  corba:orb_init([{domain, "MyDiscSingleNodeORB"}, {orber_debug_level,
> 10}]). 
> ok
> 3> corba:list_initial_services().
> []
> 4> orber:start().
> ok
> 5> corba:list_initial_services().
> ["NameService"]
> 6> NS = corba:resolve_initial_reference("NameService").
> 
> =ERROR REPORT==== 25-Dec-2005::21:52:44 ===
> Error in process <0.30.0> with exit value:
> {undef,[{corba,resolve_initial_reference,["NameService"]},{erl_eval,do_apply,5},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]}
> 
> ** exited: {undef,[{corba,resolve_initial_reference,["NameService"]},
>                    {erl_eval,do_apply,5},
>                    {erl_eval,expr,5},
>                    {shell,exprs,6},
>                    {shell,eval_loop,3}]} **
> 
> I should add that I'm fairly new to Erlang, so I might be making some
> other mistakes as well. As I understand it, the orber-app/corba module
> is going to try to contact the OMG compliant Name Service at the
> specified host and port number. If I'm running an omniORB's omniNames
> server listening on vbox:21012, the orber-app/corba-module should be
> able to use that Name Service, right?
> 
> I'd like to be able to begin using Erlang in a C++/Python omniORB
> environment, but so far I'm not getting stuck on the first step. Thanks
> for any thoughts or suggestions.
> 
> Lonnie
> -- 
>   Lonnie Smith
>   
> 
> -- 
> http://www.fastmail.fm - Accessible with your email software
>                           or over the web
> 

_________________________________________________________________
We Are The ORBs. Resistance Is Futile. Prepare To Be Assimilated!
_________________________________________________________________




More information about the erlang-questions mailing list