AdminApp object for scripted administration

Use the AdminApp object to install, modify, and administer applications. The AdminApp object interacts with the WebSphere Application Server management and configuration services to make application inquiries and changes. This includes installing and uninstalling applications, listing modules, exporting, and so on.

You can start the scripting client when no server is running, if you want to use only local operations. To run in local mode, use the -conntype NONE option to start the scripting client. You will receive a message that you are running in the local mode. If a server is currently running, it is not recommended to run the AdminApp tool in local mode.

The following public commands are available for the AdminApp object:

deleteUserAndGroupEntries
Deletes users or groups for all roles, and deletes userids and passwords for all of the RunAs roles defined in the application.
Parameters: appname
Return Type: none

Example usage:

Using Jacl:

$AdminApp deleteUserAndGroupEntries myapp

edit
Edits an application or module in interactive mode.
Parameters using Jacl: appname -- java.lang.String options -- java.lang.String
Return Type: java.lang.String

Example usage:

Using Jacl:

$AdminApp edit "JavaMail Sample" {-MapWebModToVH {{"JavaMail 
Sample WebApp" mtcomps.war,WEB-INF/web.xml newVH}}} 

Note: The edit command changes the application deployment. Specify these changes in the options parameter. No options are required for the edit command.

editInteractive
Edits an application or module in interactive mode.
Parameters using Jacl:: appname -- java.lang.String; options -- java.lang.String
Return Type: java.lang.String

Example usage:

Using Jacl:

$AdminApp editInteractive ivtApp 

Note: The editInteractive command changes the application deployment. Specify these changes in the options parameter. No options are required for the editInteractive command.

export
Exports the application appname parameter to a file you specify by file name.
Parameters: appname, filename
Return Type: none

Example usage:

Using Jacl:

$AdminApp export "My App" /usr/me/myapp.ear 

exportDDL
Extracts the data definition language (DDL) from the application appname parameter to the directoryname parameter that a directory specifies. The options parameter is optional.
Parameters: appname, directoryname, options
Return Type: none

Example usage:

Using Jacl:

$AdminApp exportDDL "My App" /usr/me/DDL {-ddlprefix myApp}

help
Displays general help for the AdminApp object.
Parameters: none
Return Type: none

Example usage:

Using Jacl:

$AdminApp help

Example output:

WASX7095I: The AdminApp object allows application objects to 
be manipulated including installing, uninstalling, editing,
and listing.  Most of the commands supported by AdminApp operate in two
modes: the default mode is one in which AdminApp communicates with the
WebSphere server to accomplish its tasks.  A local mode is also
possible, in which no server communication takes place.  The local
mode of operation is invoked by including the "-conntype NONE" flag in the
option string supplied to the command.

The following commands are supported by AdminApp; more detailed
information about each of these commands is available by using the
"help" command of AdminApp and supplying the name of the command
as an argument.

edit            Edit the properties of an application
editInteractive Edit the properties of an application interactively
export          Export application to a file
exportDDL      Extract DDL from application to a directory
help            Show help information
install         Installs an application, given a file name and an option string.
installInteractive
                Installs an application in interactive mode, given a file name
                and an option string.
list            List all installed applications
listModules     List the modules in a specified application
options         Shows the options available, either for a given file, or in
                general.
taskInfo        Shows detailed information pertaining to a given install task
                for a given file
uninstall       Uninstalls an application, given an application name and
                an option string

help
Displays help for an AdminApp command or installation option.
Parameters: operation name
Return Type: none

Example usage:

Using Jacl:

$AdminApp help uninstall

Example output:

WASX7102I: Method: uninstall
Arguments: application name, options
Description: Uninstalls application named by "application name" using
the options supplied by String 2.
Method: uninstall
Arguments: application name
Description: Uninstalls the application specified by
"application name" using default options.

install
Installs an application in non-interactive mode, given a fully qualified file name and a string of installation options. The options parameter is optional.
Parameters using Jacl: earfile -- java.lang.String; options -- java.lang.String
Return Type: none

Example usage:

Using Jacl:

$AdminApp install c:/apps/myapp.ear

There are many options available for this command. You can obtain a list of valid options for an EAR file with the following command:

Using Jacl:

$AdminApp options myApp.ear
You can also obtain help for each object with the following command:

Using Jacl:

$AdminApp help MapModulesToServers
installInteractive
Installs an application in interactive mode, given a fully qualified file name and a string of installation options. The options parameter is optional.
Parameters using Jacl: earfile -- java.lang.String; options - java.lang.String
Return Type: none

Example usage:

Using Jacl:

$AdminApp installInteractive c:/websphere/appserver/installableApps/jmsample.ear

isAppReady
Tests to see if the specified application has been distributed and is ready to be run. Returns a value of true if the application is ready, or a value of false if the application is not ready. This command is not supported when the wsadmin tool is not connected to a server.
Parameters: application name
Returns: true or false

Example usage:

Using Jacl:

$AdminApp isAppReady DefaultApplication

Example output:

ADMA5071I: Distribution status check started for application DefaultApplication.
WebSphere:cell=Node03Cell,node=myNode,distribution=true
ADMA5011I: The cleanup of the temp directory for application DefaultApplication is complete.
ADMA5072I: Distribution status check completed for application DefaultApplication.
true

isAppReady
Tests to see if the specified application has been distributed and is ready to be run. Valid values for the ignoreUnknownState parameter include true and false. If you specify a value of true, nodes and servers with an unknown state will not be included in the final ready return. The command returns a value of true if the application is ready or a value of false if the application is not ready. This command is not supported when the wsadmin tool is not connected to a server.
Parameters: application name, ignoreUnknownState
Returns: true or false

Example usage:

Using Jacl:

$AdminApp isAppReady TEST true

Example output:

ADMA5071I: Distribution status check started for application TEST.
WebSphere:cell=myCell,node=myNode,distribution=unknown
ADMA5011I: The cleanup of the temp directory for application TEST is complete.
ADMA5072I: Distribution status check completed for application TEST.
false

list
Lists the applications installed in the configuration.
Parameters: none
Return Type: java.lang.String

Example usage:

Using Jacl:

$AdminApp list

Example output:

adminconsole 
DefaultApplication 
ivtApp

listModules
Lists the modules in an application.
Parameters: appname -- java.lang.String options -- java.lang.String
Return Type: java.lang.String

The options parameter is optional. The valid option is -server. This option lists the application servers on which the modules are installed.

Example usage:

Using Jacl:

$AdminApp listModules ivtApp

Example output:

ivtApp#ivtEJB.jar+META-INF/ejb-jar.xml
ivtApp#ivt_app.war+WEB-INF/web.xml
This example is formed by the concatenation of appname, #, module URI, +, and DD URI. You can pass this string to the edit and editInteractive AdminApp commands.

options
Displays a list of options for installing an EAR file.
Parameters: earfile
Return Type: Information about the valid installation options for an EAR file.

Example usage:

Using Jacl:

$AdminApp options c:/websphere/appserver/installableApps/jmsample.ear

publishWSDL[Version 5.0.2 and later]
Publishes WSDL files for the application specified in the appname parameter to the file specified in the filename parameter.
Parameters: appname, filename
Return Type: none

Example usage:

Using Jacl:

$AdminApp publishWSDL JAXRPCHandlerServer c:/temp/a.zip

publishWSDL[Version 5.0.2 and later]
Publishes WSDL files for the application specified in the appname parameter to the file specified in the filename parameter using the soap address prefixes specified in the soapAddressPrefixes parameter.
Parameters: appname, filename, soapAddressPrefixes
Return Type: none

Example usage:

Using Jacl:

$AdminApp publishWSDL JAXRPCHandlersServer c:/temp/a.zip 
{{JAXRPCHandlersServerApp.war {{http http://localhost:9080}}}}

taskInfo
Provides information about a particular task option for an application file.
Parameters: earfile, task name
Return Type: none

Example usage:

Using Jacl:

$AdminApp taskInfo c:/websphere/appserver/installableApps/jmsample.ear MapWebModToVH

Example output:

MapWebModToVH: Selecting virtual hosts for Web modules
Specify the virtual host where you want to install the Web modules contained in
your application. Web modules can be installed on the same virtual host or dispersed among several hosts.
Each element of the MapWebModToVH task consists of the following 3 fields: "webModule," "uri," "virtualHost."
Of these fields, the following may be assigned new values: "virtualHost"
and the following are required: "virtualHost"

The current contents of the task after running default bindings are:
webModule: JavaMail Sample WebApp
uri: mtcomps.war,WEB-INF/web.xml
virtualHost: default_host

uninstall
Uninstalls an existing application.
Parameters: appname -- java.lang.String
Return Type: none

Example usage:

Using Jacl:

$AdminApp uninstall myApp

Example output:

ADMA5017I: Uninstallation of myapp started.
ADMA5104I: Server index entry for myCellManager was updated successfully.
ADMA5102I: Deletion of config data for myapp from config repository completed successfully.
ADMA5011I: Cleanup of temp dir for app myapp done.
ADMA5106I: Application myapp uninstalled successfully.

updateAccessIDs
Updates the access id information for users and groups assigned to various roles defined in the application. The access IDs are read from the user registry and saved in the application bindings. This operation improves run-time performance of the application. You should call it after installing an application or after editing security role-specific information for an installed application. This method cannot be invoked when -conntype is set to NONE. You must be connected to a server to invoke this command.

The bALL Boolean parameter retrieves and saves all access IDs for users and groups in the application bindings. Specify false if you want to retrieve access IDs for users or groups that do not have an access ID in the application bindings.

Parameters: appname, bALL
Return Type: none

Example usage:

Using Jacl:

$AdminApp updateAccessIDs myapp true

view
View the application or module specified by the name parameter.
Parameters: name
Return Type: java.lang.String

Example usage:

Using Jacl:

$AdminApp view adminconsole

Example output:

MapRolesToUsers: Mapping Users to Roles

You must map each role defined in the application or module to a user or group from the user registry of the domain:

Role:  administrator
Everyone?:  No
All Authenticated?:  No
Mapped Users:
Mapped Groups:
Role:  operator
Everyone?:  No
All Authenticated?:  No
Mapped Users:
Mapped Groups:
Role:  configurator
Everyone?:  No
All Authenticated?:  No
Mapped Users:
Mapped Groups:
Role:  monitor
Everyone?:  No
All Authenticated?:  No
Mapped Users:
Mapped Groups:
MapWebModToVH: Selecting Virtual Hosts for Web Modules

Specify the virtual host where you want to install the Web modules contained in your application. You can install Web modules on the same virtual host or dispersed among several hosts:

Web Module:  adminconsole
URI:  adminconsole.war,WEB-INF/web.xml
Virtual Host:  admin_host
MapModulesToServers: Selecting Application Servers

Specify the application server where you want to install modules contained in your application. You can install modules on the same server or dispersed among several servers.

Module:  adminconsole
URI:  adminconsole.war,WEB-INF/web.xml
Server:  WebSphere:cell=juniartiNetwork,node=juniartiManager,server=dmgr

Specify the various options available to prepare and install your application:

Directory to Install Application:  $(APP_INSTALL_ROOT)/juniartiNetwork
Distribute Application:  Yes
Use Binary Configuration:  No
Application Name:  adminconsole
Create MBeans for Resources:  Yes
Enable Class Reloading:  No
Reload Interval in Seconds:  0


Related concepts
Jacl
Related reference
Installation options for the AdminApp object
Example: Obtaining information about task options for the AdminApp install command
Help object for scripted administration
AdminControl object for scripted administration
AdminConfig object for scripted administration



Searchable topic ID:   rxml_adminapp
Last updated: Jun 21, 2007 4:12:58 PM CDT    WebSphere Application Server Express, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/rxml_adminapp.html

Library | Support | Terms of Use | Feedback