Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Resolve_Initial_References – PB Docs 126 – PowerBuilder Library

Resolve_Initial_References – PB Docs 126

Resolve_Initial_References PowerScript function

Description

Uses the CORBA naming service API to obtain the initial naming
context for an EAServer component.

This function is used by PowerBuilder clients connecting to EAServer.

Controls

JaguarORB objects

Syntax

Argument

Description

jaguarorb

An instance of JaguarORB

objstring

A string that has the value “NameService”

object

A reference variable of type CORBAobject
that will contain a reference to the COS naming service

Return Values

Long. Returns 0 if it succeeds and a
negative number if an error occurs.

Usage

If you want to use the Jaguar naming service API, you can
use the Resolve_Initial_References function
to obtain the initial naming context. However, this technique is
not recommended because it requires use of a deprecated SessionManager::Factory create method.
Most PowerBuilder clients do not need to use the CORBA naming service
explicitly. Instead, they can rely on the name resolution that is
performed automatically when they create EAServer component
instances using the CreateInstance and Lookup functions
of the Connection object.

You can also use the JaguarORB object’s String_To_Object function
to instantiate a proxy instance without using the CORBA naming service explicitly.
For more information about connecting to EAServer using
the JaguarORB object, see Application Techniques.

When you use the CORBA naming service, you need to generate
proxies for the naming service interface and include these proxies
in the library list for the client.

Examples

The following example shows the use of the Resolve_Initial_References function
to obtain an initial naming context. After obtaining the naming context,
it uses the naming context’s resolve method to obtain a
reference to a Factory object for the component and then narrows
that reference to the SessionManager’s Factory interface.

The resolve method takes a name parameter,
which is a sequence of NameComponent structures. Each NameComponent
structure has an id attribute that identifies
the component and a kind attribute that can
be used to describe the component. In the example below, the name
has only one component. The create method of
the Factory object obtains proxies for the component. It returns
a CORBA object reference that you can convert into a reference to
the component’s interface using the _Narrow function.

The NamingContext and NameComponent types used in the example
are proxies imported from the CosNaming package in EAServer, and the Factory type
is imported from the SessionManager package:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x