Description
Converts a CORBA object reference from a general supertype to a more specific subtype.
This function is used by PowerBuilder clients connecting to EAServer.
Obsolete function
_Narrow is obsolete, because EAServer is no longer supported since PowerBuilder 2017.
Applies to
CORBAObject objects
Syntax
corbaobject._Narrow ( newremoteobject, classname )
Argument |
Description |
---|---|
corbaobject |
An object of type CORBAObject that you want to convert |
newremoteobject |
A variable that will contain the converted object reference |
classname |
The class name of the subtype to which you want to narrow the object reference |
Return value
Long.
Returns 0 if it succeeds and a negative number if an error occurs.
Usage
The _Narrow function allows you to narrow proxy objects in a CORBA-compatible client that connects to EAServer. For additional examples, see the functions on the See also list.
Examples
The following example narrows a CORBA object reference to the n_Bank_Account interface:
CORBAObject my_corbaobj n_Bank_Account my_account ... ... my_corbaobj._narrow(my_account,"Bank/n_Bank_Account") my_account.withdraw(100.0)
In this example, the component is an EJB component that resides in a separate domain in EAServer. In this case, the SimpleBean component's classes are in the ../classes/adomain/asimplepackage subdirectory:
CORBAObject my_corbaobj SimpleBean my_simplebean SimpleBeanHome my_simplebeanhome ... my_corbaobj._narrow(my_simplebeanhome, "adomain/asimplepackage/SimpleBeanHome")
See also