Sun Java Solaris Communities My SDN Account Join SDN
 
Compatibility & Java Verification

Java[tm] Application Verification Kit (AVK) for the Enterprise 5.0 User's Guide

 
Compatibility
White Papers
 
Forums
Bug Database
 
New to Java Center
Tutorials & Code Camps
Training
Certification
J2EE Learning Path
Quizzes
 
 
 

This User's Guide describes Java Application Verification Kit (AVK) for the Enterprise and the technical recommendations behind it. This Guide covers the following topics:

Introduction

This Guide describes what Java AVK for the Enterprise does and how to use the tools provided as part of the kit. It also describes the features of Sun Java System Application Server Platform Edition 9 ("the Application Server") that support the kit.

Java AVK for the Enterprise helps developers create applications that are both correct and portable.

Why Portability Matters

Portability is one of the most attractive aspects of the Java programming language. Applications coded in the Java programming language can run unchanged in many different types of stand-alone or client operating environments. The Java Platform, Enterprise Edition (Java EE) extends the portability benefits of the Java language to the enterprise, providing a single set of specifications for application servers and an extensive set of compatibility tests. It allows you to run applications across different types of Java EE servers. Given the large investment most businesses have in client-server applications, the Java EE platform can save companies a lot of development time and money. With the portability features of the Java EE platform, there is little or no need to rewrite code for different servers.

Whatever product you use to develop your enterprise applications, you need to ensure that your code will be easy to migrate from one application server to another. To do this, you need to make sure that your code does not use vendor-specific extensions to the Java EE platform. Java AVK for the Enterprise is designed to help developers avoid such situations.

Java AVK for the Enterprise is designed to identify enterprise applications developed with Java EE technology that are intended to be portable across different implementations of the Java EE platform.

Creating Portable Applications: Using Java BluePrints

The Java BluePrints program provides an extensive set of guidelines, design patterns, and sample applications that serve as models for developers writing portable applications. In particular, the Java Adventure Builder Reference application showcases how to design interoperable and portable web services on the Java EE 5 platform, and the Java Pet Store Sample Application shows how to use the capabilities of the Java EE platform to develop robust, scalable, portable, and maintainable enterprise applications. We recommend that anyone implementing a Java EE application study these applications.

See http://java.sun.com/blueprints/enterprise for information about installing the sample applications and about developing portable enterprise applications.

What Java AVK for the Enterprise Does

Java AVK for the Enterprise is a set of tools intended to help developers test their applications for correct use of Java EE APIs and portability across Java EE compatible application servers.

The Java AVK for the Enterprise tools determine that an application suite follows the Java EE platform specification (including all the specifications for the technologies that are part of the platform) and that it runs on the Application Server. They do this in two stages:

  • Static verification determines that an application suite's classes, Java EE annotations, and any deployment descriptors follow the specification and that the application suite contains no methods that are proprietary to a particular vendor.
  • Dynamic verification profiles an application, determining the proportion of enterprise bean component methods, web services methods, and web components that are invoked by running the application.

This section covers the following topics:

The Application Server

Sun Java System Application Server Platform Edition 9 implements the Java EE 5 specification to deliver one of the best application runtimes for next-generation enterprise applications and web services. Application Server 9 implements the Java EE standards technologies listed at http://java.sun.com/javaee/technologies/index.jsp, including the following new or updated technologies:

  • Enterprise JavaBeans (EJB) 3.0
  • JAXB 2.0
  • Java Persistence
  • JavaServer Faces (JSF) 1.2
  • JavaServer Pages (JSP) Standard Tag Library (JSTL) 1.2
  • Streaming API for XML (StAX)
  • Web Services Metadata
  • Java API for XML based Web Services 2.0 (JAX-WS 2.0)

The Application Server includes various tools to help developers prototype Java EE applications and learn about the Java EE platform and technologies.

Java AVK for the Enterprise requires an application to use the Application Server to confirm that it runs on a complete and correct implementation of the Java EE 5 platform.

Terms Used

