Package com.softwaremining.logic
Class BaseService
java.lang.Object
com.softwaremining.logic.BaseService
- All Implemented Interfaces:
IBaseService,Service,IDisplayable,Runnable
- Direct Known Subclasses:
BullBaseService,CAIdealBaseService,ESQLBaseService,FileLoaderService,HpBaseService,ShadowBaseService,VaxBaseService,VosBaseService,WangBaseService
This is the main super class of Business-Logic classes. It provides many COBOL functionalities such as
GOTO, Perform, CALLS/CANCELS, resource managements and ...
Business logic classes can also inherit from other classes such as ESQLBaseService or CicsBaseService (or user's own SuperClass). But these classes invariably have to inherit from BaseService.
Business logic classes can also inherit from other classes such as ESQLBaseService or CicsBaseService (or user's own SuperClass). But these classes invariably have to inherit from BaseService.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ISMDataType>protected Logused for display of statements from COBOL EXHIBIT statementstatic final StringFor internal use only - contains profiling/execution-time information for each program ranstatic longstatic longfor internal use only ...Fields inherited from interface com.softwaremining.ui.IDisplayable
_FKEY_INPUT, _INVALIDATE, FKEY_1, FKEY_10, FKEY_11, FKEY_12, FKEY_2, FKEY_3, FKEY_4, FKEY_5, FKEY_6, FKEY_7, FKEY_8, FKEY_9 -
Constructor Summary
ConstructorsConstructorDescriptionconstructorBaseService(BaseService parent) constructorBaseService(Long sessionId) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidrepresentation of COBOL goto statementprotected voidfinal voidaccept(AbstractCBLField toAccept) Screen handling method representing COBOL's ACCEPT FROM SCREEN methods.final voidaddCallParameter(int param) caller sets the parameterfinal voidaddCallParameter(int param, boolean byContent) caller sets the parameterfinal voidaddCallParameter(CBLPointer param, boolean byContent) caller sets the parameterfinal voidaddCallParameter(ISMDataType dataObj) Passing variables by Reference means that any changes to the values will be passed back to the calling class.final voidaddCallParameter(ISMDataType dataObj, boolean byContent) caller sets the parameterfinal voidaddCallParameter(ISMNumeric dataObj) final voidaddCallParameter(String param) final voidaddCallParameter(String param, boolean byContent) caller sets the parameterfinal voidaddRuntimeParameter(String param) Used by the starting application (SMLauncher) to pass in runtime parameter (if any)final voidaddRuntimeParameter(String[] params) Used by the starting application (SMTextAppLauncher) to pass in runtime parameter (if any)final voidassignCallerProgram(IBaseService theCallerProgram) tell the system who called it !final voidassignCyclicBarrier(CyclicBarrier barrier) for internal use onlyfinal voidassignInstanceNumber(int procNum) For internal use only To do with multi-processing/multi-threaded launch of application (launched from SMLauncher using -numInstances=n parameter)final voidassignLastKeyPressed(int lastKeyPressed) Originally introduced for handling Tandem Screens.final voidassignLaunchedInstances(List<BaseService> launchedInstances) for internal use onlyvoidassignPCBFile(String pcbFile) For benefit of , and only use in IMS processingfinal voidassignTargetXMLScreen(boolean targetIsXML) Used internally by framework to support JSP type screensfinal voidassignUsesAnnotationBasedMethodOrdering(boolean newValue) final intEnables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases.protected voidcallJavaMethod(String methodName) equivalant of COBOL PERFORM statementprotected voidcallJavaMethod(String methodName, boolean suppressExceptions) when the system does not use GOTO or PERFORM, then use this onefinal voidchain(BaseService chainedProgram) represenatation of COBOL CHAIN statement.final voidvoidcommitAndReleaseConnection(boolean doCommit) intFor internal use Returns count of Registered Input Parametersstatic StringRepresentation of COBOL's ACCEPT FROM DATEprotected voiddestroy()Automatically called after exiting a program (normal exit, Go-Back).protected voidAutomatically called after fatal errorvoidvoidAutomatically called after CANCELing (ServicesFactory.cancel) running a program - it removes all wrapperListsvoiddoFinalize(boolean forceRelease) Used primarily for termination of inner-Class calls (0014678)voiddoFinalize(boolean forceRelease, boolean closeConnection) virtual method - this is for manual use - it forces release of all wrappers - Only use when it can be known for certain that the programs calling this one, or programs called by this one are not referencing the wrappers.final voidInvoking this method allows the "Entry" program (the one without a session id) to be reused.execute()Run the program - transferring any parameters via method "addCallParameter" to the called program.final Integerexecute(ISMDataType wrapper1) Execute the calling program, using the provided parameters.final Integerexecute(ISMDataType wrapper1, ISMDataType wrapper2) Execute the calling program, using the provided parameters.final Integerexecute(ISMDataType wrapper1, ISMDataType wrapper2, ISMDataType wrapper3) Execute the calling program, using the provided parameters.final Integerexecute(ISMDataType wrapper1, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4) Execute the calling program, using the provided parameters.final Integerexecute(ISMDataType wrapper1, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4, ISMDataType wrapper5) Execute the calling program, using the provided parameters.final Integerfinal Integerexecute(String data, ISMDataType arg2) final Integerthis is same as standard "execute" method.final IntegerexecuteWithPointerData(CBLPointer wrapper1) this is same as standard "execute" method.final ISMBeangetActiveBeanInstance(String className) final BaseServiceThe program which called this one.final ISMBean[]return the Array of dataWrappersfinal ISMObjectReturn the field identified by fieldName.final intfinal intstatic final intgetMethodNumber(String methodName) method used by internal Softwaremining Framework libraries.protected final StringgetNextPoint(String nextPointName) get next paragraph in chainfinal MethodgetParagraph(String paragraphName) final intrepresentation of COBOL RETURN valuefinal StringUsed internally by SoftwareMining frameworkfinal IScreenClientmethod used internally by SoftwareMining frameworkfinal Stringfinal Longmethod used internally by SoftwareMining frameworkfinal XMLScreenDefReadergetXMLScreenDefReader(String filenameAndPath) method used internally by SoftwareMining frameworkfinal voidgoBack()Translation of COBOL GOBACK statement.protected booleanfor internal use onlyprotected voidInitialize method names : When method names contain the "_Mxxx" notation, then the system will go thru the methods and put them in to a list, therefore ensuring the _gotos and _performThru functionality works.final voidfinal voidinvokeRange(String firstParagraphName, String lastParagraphName) translation of COBOL perform-Thrufinal booleanmethod used internally by SoftwareMining frameworkbooleanfinal booleanTo do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g.booleanfinal booleanUsed internally by framework to support JSP type screensstatic voidAllows placing a Main method into each programmethod used internally by SoftwareMining frameworkprotected final booleanobjectsAreOfTheSameClass(Object anObject, Object anotherObject) Return true if both objects are of the same class.static final voidoptimizeUsingTransfuseByReference(boolean newValue) Change whether to optimize transfuse processing or not.final Stringreturn next runtime parameter (if any) and remove it from the stackvoidpopulateFromLastSQLMessage(ISMBean sqlca, ISMDataType messageArea, long length) EsqlProcessor and IBaseService needs this method to exist.voidpopulateFromLastSQLMessage(ISMDataType _dfheiblk, ISMDataType _dfhcommarea, ISMDataType sqlca, ISMDataType messageArea, long length) protected voidFor internal use onlyvoidquit()Gracefully Stop the execution of this programprotected final voidreceiveExecuteParameter(ISMDataType param1) protected final voidreceiveExecuteParameter(ISMDataType wrapper, ISMDataType wrapper2) protected final voidreceiveExecuteParameter(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3) protected final voidreceiveExecuteParameter(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4) protected final voidreceiveExecuteParameter(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4, ISMDataType wrapper5) final voidregisterDataWrapper(ISMBean wrapper) Method Used internally by SoftwareMining framework All Data-Access-Objects / DAO's are registered - to allow the system to release the memory on exitfinal voidregisterDataWrappers(ISMBean[] wrappers) Method Used internally by SoftwareMining framework All Data-Access-Objects / DAO's are registered - to allow the system to release the memory on exitprotected voidThe "execute()" method usually passes parameters to this class.voidreInitializeAllDAOs(boolean resetDAOInitialValues) reinitializes CBLBeans to their default char-array representation, and AbstractCOntainer to their default values This allows system to reuse the Wrapper classes in other programs.voidfor internal use only used by CICS subsystemprotected voidused in IMS and CICS ApiFor internal usefinal CyclicBarrierFor use in batch programs lunched in several instances (multi-threaded) using SMLauncher using -numInstances=n parameter
Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases.retrieveField(String fieldName) Return the field identified by fieldName.final intTo do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g.final intOriginally introduced for handling Tandem Screens.final List<BaseService>To do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g.final intTo do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g.voidrun()method is used internally by SoftwareMining framework.final voidsetCallerWaiting(boolean callerWaiting) method used internally by SoftwareMining frameworkfinal voidThis method is used internally by SoftwareMining framwork.protected final voidwhen the system exits with fatal exceptions, then the return code will be set here.final voidsetHttpRequestParameterMap(Map<String, String[]> httpRequestParameterMap) method used by internal Softwaremining Framework libraries.final voidsetLastDisplayColumn(int lastDisplayColumn) final voidsetLastDisplayRow(int lastDisplayRow) final voidsetReturnCode(long newReturnCode) representation of COBOL RETURN valuefinal voidsetReturnCode(Integer newReturnCode) representation of COBOL RETURN valuefinal voidsetReturnCode(String newReturnCode) final voidsetScreenClient(IScreenClient screenClient) method used internally by SoftwareMining frameworkfinal voidsetSessionId(Long sessionId) final voidsetUsesAnnotationBasedMethodOrdering(boolean newValue) voidstartUp()The first method called in the program to start the business logic processing.final voidstop()Translation of COBOL STOP statement.final voidstop(long newValue) Translation of COBOL STOP RETURNING statement Gracefully STOPS the execution of the application (Does not kill the application server).voidtearDown()Sometimes it may be desirable to perform some cleanup prior to closing of a program.protected voidtransfuse(List<ISMDataType> in, List<ISMDataType> out, boolean back) protected final voidtransfuseByReference(ISMBean sourceObj, ISMBean targetObj) Transfuse source object into target object by reference.
-
Field Details
-
PARA_NAME_POSTFIX
- See Also:
-
log
used for display of statements from COBOL EXHIBIT statement -
calledParameters
-
totalRuntime_reflection
public static long totalRuntime_reflectionfor internal use only ... profiling information -
totalRuntime_processControlException
public static long totalRuntime_processControlException -
profiled_baseService_runtimes
For internal use only - contains profiling/execution-time information for each program ran
-
-
Constructor Details
-
BaseService
constructor- Parameters:
parent-
-
BaseService
-
BaseService
public BaseService()constructor
-
-
Method Details
-
optimizeUsingTransfuseByReference
public static final void optimizeUsingTransfuseByReference(boolean newValue) Change whether to optimize transfuse processing or not.- Parameters:
newValue- whether or not to optimize
-
getSessionId
- Specified by:
getSessionIdin interfaceIBaseService
-
setSessionId
- Specified by:
setSessionIdin interfaceIBaseService
-
enableReuse
public final void enableReuse()Invoking this method allows the "Entry" program (the one without a session id) to be reused. Enabling this will stop the system from freeing all the DAO resources - which means they do not need new memory allocations. -
getLastDisplayColumn
public final int getLastDisplayColumn()- Specified by:
getLastDisplayColumnin interfaceIDisplayable
-
setLastDisplayColumn
public final void setLastDisplayColumn(int lastDisplayColumn) - Specified by:
setLastDisplayColumnin interfaceIDisplayable
-
getLastDisplayRow
public final int getLastDisplayRow()- Specified by:
getLastDisplayRowin interfaceIDisplayable
-
setLastDisplayRow
public final void setLastDisplayRow(int lastDisplayRow) - Specified by:
setLastDisplayRowin interfaceIDisplayable
-
registerDataWrapper
Method Used internally by SoftwareMining framework All Data-Access-Objects / DAO's are registered - to allow the system to release the memory on exit- Parameters:
wrapper-
-
registerDataWrappers
Method Used internally by SoftwareMining framework All Data-Access-Objects / DAO's are registered - to allow the system to release the memory on exit- Parameters:
wrapper-
-
getDataWrappers
return the Array of dataWrappers- Returns:
-
setUsesAnnotationBasedMethodOrdering
public final void setUsesAnnotationBasedMethodOrdering(boolean newValue) -
assignUsesAnnotationBasedMethodOrdering
public final void assignUsesAnnotationBasedMethodOrdering(boolean newValue) -
initializeBaseService
protected void initializeBaseService()Initialize method names : When method names contain the "_Mxxx" notation, then the system will go thru the methods and put them in to a list, therefore ensuring the _gotos and _performThru functionality works. The intialize method will get called during calls to "run" method. -
makeUpClassScreenSourceName
method used internally by SoftwareMining framework- Specified by:
makeUpClassScreenSourceNamein interfaceIDisplayable- Returns:
- - a string representing the XML screen file for program. For example, for class com.softwaremining.examples.Loan, the following string will be returned: /com/softwaremining/examples/loan/xml/screens/Loan.xml
-
invoke
- Specified by:
invokein interfaceIBaseService- Throws:
ControlException
-
callJavaMethod
equivalant of COBOL PERFORM statement- Parameters:
targetName-- Throws:
ControlException
-
callJavaMethod
when the system does not use GOTO or PERFORM, then use this one- Parameters:
methodName-
-
hasReflectionBasedFlowLogic
protected boolean hasReflectionBasedFlowLogic()for internal use only- Returns:
-
invokeRange
public final void invokeRange(String firstParagraphName, String lastParagraphName) throws ControlException translation of COBOL perform-Thru- Specified by:
invokeRangein interfaceIBaseService- Parameters:
firstParagraphName-lastParagraphName-- Throws:
ControlException
-
_goto
representation of COBOL goto statement- Specified by:
_gotoin interfaceIBaseService- Throws:
ControlException
-
getParagraph
-
getNextPoint
get next paragraph in chain- Parameters:
nextPointName-- Returns:
-
run
public void run()method is used internally by SoftwareMining framework. Allows the root LAUNCHING programs to be run in a separate thread. This is important for Screen-handling applications. -
processCicsAbendException
For internal use only- Parameters:
e-
-
setScreenClient
method used internally by SoftwareMining framework- Specified by:
setScreenClientin interfaceService
-
getScreenClient
method used internally by SoftwareMining framework- Specified by:
getScreenClientin interfaceIDisplayable
-
getWrapperList
method used internally by SoftwareMining framework -
getXMLScreenDefReader
method used internally by SoftwareMining framework- Specified by:
getXMLScreenDefReaderin interfaceIDisplayable
-
setCallerWaiting
public final void setCallerWaiting(boolean callerWaiting) method used internally by SoftwareMining framework -
isCallerWaiting
public final boolean isCallerWaiting()method used internally by SoftwareMining framework -
popNextRuntimeParameter
return next runtime parameter (if any) and remove it from the stack -
getServletRunTimeParameterFrom
- Parameters:
key-- Returns:
-
accept
Screen handling method representing COBOL's ACCEPT FROM SCREEN methods. The method will first check to see if there is any run-time parameters which will need to be assigned to this field. If so, it will POP the runtime parameters and sets the "toAccept" field to the value of the first one. -
quit
public void quit()Gracefully Stop the execution of this program -
goBack
Translation of COBOL GOBACK statement. Performs house keeping (preparing return code, pass-by-reference data) and then passes control to the calling. In absence of a Calling program (e.g. when launched from command-line) it terminates the execution thread.- Specified by:
goBackin interfaceIBaseService- Throws:
ControlException
-
stop
Translation of COBOL STOP statement. Gracefully STOPS the execution of the application (Does not kill the application server).- Specified by:
stopin interfaceIBaseService- Throws:
ControlException
-
stop
Translation of COBOL STOP RETURNING statement Gracefully STOPS the execution of the application (Does not kill the application server).- Throws:
ControlException
-
retrieveField
Return the field identified by fieldName. Used internally by SoftwareMining Framework in Reports/Displays.- Specified by:
retrieveFieldin interfaceIDisplayable- Parameters:
fieldName-- Returns:
-
getField
Return the field identified by fieldName. If className is provided, then try to find the className.fieldName Used internally by SoftwareMining Framework in Reports/Displays- Specified by:
getFieldin interfaceIDisplayable- Parameters:
fieldName-- Returns:
-
getActiveBeanInstance
-
getScreenClassName
Used internally by SoftwareMining framework- Specified by:
getScreenClassNamein interfaceIDisplayable
-
currentDate
Representation of COBOL's ACCEPT FROM DATE- Returns:
- Stringified date
-
countCallParameters
public int countCallParameters()For internal use Returns count of Registered Input Parameters -
retrieveCalledParameters
For internal use -
reRegisterExecuteParameters
protected void reRegisterExecuteParameters()used in IMS and CICS Api -
receiveExecuteParameter
-
receiveExecuteParameter
-
receiveExecuteParameter
protected final void receiveExecuteParameter(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3) -
receiveExecuteParameter
protected final void receiveExecuteParameter(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4) -
receiveExecuteParameter
protected final void receiveExecuteParameter(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4, ISMDataType wrapper5) -
addCallParameter
caller sets the parameter- Specified by:
addCallParameterin interfaceIBaseService- Parameters:
param-byContent- : Passing variables by Reference means that any changes to the values will be passed back to the calling class. Passing variables by content means that changes will NOT be passed to the caller.
-
addCallParameter
public final void addCallParameter(int param, boolean byContent) caller sets the parameter- Specified by:
addCallParameterin interfaceIBaseService- Parameters:
byContent- : Passing variables by Reference means that any changes to the values will be passed back to the calling class. Passing variables by content means that changes will NOT be passed to the caller.
-
addCallParameter
caller sets the parameter- Specified by:
addCallParameterin interfaceIBaseService- Parameters:
param-byContent- : Passing variables by Reference means that any changes to the values will be passed back to the calling class. Passing variables by content means that changes will NOT be passed to the caller.
-
addCallParameter
Passing variables by Reference means that any changes to the values will be passed back to the calling class. Passing variables by content means that changes will NOT be passed to the caller.- Specified by:
addCallParameterin interfaceIBaseService- Parameters:
dataObj-
-
addCallParameter
-
addCallParameter
public final void addCallParameter(int param) caller sets the parameter- Specified by:
addCallParameterin interfaceIBaseService- Parameters:
param-
-
addCallParameter
caller sets the parameter- Specified by:
addCallParameterin interfaceIBaseService- Parameters:
param-
-
addCallParameter
- Specified by:
addCallParameterin interfaceIBaseService
-
clearCallingParameters
public final void clearCallingParameters() -
addRuntimeParameter
Used by the starting application (SMLauncher) to pass in runtime parameter (if any) -
addRuntimeParameter
Used by the starting application (SMTextAppLauncher) to pass in runtime parameter (if any) -
execute
Run the program - transferring any parameters via method "addCallParameter" to the called program. Note that in some COBOL application a very large number of Parameters will be passed between programs. For example, 20 parameters may be used in a call. This makes it impractical to have a a single "execute" method with 20 parameters to receive the calls. After successful execution of program, the parameters passed by reference will have new values.- Specified by:
executein interfaceIBaseService- Returns:
- '0' represents successful completion of called program
-
setCommandLineParameters
public final void setCommandLineParameters()This method is used internally by SoftwareMining framwork. This method is only invoked when the application is started from command line, e.g. when : java -Xms150m -Xmx550m com.softwaremining.SMTextAppLauncher com.mypackage.MyClass paramter-1, parameter-2 It ensures that the parameter-1 and parameter-2 is passed onto the MyClass
NOTE: The target class must overwrite the method: registerUsingParameters() ... to tell the system which fields should be populated. -
execute
Execute the calling program, using the provided parameters. "addCallParameter" is used to set the parameters.- Specified by:
executein interfaceIBaseService- Parameters:
wrapper1- - Instance of CBLBean object passed to the called program- Returns:
- '0' represents successful completion of called program
-
executeWithPointerData
this is same as standard "execute" method. The intention is for translator to high light calls where system is explicitly passing pointers -
executeWithPointerData
this is same as standard "execute" method. The intention is for translator to light calls calls where all parameters are pointers -
execute
Execute the calling program, using the provided parameters. "addCallParameter" is used to set the parameters.- Specified by:
executein interfaceIBaseService- Parameters:
wrapper1- - Instance of CBLBean object passed to the called programwrapper2- - Instance of CBLBean object passed to the called program- Returns:
- '0' represents successful completion of called program
-
execute
Execute the calling program, using the provided parameters. "addCallParameter" is used to set the parameters.- Specified by:
executein interfaceIBaseService- Parameters:
wrapper1- - Instance of CBLBean object passed to the called programwrapper2- - Instance of CBLBean object passed to the called programwrapper3- - Instance of CBLBean object passed to the called program- Returns:
- '0' represents successful completion of called program
-
execute
public final Integer execute(ISMDataType wrapper1, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4) Execute the calling program, using the provided parameters. "addCallParameter" is used to set the parameters.- Specified by:
executein interfaceIBaseService- Parameters:
wrapper1- - Instance of CBLBean object passed to the called programwrapper2- - Instance of CBLBean object passed to the called programwrapper3- - Instance of CBLBean object passed to the called programwrapper4- - Instance of CBLBean object passed to the called program- Returns:
- '0' represents successful completion of called program
-
execute
public final Integer execute(ISMDataType wrapper1, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4, ISMDataType wrapper5) Execute the calling program, using the provided parameters. "addCallParameter" is used to set the parameters.- Specified by:
executein interfaceIBaseService- Parameters:
wrapper1- - Instance of CBLBean object passed to the called programwrapper2- - Instance of CBLBean object passed to the called programwrapper3- - Instance of CBLBean object passed to the called programwrapper4- - Instance of CBLBean object passed to the called programwrapper5- - Instance of CBLBean object passed to the called program- Returns:
- '0' represents successful completion of called program
-
execute
- Specified by:
executein interfaceIBaseService
-
execute
-
chain
represenatation of COBOL CHAIN statement.- Parameters:
chainedProgram-- Throws:
ControlException
-
setReturnCode
public final void setReturnCode(long newReturnCode) representation of COBOL RETURN value- Specified by:
setReturnCodein interfaceIBaseService- Parameters:
newReturnCode-
-
setReturnCode
-
setReturnCode
representation of COBOL RETURN value- Parameters:
newReturnCode-
-
getReturnCode
public final int getReturnCode()representation of COBOL RETURN value- Specified by:
getReturnCodein interfaceIBaseService- Parameters:
newReturnCode-
-
registerExecuteParameters
protected void registerExecuteParameters()The "execute()" method usually passes parameters to this class. This method will receive the incoming data - into the parameters registered here. default method for receiving no parameters from the called program. -
abort
-
isCicsAutoSyncPointEnabled
public boolean isCicsAutoSyncPointEnabled() -
getReportProcessorList
-
destroy
protected void destroy()Automatically called after exiting a program (normal exit, Go-Back). -
destroyOnFatalError
protected void destroyOnFatalError()Automatically called after fatal error -
doFinalize
public void doFinalize()Automatically called after CANCELing (ServicesFactory.cancel) running a program - it removes all wrapperLists -
doFinalize
public void doFinalize(boolean forceRelease) Used primarily for termination of inner-Class calls (0014678)- Parameters:
forceRelease-
-
doFinalize
public void doFinalize(boolean forceRelease, boolean closeConnection) virtual method - this is for manual use - it forces release of all wrappers - Only use when it can be known for certain that the programs calling this one, or programs called by this one are not referencing the wrappers.- Parameters:
forceRelease-
-
reInitializeBaseService
public void reInitializeBaseService()for internal use only used by CICS subsystem -
reInitializeAllDAOs
public void reInitializeAllDAOs(boolean resetDAOInitialValues) reinitializes CBLBeans to their default char-array representation, and AbstractCOntainer to their default values This allows system to reuse the Wrapper classes in other programs. This is only used in Cics applications . NOTES: A goBack() and end of the execution will clear all DAO's passed via AddCallParameters (Linkage-Section). -
transfuse
-
transfuseByReference
Transfuse source object into target object by reference. This method assumes the transfuse is done in the forward direction and so the targetObject is held by a Field variable of the receiver object. In this case we use introspection to locate the Field and we use that to set the value of the Field in receiver to the source object thus avoiding unnecessary copying of data from source to target object. To avoid doing this introspection work the next time around we cache the Field in an identity map keyed by source object (since that will be the new value of the field after this method is executed). This method collects various metrics to measure performance.- Parameters:
sourceObj- the source objecttargetObj- the target object
-
objectsAreOfTheSameClass
Return true if both objects are of the same class.- Parameters:
anObject- the one objectanotherObject- the other object- Returns:
- whether objects are of the same class
-
getMethodNumber
method used by internal Softwaremining Framework libraries. for screen handling via Servlet engine- Returns:
-
setHttpRequestParameterMap
method used by internal Softwaremining Framework libraries. for screen handling via Servlet engine The is called first time the system is called. It passes the startup parameters to the system. For example: http://www.abcd.com/XMLservlet?LAUNCH_CLASS=com.ttutc.utcid.UTCLauncher1&VARIABLE_1=foo In this case, there are 2 parameters: LAUNCH_CLASS=com.ttutc.utcid.UTCLauncher1 & VARIABLE_1=Patms001 The LAUNCH_CLASS is already used to construct/instantiate the target program. The System will attempt to locate VARIABLE_1 and assign the value to foo- Specified by:
setHttpRequestParameterMapin interfaceService
-
getCallerProgram
The program which called this one.- Returns:
-
commitAndReleaseConnection
public void commitAndReleaseConnection(boolean doCommit) -
assignCallerProgram
tell the system who called it ! -
setExceptionalExitReturnCode
protected final void setExceptionalExitReturnCode()when the system exits with fatal exceptions, then the return code will be set here. -
startUp
public void startUp()The first method called in the program to start the business logic processing. The Method to be over-ridden only by subclasses of BaseService which do not utilize reflection means of flow logic (by using _M10, _M20 appended to method names) -
tearDown
public void tearDown()Sometimes it may be desirable to perform some cleanup prior to closing of a program. The tearDown method is called on/after goBack() -
retrieveLastKeyPressed
public final int retrieveLastKeyPressed()Description copied from interface:IDisplayableOriginally introduced for handling Tandem Screens. But has potential of usage in CICS screens- Specified by:
retrieveLastKeyPressedin interfaceIDisplayable- Returns:
- KeyNumber
-
assignLastKeyPressed
public final void assignLastKeyPressed(int lastKeyPressed) Description copied from interface:IDisplayableOriginally introduced for handling Tandem Screens. But has potential of usage in CICS screens- Specified by:
assignLastKeyPressedin interfaceIDisplayable
-
isTargetXMLScreen
public final boolean isTargetXMLScreen()Used internally by framework to support JSP type screens- Specified by:
isTargetXMLScreenin interfaceIDisplayable
-
assignTargetXMLScreen
public final void assignTargetXMLScreen(boolean targetIsXML) Description copied from interface:IDisplayableUsed internally by framework to support JSP type screens- Specified by:
assignTargetXMLScreenin interfaceIDisplayable
-
isGUIScreensEnabled
public boolean isGUIScreensEnabled()- Specified by:
isGUIScreensEnabledin interfaceIDisplayable
-
disableGUIScreens
public void disableGUIScreens()- Specified by:
disableGUIScreensin interfaceIDisplayable
-
assignInstanceNumber
public final void assignInstanceNumber(int procNum) For internal use only To do with multi-processing/multi-threaded launch of application (launched from SMLauncher using -numInstances=n parameter)- Parameters:
procNum-
-
assignCyclicBarrier
for internal use only- Parameters:
barrier-
-
retrieveCyclicBarrier
For use in batch programs lunched in several instances (multi-threaded) using SMLauncher using -numInstances=n parameter
Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases. To do with multi-processing/multi-threaded launch of application (launched from SMLauncher using -numInstances=n parameter) -
awaitBarrier
public final int awaitBarrier()Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases. This is same as Java CyclicBarrier.await() method - but will only throw the ACMFatalException (a RuntimeException ) -
retrieveInstanceNumber
public final int retrieveInstanceNumber()To do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g. when 3 instances are launched, each one will have an instanceNumber of 1, 2, or 3.- Returns:
-
isFirstInstance
public final boolean isFirstInstance()To do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g. when 3 instances are launched, this method will return true only for the first instance.
Return true for applications launched with only 1 instance (default mode).- Returns:
-
assignLaunchedInstances
for internal use only -
retrieveLaunchedInstances
To do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g. when 3 instances are launched, this method will return a list of all 3 instances.- Returns:
-
retrieveTotalNumberOfInstancesLaunched
public final int retrieveTotalNumberOfInstancesLaunched()To do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g. when 3 instances are launched, this method will return 3- Returns:
-
assignPCBFile
For benefit of , and only use in IMS processing- Parameters:
pcbFile-
-
populateFromLastSQLMessage
EsqlProcessor and IBaseService needs this method to exist. But please do not use- Specified by:
populateFromLastSQLMessagein interfaceIBaseService- Parameters:
sqlca-messageArea-length-
-
populateFromLastSQLMessage
public void populateFromLastSQLMessage(ISMDataType _dfheiblk, ISMDataType _dfhcommarea, ISMDataType sqlca, ISMDataType messageArea, long length) - Specified by:
populateFromLastSQLMessagein interfaceIBaseService
-
main
Allows placing a Main method into each programpublic static void main(String[] args) { main( Prog1.class , args); }And then instead of using SMTextAppLauncher, we can launch the application by: java com.company.applcation.Prog1- Parameters:
baseServiceClass-args-
-