|
|
< Day Day Up > |
|
In this chapter we described how you, as an application programmer, can work with the inventory contained in the WSAA database. We described some of the typical
How to examine the effects of a change
How to extract code for reuse
How to use the Connector Builder Assistant
|
|
< Day Day Up > |
|
|
|
< Day Day Up > |
|
|
|
< Day Day Up > |
|
|
|
< Day Day Up > |
|
This appendix describes the distributed environment support in WebSphere Studio Asset Analyzer (WSAA) Version 3 Release 1.
The following topics are discussed:
The inventory collection process, including:
Repositories where assets can be scanned
Types of assets that are
Metadata and dependencies among the assets in the database
Ways for exploring the inventory
Key features for mining J2EE applications
| Note |
The screen captures depicted in this chapter are from early WSAA V3.1 code and may be different from what you see when the product is shipped. |
|
|
< Day Day Up > |
|
|
|
< Day Day Up > |
|
WSAA can perform static analysis on distributed applications and the run-time environments in which they
The results of the analysis, including the dependency graph, are stored in the same DB2 database as the MVS assets. You, as an end-
When you view the structure of your application graphically and see the dependencies among the various artifacts, you can easily determine the impact of a given change.
|
|
< Day Day Up > |
|
|
|
< Day Day Up > |
|
Having read the previous portions of this redbook, you will note an immediate difference in some of the terminology associated with scanning distributed repositories. Figure A-1 illustrates the basics of the distributed architecture.
Figure A-1:
Distributed architecture
The inventory process consists of a set of scanners, a set of analyzers, and a OS/390 DB2 database. WSAA takes an inventory of resources (such as, .java or .html files), analyzes them, and then stores information about them in the DB2 database. During the inventory process for distributed assets,
We begin the process with scanning the resources.
A scanner is a module in WSAA that can access an enterprise server where code assets are
Currently, WSAA provides scanners for:
File systems
Configuration management systems (Rational ClearCase, PVCS, CVS,
CMVC, and a WebDAV interface for additional CMs)
WebSphere Application Server 4.0 Advanced Edition installations
The scanner discovers, identifies, and
When the scanner encounters an asset, it checks if an analyzer is registered for that type of resource.
| Note |
An analyzer is a module in WSAA that can extract semantic and textual information from assets identified by the scanners. |
WSAA ships with over 40 analyzers, including Java, HTML, JSP, EAR files,
WAR files, EJB JAR files, JSP tag libraries, J2EE Client files, XML, bytecode, C/C++, and ASCII text.
The semantic information extracted by an analyzer consists of attributes that are unique to the specific type of asset (and, coincidentally, something that you might want to query). For example:
The semantic information for Java assets the semantic information includes (but is not limited to) the following:
Class
Superclass
Interface
Methods
Fields
The textual information (or free-form text) consists of words for which a
If an analyzer is found for the resource type and the resource has not already been analyzed and its information stored in the database (or it has changed since the last scan), then the resource is
| Note |
For each analyzed resource, both the semantic and textual information are stored in a relational database on the host. |
After all assets have been scanned and analyzed, a postprocessor is activated.
The postprocessor infers relationships among assets and links them together.
WSAA distributed analyzers take an inventory of the contents and relationships of code assets in enterprise repositories. WSAA provides over 40 analyzers for the distributed environment. These analyzers can take an inventory of the content and relationships of the following types of files:
Text files (in ASCII format)
Java/J2EE files (including archive files)
Other languages, for example: C and C++:
Each of these languages is associated with a set of semantic characteristics and/or attributes. The corresponding analyzers detect these attributes in the scanned files, thus facilitating semantic search over these files (by giving values for selected attributes).
The majority of analyzers support the Java/J2EE domain. Many of the entities
HTML and XML files
JSP files and JSP tag libraries
Java sources
Java class files (bytecode)
J2EE archive files:
EAR
WAR
EJBJAR
J2EE Client
Besides entities that directly refer to files, analyzers can take an inventory of the following types of entities:
Physical entities, like sites and containers
Servlets, EJBs (Session or Entity), Java packages, methods, and fields
WebSphere Application Server 4.0 AE runtime entities, such as:
Node
Application Server
ServerGroup
Clone
VirtualHost
JDBC Driver
DataSource
JMS Provider
JMS Connection Factory
JMS Destination
Mail Session
URL Provider
J2C Resource Adaptors
J2C Connection Factory
Deployed J2EE applications
Deployed Web Applications
Deployed EJB JARs and EJBs
Entities that are explicitly defined by the user
One of the main features of the analyzers lies in the comprehensive set of relationships between Java/J2EE entities. Distributed analyzers can detect the following three types of links:
Containment links, such as between archive files and the individual files, or between a Java class and its methods and fields.
Hierarchy links:
These are defined separately for Java sources and for Java bytecodes.
References:
At the level of Java sources, the analyzers detect class-to-class referencing and hierarchy information.
At the level of Java bytecodes, the analyzers extend this level of class-to-class referencing and provide a higher granularity through method-to-method, method-to-field and method-to-class referencing.
J2EE referencing; the analyzers discover a rich set of J2EE references between HTML/XML files, JSPs, Servlets and EJBs.
Connections to middleware and legacy such as via JMS or JCA.
In WSAA V3.1, WSAA can scan a WebSphere Application Server 4.0 Advanced Edition runtime environment. It takes an inventory of the WebSphere Application Server resources and analyzes them. The resulting information is a topology of the WebSphere Application Server environment that includes the cell and its nodes, resources (such as JDBCDriver), and the EARs installed in it.
The WebSphere Application Server 4.0 AE scanner calculates which EJBJars and WARs are installed on which clone/application server and which clone is installed on which node. Each EAR that is installed in the cell is analyzed to its inner resources (for example, War and EJBJar). The WebSphere Application Server 4.0 AE scanner runs the Java pattern detector and the J2EE inference engine (see Appendix A, “Key features” on page 179) for more information) on a WebSphere Application Server cell.
At the end of this process, you can explore and understand the whole topology and application structure.
One of the main features of the tool lies in the comprehensive set of relationships between Java/J2EE entities. We distinguish between three types of links:
Containment links, for example, between archive files and the individual files, or between a Java class and its methods and fields
Hierarchy links:
These are defined separately for Java sources and for Java bytecodes.
References:
At the level of Java sources, we provide class to class referencing and hierarchy information.
At the level of Java bytecodes, the tool extends this level of class-to-class referencing, and provides a lower granularity through method-to-method, method-to-field and method-to-class referencing.
J2EE referencing
The tool discovers a rich set of J2EE references between HTML/XML files, JSPs, Servlets and EJBs.
Connectors to middleware and legacy code
|
|
< Day Day Up > |
|