Index Changes

Application Verifier

This project would aid the system administrator in verifying if all the configurations needed by an application can be resolved during deployment.

Application Verification

The application verifier would verify the following:

i)All the components needed by the application are installed(Note: they will be started automatically on deployment).

ii)Configuration objects referred to by the application can be resolved at runtime.

iii)Environment variables referred to by the application can be resolved at runtime.

Use Case Name
AppVerify0001
Preconditions & Assumptions
Some of the components needed by the SA are not installed.
User Action
User invokes asant verify-jbi-service-assembly command
System Action
The common client constructs the list of components needed by the application. It checks with the runtime if all the components in the list are installed in the selected target. If any/some of the components is/are not installed verifier generates an error report.
Post Conditions
Following this action, nothing in the runtime is changed.

Use Case Name
AppVerify0002
Preconditions & Assumptions
Necessary components are installed and some of the endpoints are mapped to a config object in jbi.xml.
User Action
User invokes asant verify-jbi-service-assembly command
System Action
Verifier constructs the list of config objects referred to in the jbi.xml and checks with the runtime to see if the particular component has a configuration of that name in the selected target. If any/some of the config references could not be resolved verifier generates an error report. Verifier also checks to see if all the environment variables used in the WSDL files can be resolved.
Alternate Flow 1
If all the WSDL files use configuration values directly in port elements and none of the endpoints have an associated config object verifier generates success report.
Alternate Flow 2
If any of the endpoints has neither direct values nor a reference to config object verifier generates error report.

Use Case Name
AppVerify0003
User Action
User invokes asant verify-jbi-service-assembly with an option to generate templates
System Action
For each of the config objects that could not be resolved verifier generates a template file that could be used as an input for asadmin set-jbi-configuration command. Verifier will also generate a script that would invoke asadmin to set the configurations.
Note1
All the WSDL files may have direct values in port. Hence verifier will generate templates if a config is not specified.
Note2
Can the script be based on asadmin even if the client that invoked this operation was asant/JBI manager?

Use Case Name
AppVerify0004
User Action
User invokes asant export-jbi-service-assembly-config
System Action
Verfier verifies that the given service assembly is deployed and exports all of the config objects used in the SA.

Design Details

The following methods will be added in JBIAdminCommands. This is the common interface implemented by both client and server sides of common client.


     /**
     * This method is used to verify if the application variables and 
     * application configuration objects used in the given 
     * application are available in JBI runtime in the specified target. 
     * Also this method verifies if all necessary  components are installed.
     * If generateTemplates is true templates for missing application variables 
     * and application configurations are generated. A command script that uses
     * the template files to set configuration objects is generated.
     *
     * @param applicationURL the URL for the application zip file
     * @param targetName the target on which the application has to be verified
     * @param generateTemplates true if templates have to be generated
     * @param templateDir the dir to store the generated templates
     * @param includeDeployCommand true if the generated script should include
     * deploy command 
     *
     * @returns CompositeData the verification report
     * 
     * CompositeType of verification report
     *  String          - "ServiceAssemblyName",
     *  String          - "ServiceAssemblyDescription",
     *  Integer         - "NumServiceUnits",
     *  Boolean         - "AllComponentsInstalled",
     *  String[]        - "MissingComponentsList",
     *  CompositeData[] - "EndpointInfo",
     *  String          - "TemplateZIPID"
     * 
     * CompositeType of each EndpointInfo
     *  String    - "EndpointName",
     *  String    - "ServiceUnitName",
     *  String    - "ComponentName",
     *  String    - "Status"
     * 
     * @throws JBIRemoteException if the application could not be verified
     * 
     * Note: param templateDir is used between ant/cli and common client client.
     * TemplateZIPID is used between common client server and common client client.
     */
     public CompositeData verifyApplication(
             String applicationURL, 
             String targetName, 
             boolean generateTemplates,
             String templateDir,
             boolean includeDeployCommand) 
     throws JBIRemoteException;    
     
    /**
     * This method is used to export the application variables and 
     * application configuration objects used by the given 
     * application in the specified target. 
     *
     * @param applicationName the name of the application
     * @param targetName the target whose configuration has to be exported
     * @param configDir the dir to store the configurations
     * @returns String the id for the zip file with exported configurations
     *
     * @throws JBIRemoteException if the application configuration could not be exported
     *
     * Note: param configDir is used between ant/cli and common client client.
     * The return value is used between common client server and common client client.
     */
     public String exportApplicationConfiguration(
             String applicationName, 
             String targetName,
             String configDir) 
     throws JBIRemoteException;   

Ant commands

ant -f jbi_admin.xml verify-application
-Djbi.host=<host> -Djbi.port=<port> 
-Djbi.username=<user> -Djbi.password=<password> 
-Djbi.deploy.file=c:\tmp\sa1.zip -Djbi.target=server
-Djbi.generate.templates=true -Djbi.templates.dir=c:\tmp
-Djbi.include.deploy.command=true

ant -f jbi_admin.xml export-application-configuration
-Djbi.host=<host> -Djbi.port=<port> 
-Djbi.username=<user> -Djbi.password=<password> 
-Djbi.service.assembly.name=CompApp1 -Djbi.target=server
-Djbi.config.dir=c:\tmp

1)Template generation sample

1-a)SU1-wsdl:

<port name="filetxoutboundEP" binding="tns:filebinding">
    <file:artifacts output-location="${OUTPUT_DIR}" endpoint-role="provider"/>      
</port>

1-b)SU1-jbi.xml:

<jbi version="1.0" ...>
<services binding-component="true">
    <provides service-name="transform:outboundService" 
	  interface-name="transform:transformIF" 
	  endpoint-name="filetxoutboundEP">
    </provides>
    <javaesb:configuration port-name="filetxoutboundEP" config-name="filebinding-config1"/>
</services>
</jbi>

1-c)Assume both OUTPUT_DIR and filebinding-config1 are not set in the runtime. Verifier generates the following files:

filebinding-config1.properties

output-location=
endpoint-role=

filebinding.env

OUTPUT_DIR=

app-config.cmd

####
#Please use this file as follows to create configuration settings
#asadmin multimode --file app-config.cmd
####
jbi-set-configuration --component filebinding
--config filebinding1-config
--configfile filebinding-config1.properties

jbi-set-configuration --component filebinding
--configfile filebinding.env

2)Verifier Report Sample1

Service Assembly Information
----------------------------
Name: CompositeApp
Service Units: 2
Description: Example app with configuration.

Endpoint Configuration
-------------------------
Name: MySoapEndpoint
Service Unit: su-1
Component: sun-http-binding
State: Unresolved

Endpoint Configuration
-------------------------
Name: MyFTPEndpoint
Service Unit: su-2
Component: sun-ftp-binding
State: Resolved

3)Verifier Report Sample2

Service Assembly Information
----------------------------
Name: CompositeApp
Service Units: 2
Description: Example app with configuration.
The following components are not installed: component1, component3

Endpoint Configuration
-------------------------
Name: MySoapEndpoint
Service Unit: su-1
Component: sun-http-binding
State: The following application variables are not available: VAR1, VAR2. 

Endpoint Configuration
-------------------------
Name: MyFTPEndpoint
Service Unit: su-2
Component: sun-ftp-binding
State: The following application configurations are not available: config1, sun-ftp-binding-config4.

three weeks.

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-58) was last changed on 02-Oct-07 15:38 PM, -0700 by Annies Abduljaffar