Building Distributed
Applications
Using the Progress AppServer
Calling the EXPORT( ) Method
There is no requirement to execute the EXPORT( ) method within an AppServer session. If the EXPORT( ) method is not called, or the export list is at any point reset to empty, then all remote procedure requests are accepted for execution.
Setting an Initial Export List
The following code example shows how you might invoke the EXPORT( ) method from within an AppServer Connect procedure. In this example, two procedures,
order.p
andstock.p
, are added to the export list.
When this code executes, it adds the two procedures to the export list. A remote procedure request to an Application Server process that executes this AppServer Connect procedure executes itself only if the request is for
order.p
orstock.p
. Otherwise, the remote procedure request returns an error.Export list entries can also include names with an asterisk (*). The asterisk is a wildcard character to indicate that any group of characters is acceptable as a replacement for the asterisk.
For example, you can reference all procedures in a directory such as
stocksys/*.p
, some procedures in a directory such asacctpay/qry*.p
, or all procedures in a library such asorder.pl<<*>>
.
After this code executes, all procedures located in the
stocksys
directory, some procedures located in theacctpay
directory, and all procedures located in the orders procedure library are added to the export list.If you create an export list, keep in mind that a client application is unaware that the procedures that it is submitting are being validated against this list. When the Application Server process rejects a procedure for not being on this list, it returns an error to the client application.
Resetting the Export List
At any time while servicing a connection, you can modify any existing export list by adding to the list or resetting the list. Thus, for example, if the list contains "order.p,stock.p", you can add "payment.p":
This, then, expands the list to "order.p,stock.p,payment.p".
If at any point, you want to completely reset the list, you can do this:
At this point, the Application Server process only accepts remote procedure calls to
special-order.p
andspecial-stock.p
.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |