project BLF > class ComponentPool > method SaveStateInPool

Description

Close all open instances of business components and save state.


Internal usage


BLF
method ComponentPool.DeActivateInPool


program code (program1/componentpool.p)

for each btCPool where btCPool.tlIsInUse:

    if valid-handle (btCPool.thIns)
    then do:
        run SaveState in btCPool.thIns (output viFcReturnSuper).
        delete procedure btCPool.thIns.
        if btCPool.tlRemoveOnClose
        then do:
            <M-29 run RemoveComponent  (input  rowid(btCPool) (irCPoolRowid)) in ComponentPool>
        end.
        else do:
            run gipr_DeleteQueryProcedures in btCPool.thProc.
            run gipr_InitState in btCPool.thProc.
            assign btCPool.tlIsInUse = no
                   btCPool.thIns = ?
                   btCPool.tiInsID = 0.
        end.
    end.
    else assign btCPool.tlIsInUse = no
                btCPool.thIns = ?
                btCPool.tiInsID = 0.
end.