Building Distributed
Applications
Using the Progress AppServer
Understanding Proxy Persistent Procedure Handles
When you execute a remote persistent procedure in a 4GL client application, two persistent procedure handles are created: one within the client application session and another separate handle within the AppServer session where the persistent procedure is created. Progress internally maintains a mapping between the two handles. The handle within the client application is a proxy persistent procedure handle, and its PROXY attribute and PERSISTENT attribute are set to TRUE. The corresponding handle within the Application Server process is a remote persistent procedure handle, and its REMOTE attribute and PERSISTENT attribute are set to TRUE.
For more information on the relationship between proxy and remote persistent procedure handles, see the information on procedure handles in Design and Implementation Considerations."
Accessing Proxy Persistent Procedure Handles
You can obtain access to the proxy persistent procedure handle in the client using the SET option of the RUN statement, which returns the proxy persistent procedure handle value to the HANDLE variable you specify.
You can also access all proxy persistent procedure handles that are currently active for an AppServer connection by returning the value of the FIRST-PROCEDURE attribute or the LAST-PROCEDURE attribute on the server handle for the connection. You can then use the NEXT-SIBLING or PREV-SIBLING attributes on the resulting procedure handle to navigate the list of active proxy persistent procedure handles, for example:
Comparing Proxy and Local Persistent Procedure Handles
Unlike the values of a procedure handle variable and the THIS-PROCEDURE system handle that reference the same local persistent procedure context, the proxy persistent procedure handle in a client session and the corresponding remote persistent procedure handle in the Application Server process are truly separate handles. For example, setting the PRIVATE-DATA attribute on a proxy persistent procedure handle has no effect on the PRIVATE-DATA attribute of the corresponding remote persistent procedure handle.
However, note that the Progress mapping between a proxy persistent procedure handle and its corresponding remote persistent procedure handle allows you to execute remote internal procedures and user-defined functions using the proxy handle. For more information, see the "Running and Managing Remote Procedures" section.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |