project BLF > class Startup > method MainBlock
Description
Main block of the startup component
Parameters
icBusinessComponents | input | character | List (comma separated) of business component short names. The components from this list will be loaded at startup of each appserver process. |
Internal usage
unused
program code (program1/startup.p)
vlFcStateless = (session:server-operating-mode = "Stateless").
vlFcOk = no.
publish "ComponentPoolIsRunning" (output vlFcOk).
if vlFcOk = no
then do:
<M-66 run Main () in ComponentPool>
session:add-super-procedure(vhFcComponent).
end.
/* ====================================================================================== */
/* Start some components so that the generic components gets cached. */
/* ====================================================================================== */
<M-1 run StartDefaultComponents (output viFcReturnSuper (oiReturnStatus)) in Startup>
do viCount = 1 to NUM-ENTRIES (icBusinessComponents):
<M-2 run StartComponent (input entry(viCount,icBusinessComponents) (icBusinessComponent),
output viFcReturnSuper (oiReturnStatus)) in Startup>
end.
/* write any errors to the appserver log */
for each tFcMessages:
log-manager:write-message ("appserver startup error " + tFcMessages.tcFcMsgNumber
+ ": " + tFcMessages.tcFcMessage
+ " (" + tFcMessages.tcFcType + ")").
end.