OpenTP1 Version 7 User's Guide
This section discusses the handling of UAP shared libraries when dynamic loading of service functions is used. For an overview of dynamic loading of service functions, see the OpenTP1 series manuals.
Dynamic loading of service functions cannot be used in the following cases:
If service functions are in a UAP shared library, make sure that you export from the UAP shared library the service functions defined in the user service definition that are included in the UAP shared library when the user server starts.
If the service functions have not been exported (during process startup for a nonresident server), the following occurs:
You can export any function other than the service functions specified in the user service definition according to the processing mode because export of such a function is not mandatory.
You can use the lib and link commands to export functions from a UAP shared library. Use one of the following methods to export service functions:
For examples of creation, see the following sample source (makefiles):
| SPP development language and environment | Makefile name | |
|---|---|---|
| C language | %DCDIR%\examples\base\aplib\c\make_svdl |
|
| COBOL | COBOL2002 | %DCDIR%\examples\base\aplib\cobol\make_svdl |
| Net Express | %DCDIR%\examples\base\aplib\cobol\makemf_svdl |
|
If only a UAP shared library name is specified, OpenTP1 searches for the specified UAP shared library based on the OS library search path. In Windows, the specified UAP shared library is searched for using the search paths listed below (where the search paths are listed in order of priority):
The following example loads the into the UAP the UAP shared library located under folder (b):
| Name of path containing UAP: c:\user\aplib\user.exe Name of path containing DLL: c:\opentp1\aplib\libusr.dll c:\user\aplib\libusr.dll <Process service definition> prcsvpath c:\opentp1\aplib; c:\user\aplib (a) (b) |
When you are using dynamic loading of service functions, you can replace a user server's service functions without having to stop online operation. This subsection explains how to replace service functions and how to check the result.
This subsection explains how to replace service functions when you change the user service definition and when you change the UAP shared library search path.
Check the start time of the new executable file and compare it to the execution time of the dcsvstart or scdrsprc command.
You can use the procedure described below to check the start time of the new executable file. The example provided here is for Windows Server 2008.
To check the result:
You can specify both an absolute path and a library name in the service operand in the user service definition.
If the UAP shared library specified by the absolute path is the same as that specified by the library name, the UAP shared library path to be loaded depends on the specification order.
The following provides the details based on which name is specified first.
Do not use a thread local storage (TLS) to declare variables in a UAP shared library specified in the service operand in the user service definition. If the UAP shared library contains a UAP object that contains the code shown below, referencing of the corresponding variable results in an access exception:
__declspec(Thread) int sample; |
All Rights Reserved. Copyright (C) 2012, Hitachi, Ltd.