Here are a few terms that apply to Java AVK for the Enterprise.

Application suite
One or more application EAR files and other deployment units that make up the application to be verified. A deployment unit may be either a standalone module or an EAR file containing one or more modules. The Application Server requires that each deployment unit be deployed under a unique name. An application suite is typically bundled in one or more EAR, JAR, and/or WAR files, which must be deployed together for the application to work. For example, the Java Pet Store Sample Application is an application suite that consists of four EAR files.

Web components
The physical implementations of the servlets, JSP components, and JSF components in an application suite (not their URL mappings).

Introspection
The process of discovering all the Java EE components (EJB components, web components, application clients) contained within an application suite.

Instrumentation
The process of tracking EJB component methods and web components invoked while running an application suite on the Application Server.

Scope

A Java EE application suite is composed of one or more deployment units, and each unit can contain one or more deployment descriptors. If the deployment unit is an EAR file, its deployment descriptor lists its components as modules; each component may also have a deployment descriptor. The deployment unit can also be a standalone module. There are four types of modules:

  • Java EE application client JAR file
  • EJB JAR file
  • Web Component WAR file
  • Resource Adapter RAR file

Note: A Java Persistence API entity is not a module; instead, it is packaged within a module, which can be either an EJB JAR file, a web WAR file, or a client JAR file.

Java AVK for the Enterprise performs dynamic verification on only a subset of the Java EE components:

  • A Java EE application suite delivered as one or more EAR files
  • A Java EE module of either of the following types: EJB JAR file, web component WAR file

At this release, Java AVK for the Enterprise does not perform dynamic verification on resource adapters (RAR files).

Coverage

Good programming practice can lead to specific code paths that are difficult or inappropriate to test. These include:

  • White-box test hooks
  • Debug methods
  • Certain exception paths, where the triggering error is hard to generate

To provide flexibility to permit these reasonable cases, Java AVK for the Enterprise sets a coverage guideline of 80% EJB method execution. The reporting tool presents coverage status based on this guideline. Different organizations may choose different internal guidelines to meet their own processes and requirements. The reporting tool provides detailed results information that will be useful.

The following criteria are tracked or required by the Java AVK for the Enterprise tools:

  • Criteria for Verifying EJB Components
    • Pass all the static verification tests (warnings should be examined)
    • Successfully exercise the application suite in the Application Server and invoke at least 80% of the EJB and business logic methods (with no system exceptions)
  • Criteria for Verifying Web Components
    • Pass all the static verification tests (warnings should be examined)
    • Invoke all servlets and JSP pages with no compilation or runtime errors
    • Name all the JSP files with the .jsp extension or declare those JSP pages in the deployment descriptors
    • Provide a servlet mapping for all servlets in the web.xml file

What Java AVK for the Enterprise Includes

To install Java AVK for the Enterprise 5, refer to the Installation Instructions. Java AVK for the Enterprise is installed in the javke5 directory at a location you specify. This document refers to this location as <JAVKE_HOME>.

This section describes what you get when you install Java AVK for the Enterprise. It covers the following topics:

The installation process for Java AVK for the Enterprise installs the Application Server at <JAVKE_HOME>/appserver, unless you specify a previously installed version of the Application Server. This document refers to the location of the Application Server as <AS_HOME>.

Application Server Directory Structure

Table 1 describes the most important directories within <AS_HOME>.

Table 1. Application Server Directories
Directory Contents
bin Application Server commands
config
domains/domain1/config
Configuration files
docs Release documentation. API documentation for this release is online at http://java.sun.com/javaee/5/docs/api/index.html.
lib
imq/lib
Libraries, schema files, and Document Type Definition (DTD) files
domains/domain1/logs Server logs
domains/domain1/applications Deployed applications
domains/domain1/autodeploy Applications and modules that the server deploys automatically

Application Server Tools

The Application Server comes with a set of tools for managing the server and for packaging, deploying, and running Java EE applications. Many of these tools are listed in Table 2. Most of the commands that invoke these tools are in the <AS_HOME>/bin directory. For more information, see the files <AS_HOME>/docs/about.html and <AS_HOME>/docs/QuickStart.html and the Sun Java System Application Server Platform Edition 9 Administration Guide.

Table 2. Application Server Tool Commands
Command Description
asadmin Runs the application server administration utility, used to start and stop the Application Server and its database and to manage users, resources, and applications. See Starting the Application Server for details on starting the server.

Type asadmin help to get a list of the many asadmin subcommands.

The asadmin command has a corresponding tool, the Admin Console, which allows you to perform administrative tasks using a Graphical User Interface. To use the Admin Console, open the URL http://localhost:4848/ in a browser after starting the server.

ant Runs the Ant tool developed by the Apache Software Foundation (see http://ant.apache.org/). The Ant tool is provided with the Application Server. You will use Ant tasks to perform static verification.
appclient Runs a Java EE application client by launching the application client container and invoking the client application packaged in the application client JAR file.
xjc A command-line tool to transform, or bind, a source XML schema to a set of JAXB content classes in the Java programming language.
schemagen A command-line tool to create a schema file for each namespace referenced in your Java classes.
wsimport A command-line tool to generate JAX-WS portable artifacts for a given WSDL file. After generation, these artifacts can be packaged in a WAR file with the WSDL and schema documents along with the endpoint implementation and then deployed.
wsgen A command-line tool to read a web service endpoint class and generate all the required JAX-WS portable artifacts for web service deployment and invocation.
wscompile Generates stubs, ties, serializers, and WSDL files used in JAX-RPC clients and services.
wsdeploy Generates implementation-specific, ready-to-deploy WAR files for web service applications that use JAX-RPC.

Java AVK for the Enterprise Tools

You will use the following tools to verify your application suite:

  • The Application Server ant tool, which you use to run the static archive tests and to translate deployment descriptors
  • The Java AVK for the Enterprise report command (<JAVKE_HOME>/bin/report)

Verifying an Application Suite

This section describes the steps to verify an application suite using Java AVK for the Enterprise.

Here is an overview of these steps:

  1. Add the Java AVK for the Enterprise Ant tasks to the build.xml file(s) for your application suite.
  2. Perform static verification tests on each module.
  3. Start the Application Server if it is not already running.
  4. (Optional) Create resources for the application suite, if necessary.
  5. (Optional) Specify runtime information for each module, if necessary.
  6. Deploy the application suite on the Application Server.
  7. Start a dynamic verification session.
  8. Execute the application suite and use its functionality in a way that exercises at least 80% of its EJB methods and accesses 100% of its JSP pages and servlets.
  9. Run the reporting tool to generate one or more snapshot reports.
  10. Interpret the results.
  11. End the dynamic verification session.
  12. (Optional) Stop the Application Server.

The following sections describe these steps in detail.

Adding the Ant Tasks to your Build File

You will find a sample build.xml file containing the Java AVK for the Enterprise Ant tasks in the following directory:

<JAVKE_HOME>/samples

This file also contains some sample Ant targets that you can run in order to become familiar with the tasks before you adapt them for your own code. The code for running the targets is also in the samples directory.

You can either add the necessary code to the build.xml file for your application, or you can create a separate targets file (javke_targets.xml, for example) and include it in the application build.xml file:

  <import file="./javke_targets.xml" />

The tasks you can use are defined as follows in the sample build.xml file:

<taskdef name="ArchiveTest"
classname="org.apache.tools.ant.taskdefs.optional.sun.verification.StaticArchive
Test" 
classpath="${cpath}" />

<taskdef name="TranslateRuntimeDD" 
classname="org.apache.tools.ant.taskdefs.optional.sun.verification.TranslateRuntimeDD" 
classpath="${cpath}"/>

You must define the classpath to include the following:

<property name="cpath" value="${avk.home}/lib/javke-ant.jar"/>

You must also define a property named avk.home whose value is the directory where Java AVK for the Enterprise is installed. The samples directory has a build.properties file that defines this property; you can add the property to your own build.properties file or define the property explicitly.

The file in the samples directory contains sample targets that use the tasks:

  • The static-archive-test target uses the ArchiveTest task to validate an archive file against the Java EE specifications.
  • The translate-dd target uses the TranslateRuntimeDD task to convert runtime deployment descriptors from other application servers into Application Server deployment descriptors.

You do not have to have the Application Server running in order to use these tasks.

The following sections provide details about using the tasks.

Performing Static Verification Tests

The tasks that perform the static verification tests do the following:

Static Archive Testing

Use the ArchiveTest task to ensure that your application modules comply with the Java EE specifications. This task identifies and reports problems with the module file components' method signatures and other static inconsistencies. It looks at all components of the file and reports any inconsistencies with the API and deployment descriptors defined in the Java EE specifications. It also validates the packaging and structure of the modules. For example, the following target in the sample build.xml file scans the WAR file bookstore.war:

<target name="static-archive-test" description="static archive tests for 
application containing web components, reporting on all tests">
  <ArchiveTest appname="${avk.home}/samples/bookstore/bookstore.war"
               reportingOpts="a" />
</target>

The appName attribute is required. The value can be the path name of an EAR, JAR, WAR, or RAR file. If you use the task without defining any other attributes, it scans all modules in the archive and reports all failures and warnings. At the end, it provides the path names where you can find the results:

>ant static-archive-test
Buildfile: build.xml

static-archive-test:
     [exec]  INFO: Verifying: [ bookstore ]
     [exec]  INFO: Compiling JSPs in [ bookstore ]
     [exec]  INFO: 
     [exec] # of Failures : 0
     [exec] # of Warnings : 0
     [exec] # of Errors   : 0
     [exec]  INFO: Look in file "/opt/sun/javke5/reporttool/static/bookstore.war.txt" for detailed results.
     [echo] See "/opt/sun/javke5/reporttool/static/verifierSummary.html" for results.

BUILD SUCCESSFUL

You can use the attributes listed in Table 3 to change the reports.

Table 3. Ant Task Attributes for Static Archive Testing
Attribute Description
reportingOpts Changes the level of reporting. Specify any of the following values:
w or "" Report only warning and failure results (default)
f Report only failure results
a Report all results, including passed tests and tests that are not applicable
partitionOpts Limit the verification process to one or more component types. You can specify any of the following, using a comma as separator:
ejb Enterprise bean module tests
web Web module tests
webservices Web services (both EJB and web) tests
connector Connector tests
app Application module tests
appclient Application client tests
webservicesclient Web services client tests

For example, you could specify the following to generate reports showing only failures, on only the application client and enterprise bean components of an EAR file:

<target name="archive-test" description="static archive tests">
  <ArchiveTest appname="./MyApp.ear" 
               reportingOpts="f" 
               partitionOpts="appclient,ejb" />
</target>

The summary page from the static archive tests shows the failures, warnings, passes and nonapplicable test results for each of the modules of the Java EE platform contained in the application. Each result contains a link to detailed information, including a description of the test that was run, the assertion in the specification being tested, and the name of the test. In addition, the summary includes a section that lists any errors the static archive tests encountered.

If your code contains proprietary APIs, you will need to provide portable, functionally equivalent alternative code that can be executed instead of the proprietary APIs. You will need to rebuild your application using the alternative code in order to verify it.

Note: For a few static archive tests, execution of the tests stops after the first failed test. Once you have corrected a failure, run the static archive test task again in order to find and correct further failures.

Translating Runtime Deployment Descriptors

Every application server has its own runtime deployment descriptors that specify implementation-specific aspects of deployment. An application that previously ran on another Java EE server must convert its runtime deployment descriptors to work with the Application Server. This process does not replace your original module or application; instead, it creates a new one with new deployment descriptors.

Use the TranslateRuntimeDD task to generate the deployment descriptors. For example, the following target in the sample build.xml file converts the deployment descriptors for the EAR file HelloWorld.ear from WebLogic 6 to the Application Server:

<target name="translate-dd" description="translate runtime DD for 
deployment">
  <TranslateRuntimeDD 
archivename="${avk.home}/samples/weblogic_6_x/HelloWorld/HelloWorld.ear"
                      srcServer="weblogic6" />

Both the archiveName and the srcServer attributes are required. The srcServer attribute specifies the server that was used to generate the application. It can have any one of the following values:

sunone65 Sun ONE Application Server 6.x
sjsappserver7 Sun Java System Application Server 7.x
weblogic5 BEA WebLogic Server 5.1
weblogic6 BEA WebLogic Server 6.0
weblogic61 BEA WebLogic Server 6.1
weblogic81 BEA WebLogic Server 8.1
websphere4 IBM WebSphere Application Server 4.x
websphere5 IBM WebSphere Application Server 5.x
jboss3 JBoss 3.x
j2eesdk13 Sun J2EE 1.3.x SDK
j2eesdk14 Early-access and Beta versions of Sun J2EE 1.4 SDK
tomcat Apache Tomcat 4.1

If you run the translate-dd target, it generates output similar to the following:

>ant translate-dd
Buildfile: build.xml

translate-dd:

     [java] Extracting archives :-
     [java] -------------------


     [java] Extracting: HelloWorld.ear
     [java] xx

     [java] Extracting: helloworld.war
     [java] x

     [java] Extracting: HelloWorldEJB.jar
     [java] x

     [java] Clean up...

     [java] Pre-processing input :-
     [java] -------------------
     [java] ||||||||||||||



     [java] Migration Status :-
     [java] ----------------

     [java] |||||||||||||||||||



     [java] ---------------------- Output SUMMARY ------------------------

     [java] Java:

     [java] Total files processed :             -               0
     [java] Succeded :                  -               0
     [java] Failed :                    -               0
     [java] Partially Processed :               -               0
     [java] Unchanged :                 -               0

     [java] JSP:

     [java] Total files processed :             -               1
     [java] Succeded :                  -               0
     [java] Failed :                    -               0
     [java] Partially Processed :               -               0
     [java] Unchanged :                 -               1

     [java] XML:

     [java] Total files processed :             -               4
     [java] Succeded :                  -               1
     [java] Failed :                    -               0
     [java] Partially Processed :               -               0
     [java] Unchanged :                 -               3

     [java] HTML:

     [java] Total files processed :             -               1
     [java] Succeded :                  -               0
     [java] Failed :                    -               0
     [java] Partially Processed :               -               0
     [java] Unchanged :                 -               1

     [java] Configuration:

     [java] Total files processed :             -               0
     [java] Succeded :                  -               0
     [java] Failed :                    -               0
     [java] Partially Processed :               -               0
     [java] Unchanged :                 -               0


     [java] ---------------------  End of SUMMARY ------------------------



     [echo] See "C:\Sun\javke5\reporttool\translate\translationSummary.html" for results.
     [echo] We attempted to create an ear file even if minor errors occurred. The application 
with translated deployment descriptors is in a new .ear file located in 
C:\Sun\javke5\reporttool\translate\Input_Archives\asmtbuild

BUILD SUCCESSFUL

Do not use the new EAR file created by the task. Instead, open the translationSummary.html file in a web browser. This file shows the locations of the new runtime descriptors, which begin with the prefix sun-. Add these descriptors to your original application.

Note: The task also generates new standard descriptors (application.xml, ejb-jar.xml, web.xml); do not add these to your application.

Starting the Application Server

After you perform static archive testing, start the Application Server.

To start the server's default domain, use the following command:

UNIX: <AS_HOME>/bin/asadmin start-domain
Windows: <AS_HOME>\bin\asadmin start-domain
or
Programs->Sun Microsystems->Application Server PE->Start Default Server

Use the --verbose option to display the server log output:

asadmin start-domain --verbose

For database access, you can use the Java DB database that is part of the Application Server. It has a preconfigured Java Database Connectivity (JDBC) resource and connection pool. See the Sun Java System Application Server Platform Edition 9 Developer's Guide for details on using the JDBC API for database access.

If your application uses a database, start the database now. Use the following command:

asadmin start-database

Creating Resources for the Application Suite

If your application uses server resources, you create them administratively. You can use the Admin Console or the asadmin command to create JDBC resources, Java Message Service (JMS) resources and destinations, connector resources, users and groups for security realms, and the like.

To use the Admin Console, open the following URL in a browser:

http://localhost:4848/
Enter your administrative username and password (created when you installed the Application Server).

You can use the Admin Console help system, the asadmin help command, and the Java EE 5 Tutorial to learn more.

Specifying Runtime Information

Before you deploy your application, you should verify that any runtime information required by the Application Server is correct. Much of this information consists of the Java Naming and Directory Interface (JNDI) API names of any resources used by the application.

A Java EE 5 application commonly uses source file annotations to specify resource injection for components. An application from a previous version of Java EE uses runtime deployment descriptors.

In addition, you may need to create database tables for your persistence units or entity beans. For information on doing this, and for details on using the Java Persistence API in the Application Server, see the Sun Java System Application Server Platform Edition 9 Developer's Guide. Some examples in the Java EE 5 Tutorial also show how to create database tables.

Deploying the Application Suite

Next, deploy the application suite on the Application Server. Use the asadmin deploy command or the Admin Console.

If you are new to the Application Server, you can learn how to create, package, and deploy an application by following the instructions in the Getting Started chapter of the Java EE 5 Tutorial.

Starting a Dynamic Verification Session

To start a dynamic verification session, use the following command:

UNIX: <JAVKE_HOME>/bin/startverification [appname1, appname2, ...]
Windows: <JAVKE_HOME>\bin\startverification [appname1, appname2, ...]

This command starts a verification session for the specified applications. First it creates a file named avk.properties in your home directory, if the file does not exist already. In addition, it performs introspection on the deployed application suite and generates the list of Java EE public APIs (including EJB methods and web components). If you do not specify any arguments, all deployed applications except those that are part of the Application Server will be verified.

Dynamic verification uses the call-flow tracing capability of the Application Server.

After you run the startverification command for the first time, perform these steps:

  1. Open the file $HOME/avk.properties in a text editor.
  2. Add a property named BROWSER and specify the path name of your preferred web browser. For example:
    BROWSER=C:/Program Files/Mozilla Firefox/firefox.exe
    
  3. Save and close the file.

Executing the Application Suite

After you deploy the application suite, you must run it so as to invoke as much of its functionality as possible. In this step, you either manually or automatically invoke the JSP pages, servlets, and public EJB methods.

Using the report Command

As you execute the application suite, you can use the Java AVK for the Enterprise report command to generate reports that show how much of the application has been exercised.

The report command writes the data collected during the execution of the application suite to disk.

Use the report command as follows:

UNIX: <JAVKE_HOME>/bin/report
Windows: <JAVKE_HOME>\bin\report

The command generates HTML pages describing all relevant information found during the testing process. The HTML pages are generated in the following directory:

<AS_HOME>/domains/domain1/logs/reporttool/<timestamp_dir>/results

The name of the <timestamp_dir> indicates the time at which the startverification command was run (for example, 2006-05-02-13-22).

The top-level page of the report is named suiteSummary.html. The report command opens the page in the browser specified in your avk.properties file. If you do not specify the BROWSER property, it looks for the Firefox browser in a default location that is probably incorrect.

The results generated by the command are described in Interpreting the Results.

Interpreting the Results

The Java AVK for the Enterprise reporting tool compares introspection and instrumentation results and produces reports from that comparison. From the comparison of the results, the reporting tool generates a set of HTML files and displays the URL of the top-level summary report.

The reporting tool provides a status of Pass or Fail when summarizing the results. These numbers are based on the criteria mentioned in Coverage.

The summary page of the generated reports contains pointers to the results of the static archive tests, a summary of the EJB method coverage for each module, and a summary of the web component coverage.

Note: At this release, the link to the results of the static archive tests is always incorrect, reporting that static archive tests were not run.

The two kinds of coverage reports are described in the following sections:

EJB Method Coverage Reports

EJB method coverage is reported by EAR file or module. The guideline is that at least 80% of the EJB methods within each module must be covered.

The EJB Method Coverage page expands the EAR file or module contents and lists the JAR files and beans in each file, with the coverage. The Methods Called column shows the number of methods called versus the total number of methods for each bean. Clicking on the bean name brings up the EJB Method Coverage Detail page, which displays the status of each method within that bean. The first table contains the methods that were not called successfully. Either those methods were not called at all, or an exception was thrown during the call. The next table shows all methods that were called successfully. This information can be used to determine which methods need to be invoked to increase the coverage to meet the guidelines if the guidelines were not met.

Web Component Coverage Reports

Web component coverage is reported by context. The guideline is that 100% of the JSP pages and servlets must be called with no exceptions generated.

The table on the summary page reports the percentage of the web components that were called. Clicking on either Passed or Failed brings up the Web Component Coverage page, which lists each component by the context root, whether or not it was called, and if so, whether there was an exception. This information can be used to determine which web components must be called to increase the coverage to meet the guidelines.

The coverage reports do not list JSP pages that are included by other JSP pages using an include directive. Instead, the reports list only the JSP pages that contain the include directives for these pages. JSP pages included with an include action, however, are listed in the coverage reports.

Ending the Dynamic Verification Session

When you have finished generating reports, end the dynamic verification session. Use the following command:

UNIX: <JAVKE_HOME>/bin/stopverification
Windows: <JAVKE_HOME>\bin\stopverification

This command produces a final coverage report and then turns off the the Application Server settings that enable dynamic verification.

Stopping the Application Server

You can leave the Application Server running. If you want to stop the server, use the following command:

UNIX: <AS_HOME>/bin/asadmin stop-domain
Windows: <AS_HOME>\bin\asadmin stop-domain
or
Programs->Sun Microsystems->Application Server PE->Stop Default Server

Stopping the Application Server also ends the dynamic verification session, if you did not previously end the session.

How the Tools Produce Results

This section describes how the tools collect dynamic data and generate metrics using two primary mechanisms: introspection and instrumentation. It covers the following topics:

Introspection

The introspection process generates the list of required EJB methods to be invoked. The list contains all public methods in the bean's remote and local interfaces, the onMessage method for message-driven beans, and all create methods for session and entity beans. It excludes the methods that are on the Exclude List (the file <JAVKE_HOME>/config/appVerification/ExcludeList.xml). A list of excluded methods is provided as input to the introspection process, and in addition, other methods are excluded when the tool is dynamically generating the final required list. For example, all CMP and CMR fields supporting set and get methods are excluded from the final list, and all remove methods, finder methods, and the create methods for message-driven beans are excluded as well.

The list of required web components contains all servlets and JSP pages that have entries in the web.xml file and all files ending with .jsp.

This combination of the EJB and web component lists is the master list that determines which EJB methods and web components must be called. This information is used in calculating the percentage numbers.

Instrumentation

Java AVK for the Enterprise logs all invocations during execution. For EJB components, that means all invocations of public business methods, of the ejbCreate method for stateful session beans and entity beans, and of the ejbRemove method. In addition, Java AVK for the Enterprise records any system exceptions that were thrown while a method was executed. Each web component that is invoked is also recorded. The combination of these two lists is the total list of invoked entities. This total list is used when comparing against what was generated from introspection.

Additional Notes

Each time the report command runs, it compares the instrumentation and introspection results and produces the results. Snapshots from each run will be merged with existing reports.

Obtaining Support for Java AVK for the Enterprise

Technical support from Sun is available. For details, go to the Java AVK for the Enterprise web page:

http://java.sun.com/j2ee/verified/avk_enterprise.html

Further Information

For more information about the Java programming language, the Java EE platform, and portability, refer to the following:


Related Links