From the outside, in terms of using the job manager, the only difference is to provide simply one DLL instead of an interface program in .EXE.
As far as Visual programs are concerned, any program that supports the job manager interface can be used in either DLL or EXE, keeping in mind that DLL use implies the limitations set out below.
The DLL must support the Adelia programs interface and export a VA_Main function that matches the following prototype:
void VA_Main (char * param1, char * param2, long * idJob);
Examples:
- HFSOU2.EXE execution program: executes HFSOU2.EXE.
- HFSOU2 execution program: executes HFSOU2.EXE.
- HFSOU2.DLL execution program: loads HFSOU2.DLL and runs the VA_Main entry point using a host process.
Some precautions must be taken in Adelia programs that are called using a host process.
The programs must be defined as programs that can be called many times without interfering on the results.
This means the program called will not be unloaded from the memory between two calls generally speaking.
This implies several potential problems:
- Global variables are not reset between calls. This means that you cannot assume that these variables have been set to zero when the program starts.
- In the case of an Adelia program, Middleware and database connections are not killed when the program ends, but are reused for the next call. As a consequence, two potential issues may arise:
- With no DB disconnection, programs must be correct and complete their transactions properly (no implicit ROLLBACK when the program ends if there is a programming error).
- If the Middleware configuration is modified or the program can potentially rely on a specific configuration file specified as a parameter, it is up to the program to detect these changes and to reset the connections if necessary.
For short processing, the estimated gain is a maximum of 50%. This execution mode is therefore only necessary for very fast processing. An intrinsically "slow" job process will see no gain using this execution mode.
For specific starting programs, it may be possible to accelerate operation even more by forcing the load of the most required programs at start up (LOAD_DLL without any corresponding UNLOAD_DLL).