Package com.softwaremining.sql
Class ESQLBaseService
java.lang.Object
com.softwaremining.logic.BaseService
com.softwaremining.sql.ESQLBaseService
- All Implemented Interfaces:
IBaseService
,Service
,SQLHandlerInterface
,IDisplayable
,Runnable
- Direct Known Subclasses:
CicsBaseService
,ILEBaseService
,KeyGenerator
Embedded-SQL BaseService - supporting business logic part of programs with Embedded-SQL
-
Field Summary
Fields inherited from class com.softwaremining.logic.BaseService
calledParameters, log, PARA_NAME_POSTFIX, profiled_baseService_runtimes, totalRuntime_processControlException, totalRuntime_reflection
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
Fields inherited from interface com.softwaremining.sql.SQLHandlerInterface
HANDLER_CONTINUE, HANDLER_GO_TO, HANDLER_METHOD_CALL, HANDLER_NOT_INTIALIZED, HANDLER_PERFORM, HANDLER_STOP, HANDLER_THROW, SQL_SCHEMA_PROP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Rollback changes made by all instances of ESQLProcessorprotected void
closeESQLProcessors
(boolean releaseConnection) for internal use onlyvoid
commit()
Commit all the active ESQLProcessorsprotected void
destroy()
Close connection all instances of ESQLProcessor Automatically called after exiting a program (normal exit, Go-Back).protected void
Automatically called after fatal errorvoid
Automatically called after CANCELing (ServicesFactory.cancel) running a program - it removes all wrapperListsvoid
doFinalize
(boolean forceRelease, boolean releaseConnection) Automatically called after CANCELing (ServicesFactory.cancel) running a program - it removes all wrapperListsvoid
in ESQL projects commits are manually made e.g EXEC SQL COMMIT END-EXEC Hence turn the auto-commit off during initializationvoid
populateFromLastSQLMessage
(ISMBean sqlca, ISMDataType messageArea, int length) Translation of CICS DSNTIARvoid
populateFromLastSQLMessage
(ISMDataType _dfheiblk, ISMDataType _dfhcommarea, ISMDataType sqlca, ISMDataType messageArea, long length) Translation of CICS DSNTIARvoid
processSQLException
(SQLException e, int handler, String forward) protected int
processSQLException
(SQLException e, ISMBean sqlca, int rowCount, boolean afterEndOfResultSet) used for internal SQL Handlingvoid
quit()
Commit changes made by all instances of ESQLProcessorvoid
When the using connection strategy Config.CONNECTION_STRATEGY_SHARE_ESQL_SESSION_CONN the system will release Connections only when Garbage Collector releases the owning ESQLBaseService class.static void
resetSQLCA
(ISMBean sqlca) void
rollback()
Rollback ALL the active ESQLProcessors Only works when AUTO-COMMIT is switched off in db.properties.void
setErrorHandler
(int errorHandler) void
setErrorHandler
(int errorHandler, String errorHandlerForward) void
setErrorHandlerForward
(String errorHandlerForward) void
setNotFoundHandler
(int notFoundHandler) void
setNotFoundHandler
(int notFoundHandler, String notFoundHandlerForward) used for translation of SQL EXEC SQL WHENEVER NOT FOUND GO TO ...void
setNotFoundHandlerForward
(String notFoundHandlerForward) void
setSessionSchemaName
(String schemaName) Allows to dynamically change the SCHEMA_NAME (as defined in db.properties).void
setWarningHandler
(int warningHandler) void
setWarningHandler
(int warningHandler, String warningHandlerForward) Methods inherited from class com.softwaremining.logic.BaseService
_goto, accept, addCallParameter, addCallParameter, addCallParameter, addCallParameter, addCallParameter, addCallParameter, addCallParameter, addCallParameter, addRuntimeParameter, addRuntimeParameter, assignCallerProgram, assignCyclicBarrier, assignInstanceNumber, assignLastKeyPressed, assignLaunchedInstances, assignTargetXMLScreen, assignUsesAnnotationBasedMethodOrdering, awaitBarrier, callJavaMethod, callJavaMethod, chain, clearCallingParameters, commitAndReleaseConnection, countCallParameters, currentDate, disableGUIScreens, doFinalize, enableReuse, execute, execute, execute, execute, execute, execute, execute, executeWithPointerData, executeWithPointerData, getCallerProgram, getDataWrappers, getField, getLastDisplayColumn, getLastDisplayRow, getMethodNumber, getNextPoint, getParagraph, getReportProcessorList, getReturnCode, getScreenClassName, getScreenClient, getServletRunTimeParameterFrom, getSessionId, getWrapperList, getXMLScreenDefReader, goBack, hasReflectionBasedFlowLogic, invoke, invokeRange, isCallerWaiting, isCicsAutoSyncPointEnabled, isFirstInstance, isGUIScreensEnabled, isTargetXMLScreen, main, makeUpClassScreenSourceName, objectsAreOfTheSameClass, optimizeUsingTransfuseByReference, popNextRuntimeParameter, processCicsAbendException, receiveExecuteParameter, receiveExecuteParameter, receiveExecuteParameter, receiveExecuteParameter, receiveExecuteParameter, registerDataWrapper, registerDataWrappers, registerExecuteParameters, reInitializeAllDAOs, reInitializeBaseService, reRegisterExecuteParameters, retrieveCalledParameters, retrieveCyclicBarrier, retrieveField, retrieveInstanceNumber, retrieveLastKeyPressed, retrieveLaunchedInstances, retrieveTotalNumberOfInstancesLaunched, run, setCallerWaiting, setCommandLineParameters, setExceptionalExitReturnCode, setHttpRequestParameterMap, setLastDisplayColumn, setLastDisplayRow, setReturnCode, setReturnCode, setReturnCode, setScreenClient, setSessionId, setUsesAnnotationBasedMethodOrdering, startUp, stop, stop, tearDown, transfuse, transfuseByReference
-
Field Details
-
staticLogger
-
totalRuntime
public static long totalRuntimefor internal use only ... profiling information
-
-
Constructor Details
-
ESQLBaseService
-
ESQLBaseService
public ESQLBaseService()
-
-
Method Details
-
setErrorHandler
public void setErrorHandler(int errorHandler) -
setErrorHandlerForward
-
setNotFoundHandler
public void setNotFoundHandler(int notFoundHandler) -
setNotFoundHandlerForward
-
setWarningHandler
public void setWarningHandler(int warningHandler) -
setErrorHandler
-
setWarningHandler
-
setNotFoundHandler
used for translation of SQL EXEC SQL WHENEVER NOT FOUND GO TO ...- Parameters:
notFoundHandler
- - type : HANDLER_GO_TO , HANDLER_STOP , HANDLER_GO_TO = 2, HANDLER_THROW = 3notFoundHandlerForward
- - method name. The framework applies a GO TO call startegy to the method. If the program is using standard java method calling strategy - the method is called and control is passed back .
-
processSQLException
protected int processSQLException(SQLException e, ISMBean sqlca, int rowCount, boolean afterEndOfResultSet) throws CBLException used for internal SQL Handling- Parameters:
e
-sqlca
-notFound
-- Throws:
CBLException
-
processSQLException
- Throws:
CBLException
-
initializeBaseService
public void initializeBaseService()in ESQL projects commits are manually made e.g EXEC SQL COMMIT END-EXEC Hence turn the auto-commit off during initialization- Overrides:
initializeBaseService
in classBaseService
-
abort
Rollback changes made by all instances of ESQLProcessor- Overrides:
abort
in classBaseService
-
quit
public void quit()Commit changes made by all instances of ESQLProcessor- Overrides:
quit
in classBaseService
-
commit
public void commit()Commit all the active ESQLProcessors -
rollback
public void rollback()Rollback ALL the active ESQLProcessors Only works when AUTO-COMMIT is switched off in db.properties. If autocommit is on, then usesqlprocessor.prepare("ROLLBACK"); sqlprocessor.executeUpdate();
, -
destroy
protected void destroy()Close connection all instances of ESQLProcessor Automatically called after exiting a program (normal exit, Go-Back). and prepare for GC- Overrides:
destroy
in classBaseService
-
destroyOnFatalError
protected void destroyOnFatalError()Description copied from class:BaseService
Automatically called after fatal error- Overrides:
destroyOnFatalError
in classBaseService
-
releaseESQLConnections
public void releaseESQLConnections()When the using connection strategy Config.CONNECTION_STRATEGY_SHARE_ESQL_SESSION_CONN the system will release Connections only when Garbage Collector releases the owning ESQLBaseService class. This method will force the connection to be closed -
doFinalize
public void doFinalize()Automatically called after CANCELing (ServicesFactory.cancel) running a program - it removes all wrapperLists- Overrides:
doFinalize
in classBaseService
-
doFinalize
public void doFinalize(boolean forceRelease, boolean releaseConnection) Automatically called after CANCELing (ServicesFactory.cancel) running a program - it removes all wrapperLists- Overrides:
doFinalize
in classBaseService
- Parameters:
forceRelease
-
-
closeESQLProcessors
protected void closeESQLProcessors(boolean releaseConnection) for internal use only -
getESQLProcessors
-
setSessionSchemaName
Allows to dynamically change the SCHEMA_NAME (as defined in db.properties). The new SCHEMA_NAME only applies to the SQL access in current session.- Parameters:
schemaName
-
-
resetSQLCA
-
populateFromLastSQLMessage
public void populateFromLastSQLMessage(ISMDataType _dfheiblk, ISMDataType _dfhcommarea, ISMDataType sqlca, ISMDataType messageArea, long length) Translation of CICS DSNTIAR- Specified by:
populateFromLastSQLMessage
in interfaceIBaseService
- Overrides:
populateFromLastSQLMessage
in classBaseService
- Parameters:
_dfheiblk
- *UNUSED*_dfhcommarea
- *UNUSED*sqlca
-messageArea
-length
-
-
populateFromLastSQLMessage
Translation of CICS DSNTIAR- Specified by:
populateFromLastSQLMessage
in interfaceIBaseService
- Overrides:
populateFromLastSQLMessage
in classBaseService
- Parameters:
sqlca
-messageArea
-length
-
-