iBatis Analyzer#

The object relational framework, iBatis, takes care of heavy lifting of various database access and execution related operations while providing the java middle tier convenience to interface with the database layer. But, as iBatis hides the complexities of data access from Java, the dependencies between them also get hidden in the process. The iBatis Analyzer figures out about the dependencies so that the dependencies from java to the database become clear.

The iBatis Analyzer parses java byte code and sql map configuration file to generate the dependencies between Java classes and Database objects.

The iBatis Analyzer became available from Lattix 8.3 onwards.

Running the iBatis Analyzer#

Invoke the iBatis Analyzer using the batch file toolcmd.bat (for windows).

Command Line Arguments#

The iBatis Analyzer takes the following arguments:

toolcmd -command ibatis [-input input | -classesdir classes-dir-name | -jardir jar-dir-name | -jarfile jar-file] [-outfile out-file.ldi] [-sqlMapCfg sqlmapconfig-xml-file] | [-memberlevel] [-help]

Mandatory arguments:

-input : Specify the input war or, jar file or, the directory that the analyzer should process. The input war or, jar file will be copied to the temp directory during the processing. The original content of the input will not be impacted.
In case input is a directory, the content will be added to a jar file called inputJarFile.jar (under the temp directory) and all files from this jar file will be analyzed.
Or,
-classesdir : Specify the directory where java class files are located. The class files from this directory / sub-directory will be added to a jar file called inputJarFile.jar (under the user temp directory) and all class files will be analyzed. The original content of the classes directory will not be impacted.
Or,
-jardir: Specify the directory where jar files are located. All jar files will be analyzed.
Or,
-jarfile: Specify the jar file that need to be analyzed. All class files in the jar file will be analyzed.

-outfile: Specify the file for the output. If the output file name is of type “ldi”, the format of the output will be for ldi. If the output file name is of type “csv”, the format of the file will be csv (comma seperated values). Note that csv files can be read into excel directly. If you do not specify the output option, dependencies will be dumped out on the console in a text format.

-sqlMapCfg: Specify the iBatis sql map configuration xml file to be analyzed. This is optional if input (-input war or, jar file or, the directory) or, classes directory (-classesdir) has been specified and sql map config xml files are available there.

Optional arguments:
-memberlevel: The dependency will be established at the method level on the java side.
-help: Simply outputs the command line.