ページの先頭行へ戻る
Interstage Application Server アプリケーション作成ガイド(CORBAサービス編)
Interstage

3.5.3 サーバアプリケーションのオブジェクトリファレンスの獲得

ネーミングサービスのメソッドCosNaming_NamingContext_resolve()により、呼び出すサーバアプリケーションのオブジェクトリファレンスを取り出します。本メソッドのパラメタとして検索するオブジェクト名を指定します。

CORBA_Object        obj;                   /* サーバアプリケーションのオブジェクトリファレンス */

name._length = name._maximum = 1;          /* オブジェクト名の数 */
name._buffer = &name_component;            /* オブジェクト名格納域 */
name_component.id = "ODdemo::calculator";  /* オブジェクト名 */
name_component.kind = "";                  /* オブジェクトのタイプ */

/* サーバアプリケーションのオブジェクトリファレンスを獲得 */
obj = CosNaming_NamingContext_resolve( cos_naming, &name, &env );