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
,DMSBaseService
,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
Modifier and TypeFieldDescriptionprotected List
<ISMDataType> protected Log
used for display of statements from COBOL EXHIBIT statementstatic final String
For internal use only - contains profiling/execution-time information for each program ranstatic long
static long
for 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
ConstructorDescriptionconstructorBaseService
(BaseService parent) constructorBaseService
(Long sessionId) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
representation of COBOL goto statementprotected void
final void
accept
(AbstractCBLField toAccept) Screen handling method representing COBOL's ACCEPT FROM SCREEN methods.final void
addCallParameter
(int param) caller sets the parameterfinal void
addCallParameter
(int param, boolean byContent) caller sets the parameterfinal void
addCallParameter
(CBLPointer param, boolean byContent) caller sets the parameterfinal void
addCallParameter
(ISMDataType dataObj) Passing variables by Reference means that any changes to the values will be passed back to the calling class.final void
addCallParameter
(ISMDataType dataObj, boolean byContent) caller sets the parameterfinal void
addCallParameter
(ISMNumeric dataObj) final void
addCallParameter
(String param) final void
addCallParameter
(String param, boolean byContent) caller sets the parameterfinal void
addRuntimeParameter
(String param) Used by the starting application (SMLauncher) to pass in runtime parameter (if any)final void
addRuntimeParameter
(String[] params) Used by the starting application (SMTextAppLauncher) to pass in runtime parameter (if any)final void
assignCallerProgram
(IBaseService theCallerProgram) tell the system who called it !final void
assignCyclicBarrier
(CyclicBarrier barrier) for internal use onlyfinal 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)final void
assignLastKeyPressed
(int lastKeyPressed) Originally introduced for handling Tandem Screens.final void
assignLaunchedInstances
(List<BaseService> launchedInstances) for internal use onlyfinal void
assignTargetXMLScreen
(boolean targetIsXML) Used internally by framework to support JSP type screensfinal void
assignUsesAnnotationBasedMethodOrdering
(boolean newValue) final int
Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases.protected void
callJavaMethod
(String methodName) equivalant of COBOL PERFORM statementprotected void
callJavaMethod
(String methodName, boolean suppressExceptions) when the system does not use GOTO or PERFORM, then use this onefinal void
chain
(BaseService chainedProgram) represenatation of COBOL CHAIN statement.final void
void
commitAndReleaseConnection
(boolean doCommit) int
For internal use Returns count of Registered Input Parametersstatic String
Representation of COBOL's ACCEPT FROM DATEprotected void
destroy()
Automatically called after exiting a program (normal exit, Go-Back).protected void
Automatically called after fatal errorvoid
void
Automatically called after CANCELing (ServicesFactory.cancel) running a program - it removes all wrapperListsvoid
doFinalize
(boolean forceRelease) Used primarily for termination of inner-Class calls (0014678)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.final void
Invoking 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 Integer
execute
(ISMDataType wrapper1) Execute the calling program, using the provided parameters.final Integer
execute
(ISMDataType wrapper1, ISMDataType wrapper2) Execute the calling program, using the provided parameters.final Integer
execute
(ISMDataType wrapper1, ISMDataType wrapper2, ISMDataType wrapper3) Execute the calling program, using the provided parameters.final Integer
execute
(ISMDataType wrapper1, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4) Execute the calling program, using the provided parameters.final Integer
execute
(ISMDataType wrapper1, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4, ISMDataType wrapper5) Execute the calling program, using the provided parameters.final Integer
final Integer
this is same as standard "execute" method.final Integer
executeWithPointerData
(CBLPointer wrapper1) this is same as standard "execute" method.final BaseService
The program which called this one.final ISMBean[]
return the Array of dataWrappersfinal ISMObject
Return the field identified by fieldName.final int
final int
static final int
getMethodNumber
(String methodName) method used by internal Softwaremining Framework libraries.protected final String
getNextPoint
(String nextPointName) get next paragraph in chainfinal Method
getParagraph
(String paragraphName) final int
representation of COBOL RETURN valuefinal String
Used internally by SoftwareMining frameworkfinal IScreenClient
method used internally by SoftwareMining frameworkfinal String
final Long
method used internally by SoftwareMining frameworkfinal XMLScreenDefReader
getXMLScreenDefReader
(String filenameAndPath) method used internally by SoftwareMining frameworkfinal void
goBack()
Translation of COBOL GOBACK statement.protected boolean
for internal use onlyprotected void
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.final void
final void
invokeRange
(String firstParagraphName, String lastParagraphName) translation of COBOL perform-Thrufinal boolean
method used internally by SoftwareMining frameworkboolean
final boolean
To do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g.boolean
final boolean
Used internally by framework to support JSP type screensstatic void
Allows placing a Main method into each programmethod used internally by SoftwareMining frameworkprotected final boolean
objectsAreOfTheSameClass
(Object anObject, Object anotherObject) Return true if both objects are of the same class.static final void
optimizeUsingTransfuseByReference
(boolean newValue) Change whether to optimize transfuse processing or not.final String
return next runtime parameter (if any) and remove it from the stackvoid
populateFromLastSQLMessage
(ISMBean sqlca, ISMDataType messageArea, int length) EsqlProcessor and IBaseService needs this method to exist.void
populateFromLastSQLMessage
(ISMDataType _dfheiblk, ISMDataType _dfhcommarea, ISMDataType sqlca, ISMDataType messageArea, long length) protected void
For internal use onlyvoid
quit()
Gracefully Stop the execution of this programprotected final void
receiveExecuteParameter
(ISMDataType param1) protected final void
receiveExecuteParameter
(ISMDataType wrapper, ISMDataType wrapper2) protected final void
receiveExecuteParameter
(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3) protected final void
receiveExecuteParameter
(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4) protected final void
receiveExecuteParameter
(ISMDataType wrapper, ISMDataType wrapper2, ISMDataType wrapper3, ISMDataType wrapper4, ISMDataType wrapper5) final void
registerDataWrapper
(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 void
registerDataWrappers
(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 void
The "execute()" method usually passes parameters to this class.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.void
for internal use only used by CICS subsystemprotected void
used in IMS and CICS ApiFor internal usefinal CyclicBarrier
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.retrieveField
(String fieldName) Return the field identified by fieldName.final int
To do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g.final int
Originally 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 int
To do with multi-processing/multi-threaded launch of application by SMLauncher numIntances=n
E.g.void
run()
method is used internally by SoftwareMining framework.final void
setCallerWaiting
(boolean callerWaiting) method used internally by SoftwareMining frameworkfinal void
This method is used internally by SoftwareMining framwork.protected final void
when the system exits with fatal exceptions, then the return code will be set here.final void
setHttpRequestParameterMap
(Map httpRequestParameterMap) method used by internal Softwaremining Framework libraries.final void
setLastDisplayColumn
(int lastDisplayColumn) final void
setLastDisplayRow
(int lastDisplayRow) final void
setReturnCode
(long newReturnCode) representation of COBOL RETURN valuefinal void
setReturnCode
(Integer newReturnCode) representation of COBOL RETURN valuefinal void
setReturnCode
(String newReturnCode) final void
setScreenClient
(IScreenClient screenClient) method used internally by SoftwareMining frameworkfinal void
setSessionId
(Long sessionId) final void
setUsesAnnotationBasedMethodOrdering
(boolean newValue) void
startUp()
The first method called in the program to start the business logic processing.final void
stop()
Translation of COBOL STOP statement.final void
stop
(long newValue) Translation of COBOL STOP RETURNING statement Gracefully STOPS the execution of the application (Does not kill the application server).void
tearDown()
Sometimes it may be desirable to perform some cleanup prior to closing of a program.protected void
transfuse
(List<ISMDataType> in, List<ISMDataType> out, boolean back) protected final void
transfuseByReference
(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:
getSessionId
in interfaceIBaseService
-
setSessionId
- Specified by:
setSessionId
in 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:
getLastDisplayColumn
in interfaceIDisplayable
-
setLastDisplayColumn
public final void setLastDisplayColumn(int lastDisplayColumn) - Specified by:
setLastDisplayColumn
in interfaceIDisplayable
-
getLastDisplayRow
public final int getLastDisplayRow()- Specified by:
getLastDisplayRow
in interfaceIDisplayable
-
setLastDisplayRow
public final void setLastDisplayRow(int lastDisplayRow) - Specified by:
setLastDisplayRow
in 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:
makeUpClassScreenSourceName
in 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:
invoke
in 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:
invokeRange
in interfaceIBaseService
- Parameters:
firstParagraphName
-lastParagraphName
-- Throws:
ControlException
-
_goto
representation of COBOL goto statement- Specified by:
_goto
in 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:
setScreenClient
in interfaceService
-
getScreenClient
method used internally by SoftwareMining framework- Specified by:
getScreenClient
in interfaceIDisplayable
-
getWrapperList
method used internally by SoftwareMining framework -
getXMLScreenDefReader
method used internally by SoftwareMining framework- Specified by:
getXMLScreenDefReader
in 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:
goBack
in interfaceIBaseService
- Throws:
ControlException
-
stop
Translation of COBOL STOP statement. Gracefully STOPS the execution of the application (Does not kill the application server).- Specified by:
stop
in 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:
retrieveField
in 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:
getField
in interfaceIDisplayable
- Parameters:
fieldName
-- Returns:
-
getScreenClassName
Used internally by SoftwareMining framework- Specified by:
getScreenClassName
in 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:
addCallParameter
in 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:
addCallParameter
in 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:
addCallParameter
in 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.param
-
-
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:
addCallParameter
in interfaceIBaseService
- Parameters:
dataObj
-
-
addCallParameter
-
addCallParameter
public final void addCallParameter(int param) caller sets the parameter- Specified by:
addCallParameter
in interfaceIBaseService
- Parameters:
param
-
-
addCallParameter
caller sets the parameter- Specified by:
addCallParameter
in interfaceIBaseService
- Parameters:
param
-
-
addCallParameter
- Specified by:
addCallParameter
in 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:
execute
in 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:
execute
in 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:
execute
in 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:
execute
in 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:
execute
in 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:
execute
in 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:
execute
in interfaceIBaseService
-
chain
represenatation of COBOL CHAIN statement.- Parameters:
chainedProgram
-- Throws:
ControlException
-
setReturnCode
public final void setReturnCode(long newReturnCode) representation of COBOL RETURN value- Specified by:
setReturnCode
in interfaceIBaseService
- Parameters:
newReturnCode
-
-
setReturnCode
-
setReturnCode
representation of COBOL RETURN value- Parameters:
newReturnCode
-
-
getReturnCode
public final int getReturnCode()representation of COBOL RETURN value- Specified by:
getReturnCode
in 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.UTCLauncher1invalid input: '&VARIABLE_1'=foo In this case, there are 2 parameters: LAUNCH_CLASS=com.ttutc.utcid.UTCLauncher1 invalid input: '&' 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:
setHttpRequestParameterMap
in 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:IDisplayable
Originally introduced for handling Tandem Screens. But has potential of usage in CICS screens- Specified by:
retrieveLastKeyPressed
in interfaceIDisplayable
- Returns:
- KeyNumber
-
assignLastKeyPressed
public final void assignLastKeyPressed(int lastKeyPressed) Description copied from interface:IDisplayable
Originally introduced for handling Tandem Screens. But has potential of usage in CICS screens- Specified by:
assignLastKeyPressed
in interfaceIDisplayable
- Parameters:
lastKeyPressed
-
-
isTargetXMLScreen
public final boolean isTargetXMLScreen()Used internally by framework to support JSP type screens- Specified by:
isTargetXMLScreen
in interfaceIDisplayable
-
assignTargetXMLScreen
public final void assignTargetXMLScreen(boolean targetIsXML) Description copied from interface:IDisplayable
Used internally by framework to support JSP type screens- Specified by:
assignTargetXMLScreen
in interfaceIDisplayable
- Parameters:
targetIsXML
-
-
isGUIScreensEnabled
public boolean isGUIScreensEnabled()- Specified by:
isGUIScreensEnabled
in interfaceIDisplayable
-
disableGUIScreens
public void disableGUIScreens()- Specified by:
disableGUIScreens
in 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:
-
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
-
-
populateFromLastSQLMessage
EsqlProcessor and IBaseService needs this method to exist. But please do not use- Specified by:
populateFromLastSQLMessage
in interfaceIBaseService
- Parameters:
sqlca
-messageArea
-length
-
-
populateFromLastSQLMessage
public void populateFromLastSQLMessage(ISMDataType _dfheiblk, ISMDataType _dfhcommarea, ISMDataType sqlca, ISMDataType messageArea, long length) - Specified by:
populateFromLastSQLMessage
in interfaceIBaseService
-