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

Invoking a component method – PB Docs 125 – PowerBuilder Library

Invoking a component method – PB Docs 125

Invoking a component method

To invoke a method on most component types, you need to execute
the PowerScript statements required to perform these operations:

  1. Use the CreateInstance method
    to create an instance of the component.

  2. Invoke the method.

You use a different technique to invoke EJB component methods.
See “Invoking an EJB component
method”
.

Example 1

This script instantiates a component on the server and invokes
a component method. In this example, the CreateInstance method
does not specify a package; therefore, EAServer uses
the default package specified in the Application property of the
Connection object:

Example 2

This script instantiates a component on the server and assigns
the object reference to a variable whose datatype is an ancestor
of the class for the component. The second argument to the CreateInstance function
specifies the class name for the component as well as the EAServer package name:

note.png Invoking a local instance

By default, the TransactionServer CreateInstance method
invokes the EAServer name service
to create proxies. Proxies for remote components might be returned
by the name service rather than an instance that is running locally.
To guarantee that a locally installed instance is used, specify
the component name as “local:package/component“,
where package is the package name and component is
the component name. The call fails if the component is not installed
in the same server.


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