Context problem
Tristan Richardson
tjr@orl.co.uk
Tue, 03 Jun 1997 17:07:02 +0100
>>>>> Johannes Gutleber writes:
>
> I experienced problems binding an object with a context path
> longer than one item, e.g. /root/level1/level2/object
>
> I wanted to bind the following:
> contextName.length(2);
> contextName[0].id (const char*) "cluster";
> contextName[0].kind (const char*) "CMS_context";
> contextName[1].id (const char*) "node1";
> contextName[1].kind (const char*) "CMS_context";
>
> (...)
>
> objectName.length(1);
> objectName[0].id = (const char*) "CPU";
> objectName[0].kind = (const char*) "Object";
>
> (...)
>
> The result is that the binding simply is not done. The context
> does not exist. If I shorten the context length to 1 and throw
> away the lines contextName[1] then it works fine?
>
The "bind" operation will not create a context - if you are attempting to bind
a compound name then the context (i.e. the components of the name up to but
not including the final one) must already exist.
You can use "nameclt bind_new_context" to create contexts, e.g.:
% nameclt bind_new_context cluster CMS_context
...
% nameclt bind_new_context cluster CMS_context node1 CMS_context
...
Tristan
+--------------------------------------------------------------------+
| Tristan Richardson Email: tjr@orl.co.uk |
| ORL Tel: +44 1223 343000 |
| 24a Trumpington Street Fax: +44 1223 313542 |
| Cambridge, CB2 1QA, UK WWW: http://www.orl.co.uk/ |
+--------------------------------------------------------------------+
| ORL - The Olivetti & Oracle Research Laboratory |
+--------------------------------------------------------------------+