As explained in JEE - Prepare and deliver the source code, CAST AIP extracts relevant information used to create the automated analysis configuration from the JEE project files. Currently the JEE Analayzer extension supports these build project files:
- Eclipse - all version greater than 3
- Maven - version 2 and 3
For any other build project format (e.g. Apache -ant) the CAST AIP will not be able to automatically retrieve build information: no Analysis Unit will be created and no analysis configuration will be provided. To address this situation, the Analysis Unit and the analysis configuration should be created manually. This case falls outside of the out-of-the-box support and is out of scope of a standard analysis.
Using AIP Console
AIP Console exposes the Technology configuration options once a version has been accepted/imported, or an analysis has been run. Click JEE Technology to display the available options:
Technology settings are organized as follows:
- Settings specific to the technology for the entire Application (i.e. all Analysis Units)
- List of Analysis Units (a set of source code files to analyze) created for the Application
- Settings specific to each Analysis Unit (typically the settings are the same or similar as at Application level) that allow you to make fine-grained configuration changes.
Settings are initially set according to the information discovered during the source code discovery process when creating a version. You should check that these auto-determined settings are as required and that at least one Analysis Unit exists for the specific technology.
Technology and Analysis Unit settings
Notes on Technology and Analysis Unit settings:
Technology |
|
Analysis Unit |
|
Technology level settings
Classpath
Classpaths are automatically discovered by the AIP Console through the inspection of the project files. If the project files are missing or if you receive , Classpaths can be added manually at Technology level (i.e. for all Analysis Units) and can be discovered via manual inspection of the delivered source code or by inquiring with the Application Team.
The analyzer uses the Classpath information to search for external classes that are referenced in project code but not defined in your source code files. Classpath entries can be either a file (archive file such as a JAR) or a folder. When analyzing a folder, the analyzer assumes that classes are correctly deployed on disk and that they respect the naming convention where a package maps to a folder and a class maps to a file.
If you need to add additional Classpaths, use the Add button to define your class path files (typically an archive file) or folders. You will be prompted to select the type you want to add:
Add New Archive File | If the project uses external classes packaged in a single JAR file, use this option to define the location of a single JAR file. You can define multiple JAR files as separate entries, although consider using the Archive Folder option if the project uses multiple JAR files. |
---|---|
Class Root Folder | If the project uses external classes defined in .class files, use this option to define the location of the root folder. You can define multiple Class Root Folders. All .class files in the folder and any sub folders will be taken into account (if the Recursive option is enabled) .java and .XML files are ignored. |
Archive Folder | If the project uses external classes packaged in multiple JAR files, use this option to define the location of the folder containing the JAR files. You can also define multiple Archive Folders. All JAR files in the folder and any sub folders (if the Recursive option is enabled) will be taken into account. |
All three options will open the web interface on the following root folder location, unless the location has been changed during the AIP Console setup and installation:
<AIP_Node_install_folder>/AipNode/data/upload/java
Use the green buttons in the bottom right corner to add the required items - doing so will add the items to the storage location and they can be re-used for other Applications if necessary:
- use the Upload a folder icon to create a folder in the root location into which you can then add your .class or .jar files using the Upload a file icon:
- use the Upload a file icon to upload a specific file into the current folder:
- Alternatively, if the .jar/.class file/folders have been delivered already but are not found (for example you have an alert stating a missing file) then you can select the files from the delivered source code using the drop down. Then drill down to the delivered source code:
- Alternatively, you can upload the required files direct on the AIP Node using Remote Desktop/File Explorer into:
<AIP_Node_install_folder>/AipNode/data/upload/java
When you have either uploaded the required files/folders or located them in the delivered source code, you need to select the required files/folder by placing a tick in the tick box and then clicking Save:
Selected class paths will be listed:
- If you define any JAR archives (individual archives or archives located in a folder), during the analysis the archive(s) will be unpacked in memory and analyzed.
- When defining a class path, instead of listing all the subdirectories of package, it is more convenient to add the folder that contains the package. For example: if a Java file contains: "import com.Pkg1.Pkg2.*" and these packages are located in the folder "<DIR>/com/Pkg1/Pkg2", simply add the folder <DIR> to the class path.
Java / JEE versions
Java version | The analyzer will assume that that latest version of the JDK has been used to compile the application source code. If your application source code does not use the latest JDK, you can override the selection by manually choosing a version in the drop down.
| |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JEE (Servlets/JSP) versions | The analyzer will assume that that latest Servlet/JSP version has been used to compile the application source code. Use the drop down list box to choose the correct option if your application source code uses an older version. It is possible to obtain the JSP version in use by opening the application's web.xml file and locating the DTD version used to define the servlet - this is the servlet version. The servlet version is 2.3 in the example below: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> Using this information, see the table below for equivalence:
| |||||||||||||||||||||
Enable JEE Web Profile Analysis | This section governs the settings that will be applied if your JEE project is defined as a web application:
Web Client Files The JEE Analyzer does not support the analysis of web client files such as *.HTML, *.CSS, *.JS. These files are handled by the HTML5 and JavaScript extension. |
Java Frameworks
For more information about frameworks see JEE - Framework analysis tips.
The Java Framework section governs the analysis settings used when a specific Java framework is present in your source code. These pre-defined settings are designed to address specific recurrent issues during analysis and correspond to default Environment Profiles. Each framework has an associated drop down list box with various options:
JPA (Hibernate), Struts and Spring
By default, the option for these Frameworks will be set to "Latest". In other words, the analyzer always assumes that you are using the latest available release supported by the JEE analyzer extension. You can override the default setting if required:
Web Service (WBS) Version and EJB2 (Enterprise Java Bean) Version
Auto discovery and configuration of Web Services (WBS Services) is supported and Enterprise Java Bean (EJB) is not supported. The AIP Super Operator will need to gather the required information from the application team or inspect the delivered source code to determine the proper configuration of these parameters. Then a decision will need to be made to select the correct version of each:
Web Services | CAST AIP ≥ 8.3.6 Auto discovery and configuration of Web Services (WBS Services) is supported as follows:
CAST AIP ≤ 8.3.6 Auto discovery and configuration of Enterprise Java Bean (EJB) is not supported. The AIP Super Operator will need to gather the required information from the application team or inspect the delivered source code to determine the proper configuration of these parameters. Then a decision will need to be made to select the correct version. |
---|---|
EJB | Auto discovery and configuration of Enterprise Java Bean (EJB) is not supported. The AIP Super Operator will need to gather the required information from the application team or inspect the delivered source code to determine the proper configuration of these parameters. Then a decision will need to be made to select the correct version. |
Note:
- To find out if your application implements web services, simply search for files with the extension .wsdl or.wsd, or the files web-services.xml or webservices.xml in the source file directories. Usually, these files are located in the META-INF directory, but as the source folders do not always match the production folder tree, we recommend searching all the source files.
- If you explicitly select an EJB2 profile (see above) then all configuration regarding EJB 3.x will be automatically deactivated.
Other frameworks
Other frameworks, such as those listed below are always handled "out-of-the box":
- EJB3, 3.1, 3.2
- JSF
- CDI
- Common-logging
- Dom4
- JUnit
- Log4J
- MX4J
- CICS ECI/CTG
Note:
- versions for EJB 3.x, JSF, CDI will follow the Java Version (i.e. the JDK) that is set for the source code.
- if you explicitly select an EJB2 profile (see above) then all configuration regarding EJB 3.x will be automatically deactivated.
When unsupported frameworks (i.e. not supported out-of the box) are part of the delivery, a Custom Environment Profile needs to be created to enable correct processing. To identify unknown frameworks or custom frameworks, there are various methods:
- Find all the XML files and look at the DTD they are referring to. This allows you to find frameworks like Spring, Hibernate... (You can use UltraEdit or a grep command to find the pattern DTD inside XML files in one go). Examples:
Framework | DTD |
---|---|
Hibernate | <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> |
iBATIS | <!DOCTYPE daoConfigPUBLIC "-//iBATIS.com//DTD DAO Configuration 2.0//EN""http://www.ibatis.com/dtd/dao-2.dtd"> |
Spring | <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> |
- Look at the libraries: the names of the libraries can give you an indication. Examples:
Framework | Libraries |
---|---|
Hibernate | hibernate3.jar |
iBATIS | ibatis-common-2.jar |
Spring | spring-1.2.7.jar |
- Look at the different extensions used throughout the entire application. This information will also allow you to verify if the default extension list used by the analyzer to parse client and server source code is complete.Examples:
- .jhtml: for Java HTML (See http://en.wikipedia.org/wiki/JHTML). This is used with Dynamo, a Java-based Web application server
- .jspx: JSPX pages are a special type of JSP page: They are pre-processed by the JSPXServlet, and converted into regular JSP pages (See: http://stackoverflow.com/questions/28235/should-i-be-doing-jspx-instead-of-jsp
- .jspf: for JSP Page Fragment
- .jrxml: for Jasper Report (http://en.wikipedia.org/wiki/JasperReports#JRXML)
Files to analyze
This section displays a list of the file extensions for the various parts of your JEE application. These file extensions are the default included in the current file filter and only files that match these file extensions will be taken into account during the analysis. You can manually update these file extensions if necessary.
Dependencies
Dependencies are configured at Application level for each technology and are configured between individual Analysis Units/groups of Analysis Units (dependencies between technologies are not available as is the case in the CAST Management Studio). You can find out more detailed information about how to ensure dependencies are set up correctly, in Advanced onboarding - review analysis configuration and execution for AIP Console.
Analysis Units
This section lists all Analysis Units created either automatically based on the source code discovery process or manually. You should check that at least one Analysis Unit exists for the specific technology. Settings at Analysis Unit level can be modified independently of the parent Technology settings and any other Analysis Units if required - click the Analysis Unit to view its technology settings:
See Application - Config - Analysis - Working with Execution Groups for more information about the options available here. Clicking an Analysis Unit will take you directly to the available Analysis Unit level settings:
Technology settings at Analysis Unit level
Technology settings at Analysis Unit level are for the most part identical to those explained above. Some differences exist:
Main Files | This section lists the location of the files for analysis. This is usually a location in the designated Deployment folder. You can include additional folder or exclude existing folders if required using the Add button. All three options will open the web interface on the following root folder location, unless the location has been changed during the AIP Console setup and installation: %PROGRAMDATA%/CAST/AipConsole/AipNode/upload/ |
---|---|
Resource Files | These two options are read-only. They list any files that will be taken into account during the analysis, such as .XML, .properties and any files that correspond to the Enable JEE Web Profile Analysis option described at Technology level. |
Web Application Files |
Using legacy CAST Management Studio
Introduction to analysis configuration options
The CAST Management Studio has three levels at which analysis configuration options can be set:
Technology |
|
Application |
|
Analysis Unit |
|
Some settings at Application and Analysis Unit level have a "Reset" option - using this will reset the option to the value set at the parent level:
Auto-configuration validation
Technology / Application level
Using the Technology level or Application level options, validate the Analysis settings for JEE packages. Make any update as required. These settings apply to the Technology or Application as a whole (i.e. all Analysis Units):
Analysis Unit level
As explained in JEE - Prepare and deliver the source code, the CAST Delivery Manager Tool extracts relevant information used to create the automated analysis configuration from the JEE project files. Currently the extension supports these build project files:
- Eclipse - all version greater than 3
- Maven - version 2 and 3
For any other build project format (e.g. Apache -ant) the CAST Delivery Manager Tool will not be able to automatically retrieve build information: no Analysis Unit will be created and no analysis configuration provided. To address this situation, the Analysis Unit and the analysis configuration should be created manually. This case falls outside of the out-of-the-box support and is out of scope of a standard analysis.
To inspect the auto-generated analysis configuration, you should review the settings in each Analysis Unit - they can be accessed through the Application editor:
Technology options
The available options for configuring an analysis are described below. Note that some options are not available at specific levels (Technology/Application/Analysis Unit):
Source Settings
This tab and its child tabs (Java, Resources and Web Application) show the location of each type of source code in the JEE Analysis Unit - this is determined automatically by the CAST Delivery Manager Tool. You should, however, review the configuration and make any changes you need (click to enlarge):
Java tab
Java File Extensions | This section displays a list of the file extensions that are included in the current file filter for your Java code analysis. Only files that match these file extensions will be taken into account during the analysis. |
Java Files | Use this section to include or exclude specific source files for the Analysis Unit for analysis purposes - these are mainly to be used when you are manually creating your Analysis Unit but can also be used if you are modifying an automatically created Analysis Unit.
If this Analysis Unit is automatically defined, then any auto defined entries will be read only. |
Resources tab
XML / properties files
These options manage the location of your XML and .properties files.
You can find out more about:
- XML file handling in Manage XML configuration files
- .properties file handling in Manage properties files
XML File Extensions | This section displays a list of the file extensions that are included in the current file filter for the XML files in your analysis. Only files that match these file extensions will be taken into account during the analysis. Equivalent option is not available for .properties files. |
Also use Project Root Path for XML / Property Files | If you select this option, the project root path (i.e. the location of the .project file for the Analysis Unit) will be used as a source for the XML / .properties files. If you wish to add additional source files use the option described below. |
XML / Property Files | Use this section to include or exclude specific source files for the Analysis Unit for analysis purposes - these are mainly to be used when you are manually creating your Analysis Unit but can also be used if you are modifying an automatically created Analysis Unit.
If this Analysis Unit is automatically defined, then any auto defined entries will be read only. |
Web Application tab
The JEE Analyzer extension supports the analysis of web applications that do not contain a web.xml application descriptor. In this situation, the "Web Application Root Path" (i.e. the location of web server files such as *.XHTML and *.JSP) can be automatically discovered by the analyzer based on the location of the web files on disk. To this end, the field Web Application Root Path at Analysis Unit level is now an optional field in the CAST Management Studio. If the source code does not contain a web.xml file, the Web Application Root Path is now automatically discovered by exploring each Analysis Unit's project path (i.e. the location of the .project file) on disk, however, it can be overridden manually.
Web Application Root Path | Indicates the folder that is defined as the web application root folder for the Analysis Unit for analysis purposes. The Web Application Root Path is the path to the folder that contains web server files (*.XHTML, *.JSP etc.). This field does not need to be populated (i.e. it is optional). If this Analysis Unit has been automatically defined during the "Set as Current Version", then the JEE Analyzer will attempt to populate this field automatically. You can choose a different location (use Browse) if necessary, however, CAST recommends letting the CAST Management Studio handle this. Note that:
|
Web Application Descriptor | Indicates the JEE application's Web Application Descriptor. By default, the JEE Analyzer will use the Web Application Root Path set above and append \WEB-INF\web.xml. If this is not correct for your application, you can choose a new Application Descriptor. Note that path resolution for the objects defined inside the selected web.xml file (for example tag libraries) is made using the default location of the web.xml file (\WEB-INF folder). |
Web Server
Web Server File Extensions | This section displays a list of the file extensions that are included in the current file filter for your source code analysis. Only files that match these file extensions will be included in the analysis. |
Also use Web Application Root Path for Web Server Files | If you select this option, the Web Application Root Path will be used as a source for the web server files. If you wish to add additional source files use the option described below. |
Web Server Files | Use this section to include or exclude specific source files for the Analysis Unit for analysis purposes - these are mainly to be used when you are manually creating your Analysis Unit but can also be used if you are modifying an automatically created Analysis Unit.
If this Analysis Unit is automatically defined, then any auto defined entries will be read only. |
Web Client Files
The JEE Analyzer does not support the analysis of web client files such as *.HTML, *.CSS, *.JS. These files must now handled by the HTML5 and JavaScript extension.
Analysis
The settings in this tab govern how the source code is handled by the analyzer (click to enlarge):
Java
Java Version | The analyzer will assume that that latest version of the JDK has been used to compile the application source code. If your application source code does not use the latest JDK, you can override the selection manually: Note that:
| ||||||
Class Paths | Class Paths are automatically discovered by the CAST Delivery Manager Tool through the inspection of the project files. If the project files are missing, Class Paths must be added manually to the Analysis Unit and must be discovered via inspection of the delivered source code or by inquiring with the Application Team. The analyzer uses this information to search for external classes that are referenced in project code but not defined in your source code files. Classpath entries can be either a file or a folder. When analyzing a folder, the analyzer assumes that classes are correctly deployed on disk and that they respect the naming convention where a package maps to a folder and a class maps to a file.
|
Web Application
This section governs the settings that will be applied if your JEE project is defined as a web application:
Enable JEE Web Profile Analysis
YES | When set to the default YES position, the analyzer is capable of analyzing web files (.JSP, .XHTML etc) even if no Web Application Descriptor (web.xml) is present in each Analysis Unit in the Application. These web files are instead identified for analysis by exploring each Analysis Unit's Analysis Unit's project path (i.e. the location of the .project file). |
NO | When set to the NO position, the behaviour will revert to pre-CAST AIP 8.2.x. In other words a Web Application Descriptor (web.xml) must be present in the Application and defined in the relevant field in each Analysis Unit in order that web files (.JSP, .XHTML etc.) are analyzed. |
Web Client Files
The JEE Analyzer does not support the analysis of web client files such as *.HTML, *.CSS, *.JS. These files must now handled by the HTML5 and JavaScript extension.
JEE (Servlets/JSP) version used by the application
The analyzer will assume that that latest Servlet/JSP version has been used to compile the application source code.
Use the drop down list box to choose the correct option if your application source code uses an older version. It is possible to obtain the JSP version in use by opening the application's web.xml file and locating the DTD version used to define the servlet - this is the servlet version. The servlet version is 2.3 in the example below:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
Using this information, see the table below for equivalence:
Servlet version | JSP version |
---|---|
2.1 or 2.2 | 1.1 |
2.3 | 1.2 |
2.4 | 2.0 |
2.5 | 2.1 |
3.0 | 2.2 |
3.1 | 2.3 |
Frameworks
For more information about frameworks see JEE - Framework analysis tips.
The Framework section governs the analysis settings used when a specific Java framework is present in your source code. These pre-defined settings are designed to address specific recurrent issues during analysis and correspond to default Environment Profiles. Each framework has an associated drop down list box with various options:
JPA (Hibernate), Struts and Spring
By default, the option for these Frameworks will be set to "Latest". In other words, the analyzer always assumes that you are using the latest available release supported by the JEE analyzer extension. You can override the default setting if required:
Web Service (WBS) Version and EJB2 (Enterprise Java Bean) Version
Auto discovery and configuration of Web Services (WBS Services) is supportedand Enterprise Java Bean (EJB) is not supported. The CAST AI Admin will need to gather the required information from the application team or inspect the delivered source code to determine the proper configuration of these parameters. Then a decision will need to be made to select the correct version of each:
Web Services | CAST AIP ≥ 8.3.6 Auto discovery and configuration of Web Services (WBS Services) is supported by the CAST Delivery Manager Tool:
CAST AIP ≤ 8.3.6 Auto discovery and configuration of Enterprise Java Bean (EJB) is not supported. The CAST AI Admin will need to gather the required information from the application team or inspect the delivered source code to determine the proper configuration of these parameters. Then a decision will need to be made to select the correct version. |
EJB | Auto discovery and configuration of Enterprise Java Bean (EJB) is not supported. The CAST AI Admin will need to gather the required information from the application team or inspect the delivered source code to determine the proper configuration of these parameters. Then a decision will need to be made to select the correct version. |
Note:
- To find out if your application implements web services, simply search for files with the extension .wsdl or.wsd, or the files web-services.xml or webservices.xml in the source file directories. Usually, these files are located in the META-INF directory, but as the source folders do not always match the production folder tree, we recommend searching all the source files.
- If you explicitly select an EJB2 profile (see above) then all configuration regarding EJB 3.x will be automatically deactivated.
Other frameworks
Other frameworks, such as those listed below are always handled "out-of-the box":
- EJB3, 3.1, 3.2
- JSF
- CDI
- Common-logging
- Dom4
- JUnit
- Log4J
- MX4J
- CICS ECI/CTG
Note:
- versions for EJB 3.x, JSF, CDI will follow the Java Version (i.e. the JDK) that is set for the source code.
- if you explicitly select an EJB2 profile (see above) then all configuration regarding EJB 3.x will be automatically deactivated.
When unsupported frameworks (i.e. not supported out-of the box) are part of the delivery, a Custom Environment Profile needs to be created to enable correct processing. To identify unknown frameworks or custom frameworks, there are various methods:
- Find all the XML files and look at the DTD they are referring to. This allows you to find frameworks like Spring, Hibernate... (You can use UltraEdit or a grep command to find the pattern DTD inside XML files in one go). Examples:
Framework | DTD |
---|---|
Hibernate | <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> |
iBATIS | <!DOCTYPE daoConfigPUBLIC "-//iBATIS.com//DTD DAO Configuration 2.0//EN""http://www.ibatis.com/dtd/dao-2.dtd"> |
Spring | <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> |
- Look at the libraries: the names of the libraries can give you an indication. Examples:
Framework | Libraries |
---|---|
Hibernate | hibernate3.jar |
iBATIS | ibatis-common-2.jar |
Spring | spring-1.2.7.jar |
- Look at the different extensions used throughout the entire application. This information will also allow you to verify if the default extension list used by the analyzer to parse client and server source code is complete.Examples:
- .jhtml: for Java HTML (See http://en.wikipedia.org/wiki/JHTML). This is used with Dynamo, a Java-based Web application server
- .jspx: JSPX pages are a special type of JSP page: They are pre-processed by the JSPXServlet, and converted into regular JSP pages (See: http://stackoverflow.com/questions/28235/should-i-be-doing-jspx-instead-of-jsp
- .jspf: for JSP Page Fragment
- .jrxml: for Jasper Report (http://en.wikipedia.org/wiki/JasperReports#JRXML)
Text Replacements
This section enables you to define Regular Expressions (that match character strings in your selected files) that you want to replace with other text:
- Click the Add button to add a new line to the table listing the Text Replacements
- Double click the new line in the table and a hidden section will appear in which you can enter the details you require:
- Enter the Regular Expression in the Regular Expression field.
- Chose the type of Regular Expression in the drop down list:
- Perl (default format) - Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using the same rules as Perl 5.
- Sed - Specifies that when a regular expression match is to be replaced by a new string, that the new string is constructed using the rules used by the Unix Sed utility in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX), Shells and Utilities.
- Tcl - Specifies that when a regular expression match is to be replaced by a new string, the text that matches the regular expression will be replaced by the replacement text.
- Enter the text you want to replace the Regular Expression with, in the Replacing Text field.
- The new line in the table above should now be populated with your changes:
- The arrow buttons enable you to re-order the text replacements. This is important because the order in which the items appear in the list, is the order in which the analyzer will replace the character strings that match the Regular Expressions. Thus, if you have a complicated set of Regular Expressions and replacement texts, difficulties could arise if the order in which they are dealt with is not correct.
- Use Text Replacement with caution. First try to change the source tree to reflect the production environment and then use Text Replacement for other cases.
Production
Data to generate
Add called files to selected files list | Selecting this option will automatically add any files to the list of files selected for analysis that are called by files that you have already selected. |
Add included files to selected files list | Selecting this option will add any files to the analysis list that are included in files that you have already selected. |
Maximal Complexity | This option enables you to manually enter a percentage which will refer to the m complexity of the analysis process.
If the maximum number of function analyses is reached, this will be logged. File analysis too complex. Next function calls will not be followed by a function analysis if the function has already been analyzed When the limit is reached, links to the function will be created correctly, but links from the function will not be created. You should alter the complexity percentage if your analyses are taking a long time to complete with the default setting of 100%. Changing the percentage to a lower figure will reduce the number of function analyses for a given file, thus improving performance. Remember though that doing will cause some links not to be created. |
Process Settings
Inference Engine
Use Inference Engine | Use this option to activate the Inference Engine during the analysis. Run time type information will be computed in order to simulate program behaviour during execution of the analyzer and thus identify additional links that would not otherwise be "discovered" using standard analysis techniques. This technology detects a reference to an object wherever its name is mentioned, regardless of the context in which this reference occurs. Please note that disabling the Inference Engine:
|
String Concatenation | When the Inference Engine is active, this value limits the number of strings that will be found during the search of each object value. Note that limiting the number of strings can lead to incomplete results, however, performance is improved. |
Procedure Call Depth | When the Inference Engine is active, this value limits the number of intermediate values that the Inference Engine must resolve in order to obtain the value of the object that is being searched for. Note that limiting the number of intermediate values can lead to incomplete results, however, performance is improved. The lowest value you can enter is 1. |
Local Procedure Complexity | When the Inference Engine is active, this value limits searches of large methods that have a high Cyclomatic Complexity level. |
Dataflow
Procedure Call Depth | When the User Input Security feature is active, this value limits the number of intermediate values that the User Input Security Engine must resolve in order to obtain the value of the object that is being searched for. Note that limiting the number of intermediate values can lead to incomplete results, however, performance is improved. The lowest value you can enter is 1. |
Execution
Number of Instances | This option allows you to limit the number of objects held in memory before they are committed to disk during the save process of an analysis. Please contact CAST Support before modifying this option. |
Dynamic Links
See the CAST Management Studio help for more information about this global option.
Platform Setting
CAST Script Library Directory | As part of CAST's framework XML Configuration file and Java Annotation extraction process via XQuery and Zorba, you are free to design your own XQuery files that will output data to a .castscript file in a syntax that can be understood by the analyzer. However, if you want to develop your own functions that will be outputted into the .castscript file, then you must specify these functions and their parent files in a specific location. You can use the Custom CAST Script Root Library path option (see above) to define this location. These libraries will then be used when they are invoked in the .castscript file during the analysis. Please see Manage XML configuration files for more information about this. |
CAST Tags Extension Folder | Use this option to designate a local folder that will contain your .tagsextension files. An absolute path to the folder is required. Please see Manage JSP custom tags for more information. |
Choose Deployment Folder | This option can be used when an analysis fails if a path to .JAR file (or its subfolders) that is unpacked to disk during the analysis exceeds the maximum Windows file path length (260 characters). CAST recommends entering a folder located near the root of the drive (for example D:\CAST) or a folder with as short a path as possible. |
XQuery Command | This option enables you to use a custom parsing method for parsing your XML Configuration files (for example an XSLT transformation) with a parser of your choice (for example XQuilla). If you intend to use this option you need to enter a command line as specified in the following example for XQuilla (see http://xqilla.sourceforge.net/CommandLine). C:\Program Files\XQilla\xquilla.exe $(CASTCommonDir)\EnvProf\iBatis\iBatis.xquery -i $(Input) -o $(Output) -v root $(AppRoot)
Note that these macros are all case-sensitive. Please see also: JEE - Environment Profiles |
Dependency settings
If the CAST Delivery Manager Tool did not detect any inter-Analysis Unit dependencies (i.e. Discovered dependencies) then it will create a "global" default dependency between JEE and JEE. CAST highly recommends that this default rule is removed if the deployed package contains more than three Analysis Units. In addition, CAST highly recommends that you avoid creating a custom JEE > JEE rule if the deployed package contains more than three Analysis Units.
This global default rule can cause the creation of inaccurate links between objects which has a knock on effect on Quality Rule results and on Quality Rule results and on Transaction flow.
Manual configuration
When the automated configuration fails or it is not possible (i.e. project build file format not supported), the CAST AI Admin must resort to an in-depth inspection of the source code to build the Analysis Unit and configure them manually. For typical JEE applications this would require the identification of all application components including:
- A presentation layer
- A persistent/session layer
- A business layer
- (Optionally) a web service layer
- (Optionally) other components
Advanced J2EE Configuration
Please see the following pages for more information about advanced J2EE analysis configuration:
- Customize the cast-tag.extensions.xml
- Manage annotations
- Manage XML configuration files
- Manage properties files
- Manage JSP Tag Files
- Manage JSP custom tags
The discovering of frameworks, other than Hibernate, Struts or Spring, supported out-of the-box by CAST AIP, is based on pattern matching on the .jar files delivered. Configuration for those is a simple Yes (if a .jar file matching is found) and No otherwise. When unsupported frameworks (i.e. not supported out-of the box) are part of the delivery, a Custom Environment Profile needs to be created to enable correct processing.