RE: CosNaming and Lispworks 4.2
I can't answer to your question directly, but I'll try to describe how we
use name service. Because of lack of documentation, I'm not sure if this is
the best solution, but it works.
1) I start LW with name service argument:
lispworks-4200.exe -ORBInitRef
NameService=corbaloc::my_name_service_machine:port_where_it_listens_to/NameS
ervice
2) Then I find pointer to name service:
(setf *nameservice* (op:narrow 'cosnaming:namingcontext
(op:resolve_initial_references orb
NameService")))
3) And use it:
(op:rebind *nameservice*
(list (cosnaming:namecomponent :id "my_name" :kind "")) my-obj)
Lukas
> -----Original Message-----
> From: Young, David [mailto:dyoung@bloodhoundinc.com]
> Sent: 21 January 2003 15:39
> To: lisp-hug@xanalys.com
> Subject: RE: CosNaming and Lispworks 4.2
>
>
> There's another issue as well. I'm now able to retrieve the
> naming service reference, but only sporadically. For example:
>
> CG 8 > (resolve-name-service)
> #<COSNAMING:NAMINGCONTEXT-PROXY localhost 9000 NameService
> [Forward to: IDL:omg.org/CosNaming/NamingContext:1.0 10.2.0.2
> 1049 AFABCB00...34E4330A]
> 205F4E74>
>
> CG 9 > (resolve-name-service)
> NIL
>
> CG 10 > (resolve-name-service)
> NIL
>
> CG 11 > (resolve-name-service)
> NIL
>
> CG 12 > (resolve-name-service)
> #<COSNAMING:NAMINGCONTEXT-PROXY localhost 9000 NameService
> [Forward to: IDL:omg.org/CosNaming/NamingContext:1.0 10.2.0.2
> 1049 AFABCB00...34E4330A]
> 205F169C>
>
> CG 13 >
>
> (RESOLVE-NAME-SERVICE) is simply a wrapper around
>
> (op:resolve_initial_references (server-orb) "NameService" :url)
>
> Here's how I register the naming service:
>
> (defun register-name-service ()
> (corba:set-pluggable-module-details "NameService" :url
> "corbaloc::localhost:9000/NameService")
> (corba:get-pluggable-module-details (server-orb)
> "NameService" :url))
>
> We're using the Java 1.4 ORBD COS naming service.
>
> This smells like a timing issue (network latency?) but I'm
> not sure. Sorry, I haven't found a lot of LispWorks
> documentation on this subject. I'd appreciate any ideas.
>
> Cheers,
>
> #'dey
>
>
> -----Original Message-----
> From: Ralf Bachmann [mailto:bachmann@informatik.uni-hamburg.de]
> Sent: Tuesday, January 21, 2003 10:04 AM
> To: lisp-hug@xanalys.com
> Subject: Re: CosNaming and Lispworks 4.2
>
>
> > From: Ralf Bachmann [mailto:bachmann@informatik.uni-hamburg.de]
> > > > #<CORBA System Exception BAD_PARAM (COMPLETED_NO,4):
> > > > Unable to coerce value to desired type
> > > > (#<TypeCode alias IDL:omg.org/CosNaming/Name:1.0>
> > > > #S(COSNAMING:NAMECOMPONENT
> > > > COSNAMING::ID ClaimsGuard
> > > > COSNAMING::KIND NIL))>)
> > > >
> > > Maybe the :kind NIL setting is the problem.
> > > Did you try (cosnaming:namecomponent :id "ClaimsGuard" :kind "") ?
>
> Young, David wrote:
> > Yes, that's precisely it.
>
> So, does Xanalys like to check for NIL values ?
> Perhaps there are other parts of ORB code,
> which could profit from NIL checking ...
> --
> (:-) Ralf Bachmann
> Fon: +49 -40 42883 - 2316, Fax: - 2311
> WWW: http://asi-www.informatik.uni-hamburg.de/personen/bachmann
>
>