OmniNames and bind_context

Gary D. Duzan gdd0@gte.com
Mon, 05 Jan 1998 09:11:30 -0500


In Message <199801021636.QAA17696@kirkstone.cam-orl.co.uk> ,
   Tristan Richardson <tjr@cam-orl.co.uk> wrote:

=>
=>>>>>> Gary Duzan writes:
=>> 
=>>    That's the point. As of 2.2.0, it doesn't. And I just tried the version
=>> with the 2.4.0 snapshot, and it is incorrect, too.
=>> 
=>> % ./nameclt bind_new_context foo context
=>> IOR:00f21f5c0000002049444c3a436f734e616d696e672f4e616d696e67436f6e746578743
a312e300000000001000000000000002c000100000000000f3133322e3139372e3131322e323400
00270f00000000000c34a1468e882d620e00000004
=>> % ./nameclt bind bar context IOR:00f21f5c0000002049444c3a436f734e616d696e67
2f4e616d696e67436f6e746578743a312e300000000001000000000000002c000100000000000f3
133322e3139372e3131322e32340000270f00000000000c34a1468e882d620e00000004
=>> % ./nameclt list
=>> (foo,context) binding type ncontext
=>> (bar,context) binding type nobject
=>> % ./nameclt list bar context
=>> 
=>>    The last line should generate an exception (either NotFound or
=>> CannotProceed; not really sure which is better) but does not.
=>> 
=>
=>I think you're getting confused here between the behaviour of nameclt and the
=>behaviour of omniNames itself.  When you do 
=>
=>% ./nameclt list bar context
=>
=>what is happening is that nameclt talks to the initial name server, gets an
=>object reference for "bar", narrows it to a context and then invokes the
=>list() operation on that context.  omniNames is correctly treating the bindin
g
=>for "bar" like any other -- it is nameclt which treats it as a context.
=>
=>The real test is whether you can resolve a binding inside the "bar" context
=>by only talking to the initial name server.  For example say within "bar"
=>you have a binding for an object "x","y" then when you try:
=>
=>% ./nameclt resolve bar context x y
=>
=>you will get a NotFound exception with why = not_context.

   Hmm. Ok, that does seem to be the case. And come to think of it,
the example I came across does a NamingContext::list() on the context
object, so that isn't a good example, either. The only thing left that
bugs me a little is that after the above I try:

% nameclt unbind bar context
Error: unbind: can't unbind a naming context.
Use remove_context to remove an empty naming context.

which isn't a serious problem, but seems a bit odd, nonetheless.
   Sorry for not being more thorough in my testing...

					Gary Duzan
					GTE Laboratories