Commands for the AdminApp object using wsadmin scripting
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 interaction 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 receive a message that you are running in the local mode. Running the AdminApp
object in local mode when a server is currently running is not recommended. This is because any
configuration changes made in local mode will not be reflected in the running server configuration
and vice versa. If you save a conflicting configuration, you could corrupt the configuration.
wsadmin -conntype NONE
, you must modify the wsadmin.bat or
wsadmin.sh command file in the
install_root/bin directory. Complete the following steps:- Make a backup copy of the install_root/bin/wsadmin.bat or install_dir/bin/wsadmin.bat file.
- Add the following lines of code to the wsadmin file directly after the call to the
setupCmdLine.bat or setupCmdLine.sh file:
LIBPATH="$WAS_LIBPATH":$LIBPATH export LIBPATH EXTSHM
SHLIB_PATH="$WAS_LIBPATH":$SHLIB_PATH export SHLIB_PATH
LD_LIBRARY_PATH="$WAS_LIBPATH":$LD_LIBRARY_PATH export LD_LIBRARY_PATH
SET PATH=%WAS_PATH%
Avoid trouble: Do not specify LD_LIBRARY_PATH_64 instead of LD_LIBRARY_PATH on the preceding export statement. Specifying LD_LIBRARY_PATH_64 on that export statement overrides any LD_LIBRARY_PATH values that exist in other scripts. - Save the updated wsadmin.bat or wsadmin.sh file.
- Deploy the application.
In a deployment manager environment, configuration updates are available only if a scripting client is connected to a deployment manager.
When connected to a node agent or a managed application server, you are not able to update the configuration because the configuration for these server processes are copies of the master configuration which resides in the deployment manager. The copies are created on a node machine when a configuration synchronization occurs between the deployment manager and the node agent. Make configuration changes to the server processes by connecting a scripting client to a deployment manager. For this reason, to change a configuration, do not run a scripting client in local mode on a node machine. It is not a supported configuration.
However, a Java EE 5 or later module can exist within an application that includes pre-Java EE 5 files and uses the .xmi file name extension.
The ibm-webservices-ext.xmi, ibm-webservices-bnd.xmi, ibm-webservicesclient-bnd.xmi, ibm-webservicesclient-ext.xmi, and ibm-portlet-ext.xmi files continue to use the .xmi file extensions.
deleteUserAndGroupEntries
Use the deleteUserAndGroupEntries command to delete users or groups for all roles, and to delete user IDs and passwords for all of the RunAs roles that are defined in the application.
Target object
None.Required parameters
- application name
- Specifies the application of interest.
Optional parameters
None.Examples
- Using Jacl:
$AdminApp deleteUserAndGroupEntries myapp
- Using Jython
string:
print AdminApp.deleteUserAndGroupEntries('myapp')
- Using Jython
list:
print AdminApp.deleteUserAndGroupEntries(['myapp'])
edit
Use the edit command to edit an application or module in batch mode. The edit command changes the application specified by the application name argument using the options specified by the options argument. No options are required for the edit command.
Target object
None.Required parameters
- application name
- Specifies the application of interest.
- options
- Specifies the options to apply to the application or module configuration.
Optional parameters
None.Examples
- Using
Jacl:
$AdminApp edit "JavaMail Sample" {-MapWebModToVH {{"JavaMail Sample WebApp" mtcomps.war,WEB-INF/web.xml newVH}}}
- Using Jython
string:
print AdminApp.edit("JavaMail Sample", '[-MapWebModToVH [["JavaMail 32 Sample WebApp" mtcomps.war,WEB-INF/web.xml newVH]]]')
- Using Jython
list:
option = [["JavaMail 32 Sample WebApp", "mtcomps.war,WEB-INF/web.xml", "newVH"]] mapVHOption = ["-MapWebModToVH", option] print AdminApp.edit("JavaMail Sample", mapVHOption)
editInteractive
Use the editInteractive command to edit an application or module in interactive mode. The editInteractive command changes the application deployment. Specify these changes in the options parameter. No options are required for the editInteractive command.
Target object
None.Required parameters
- application name
- Specifies the application of interest.
- options
- Specifies the options to apply to the application or module configuration.
Optional parameters
None.Examples
- Using Jacl:
$AdminApp editInteractive ivtApp
- Using Jython string:
AdminApp.editInteractive('ivtApp')
export
Use the export command to export the application name parameter to a file that you specify by the file name.
Target object
None.Required parameters
- application name
- Specifies the application of interest.
- file name
- Specifies the file name to export the application name to.
Optional parameters
- exportToLocal
- Specifies that the system should export the application of interest to the file name specified on the local client machine.
Examples
- Using
Jacl:
$AdminApp export DefaultApplication c:/temp/export.ear {-exportToLocal}
- Using
Jython:
AdminApp.export('DefaultApplication', 'c:/temp/export.ear', '[-exportToLocal]')
exportDDL
Use the exportDDL command to extract the data definition language (DDL) from the application name parameter to the directory name parameter that a directory specifies. The options parameter is optional.
Target object
None.Required parameters
- application name
- Specifies the application of interest.
- directory name
- Specifies the name of the directory to export the application name to.
Optional parameters
- options
- Specifies the options to pass to the application name specified.
Examples
- Using
Jacl:
$AdminApp exportDDL "My App" /usr/me/DDL {-ddlprefix myApp}
- Using Jython
string:
print AdminApp.exportDDL("My App", '/usr/me/DDL', '[-ddlprefix myApp]')
exportFile
Use the exportFile command to export the contents of a single file specified by the uniform resource identifier (URI) from the application of interest.
Target object
None.Required parameters
- application name
- Specifies the application of interest.
- URI
- Specifies the single file to export. Specify the URI within the context of an application, as
the following example displays:
META-INF/application.xml
. To specify files within a module, the URI begins with a module URI, as the following example displays:foo.war/WEB-INF/web.xml
. - filename
- Specifies the fully qualified path and file name of the file to export to.
Optional parameters
None.Examples
- Using
Jacl:
$AdminApp exportFile "My App" myapp/components.jar/META-INF/ibm-ejb-jar-bnd.xml META-INF/ibm-ejb-jar-bnd.xml
- Using Jython
string:
AdminApp.exportFile('My App', 'myapp/components.jar/META-INF/ibm-ejb-jar-bnd.xml', 'META-INF/ibm-ejb-jar-bnd.xml')
getDeployStatus
Use the getDeployStatus command to display the deployment status of the application. After installing or updating a large application, use this command to display detailed status information for application binary file expansion. You cannot start the application until the system extracts the application binaries.
Target object
None.Required parameters
- application name
- Specifies the name of the application of interest.
Optional parameters
None.Examples
- Using Jacl:
$AdminApp getDeployStatus myApplication
- Using Jython:
print AdminApp.getDeployStatus('myApplication')
Running the getDeployStatus command where myApplication
is DefaultApplication
results in status information about DefaultApplication
resembling the
following:
ADMA5071I: Distribution status check started for application DefaultApplication.
WebSphere:cell=myCell01,node=myNode01,distribution=unknown,expansion=unknown
ADMA5011I: The cleanup of the temp directory for application DefaultApplication is complete.
ADMA5072I: Distribution status check completed for application DefaultApplication.
WebSphere:cell=myCell01,node=myNode01,distribution=unknown,expansion=unknown
help
Use the help command to display general help information about the AdminApp object.
Target object
None.Required parameters
None.Optional parameters
- operation name
- Specify this option to display help for an AdminApp command or installation option.
Sample 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 application 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 installation task for a given file
uninstall Uninstalls an application, given an application name and an option string
uninstall
as the operation name
argument: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.
Examples
- The following example does not specify any arguments:
$AdminApp help
- The following example specifies the operation name argument:
$AdminApp help uninstall
- The following example does not specify any
arguments:
print AdminApp.help()
- The following example specifies the operation name
argument:
print AdminApp.help('uninstall')
install
Use the install command to install an application in non-interactive mode, given a fully qualified file name and a string of installation options. The options parameter is optional.
Target object
None.Required parameters
- ear file
- Specify the path of the .ear file to install.
Optional parameters
- options
- Specify the installation options for the command.
Examples
- Using Jacl:
$AdminApp install c:/apps/myapp.ear
- Using Jython:
print AdminApp.install('c:/apps/myapp.ear')
Using Jacl:
$AdminApp options myApp.ear
print AdminApp.options('myApp.ear')
Using Jacl:
$AdminApp help MapModulesToServers
print AdminApp.help('MapModulesToServers')
installInteractive
Use the installInteractive command to install an application in interactive mode, given a fully qualified file name and a string of installation options. The options parameter is optional.
Target object
None.Required parameters
- ear file
- Specify the path of the .ear file to install.
Optional parameters
- options
- Specify the installation options for the command.
Examples
- Using Jacl:
$AdminApp installInteractive c:/websphere/appserver/installableApps/jmsample.ear
- Using Jython:
print AdminApp.installInteractive('c:/websphere/appserver/installableApps/jmsample.ear')
isAppReady
Use the isAppReady command to
determine 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. A script that invokes isAppReady typically installs or updates an
application, and then loops around the call until the call returns a value of true before starting
the application. This command is not supported when the wsadmin tool is not connected to a
server.
Target object
None.Required parameters
- application name
- Specify the name of the application of interest.
Optional parameters
- ignoreUnknownState
- Tests to see if the specified application has been distributed and is ready to be run. Valid
values for the ignoreUnknownState parameter include
true
andfalse
. If you specify a value oftrue
, nodes and servers with an unknown state will not be included in the final ready return. The command returns a value oftrue
if the application is ready or a value offalse
if the application is not ready. This command is not supported when the wsadmin tool is not connected to a server.
Sample 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
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
Examples
- Using Jacl:
set result [$AdminApp isAppReady DefaultApplication] while {$result == "false"} { ### Wait 5 seconds before checking again after 5000 set result [$AdminApp isAppReady DefaultApplication] } puts "Starting application..."
- Using Jython:
import time result = AdminApp.isAppReady('DefaultApplication') while (result == "false") : ### Wait 5 seconds before checking again time.sleep(5) result = AdminApp.isAppReady ('DefaultApplication') print("Starting application...")
- Using Jacl:
set result [$AdminApp isAppReady DefaultApplication] while {$result == "false"} { ### Wait 5 seconds before checking again after 5000 set result [$AdminApp isAppReady DefaultApplication] } puts "Starting application..."
- Using Jython:
import time result = AdminApp.isAppReady ('DefaultApplication') while (result == "false"): ### Wait 5 seconds before checking again time.sleep(5) result = AdminApp.isAppReady ('DefaultApplication') print("Starting application...")
list
Use the list command to list the applications that are installed in the configuration.
Target object
None.Required parameters
None.Optional parameters
- target
- Lists the applications that are installed on a given target scope in the configuration.
Sample output
adminconsole
DefaultApplication
ivtApp
Examples
- Using Jacl:
$AdminApp list
- Using Jython:
print AdminApp.list()
- Using Jacl:
$AdminApp list WebSphere:cell=myCell,node=myNode,server=myServer
- Using Jython:
print AdminApp.list("WebSphere:cell=myCell,node=myNode,server=myServer")
listModules
Use the listModules command to list the modules in an application.
Target object
None.Required parameters
- application name
- Specifies the application of interest.
Optional parameters
- options
- Specifies the list of application servers on which the modules are installed. The options parameter is optional. The valid option is -server.
Sample output
ivtApp#ivtEJB.jar+META-INF/ejb-jar.xml
ivtApp#ivt_app.war+WEB-INF/web.xml
Examples
- Using Jacl:
$AdminApp listModules ivtApp
- Using Jython:
print AdminApp.listModules('ivtApp')
options
Use the options command to display a list of options for installing an enterprise archive (EAR) file.
Target object
None.Required parameters
None.Optional parameters
- EAR file
- Specifies the EAR file of interest.
- application name
- Specifies the application for which to display a list of options for editing an existing application.
- application module name
- Specifies the module name for which to display a list of options for editing a module in an existing application. This parameter requires the same module name format as the output that is returned by the listModules command.
- file, operations
- Displays a list of options for installing or updating an application or application module file.
Specify one of the following valid values:
- installapp - Use this option to install the file that is specified.
- updateapp - Use this option to update an existing application with the file that is specified.
- addmodule - Use this option to add the module file that is specified to an existing application.
- updatemodule - Use this option to update an existing module in an application with the module file that is specified.
Sample output
WASX7112I: The following options are valid for "ivtApp"
MapRolesToUsers
BindJndiForEJBNonMessageBinding
MapEJBRefToEJB
MapWebModToVH
MapModulesToServers
distributeApp
nodistributeApp
useMetaDataFromBinary
nouseMetaDataFromBinary
createMBeansForResources
nocreateMBeansForResources
reloadEnabled
noreloadEnabled
verbose
installed.ear.destination
reloadInterval
Examples
- Using Jacl:
$AdminApp options c:/websphere/appserver/installableApps/ivtApp.ear
- Using Jython:
print AdminApp.options('c:/websphere/appserver/installableApps/ivtApp.ear')
- Using Jacl:
$AdminApp options ivtApp
- Using Jython:
print AdminApp.options('ivtApp')
- Using Jacl:
$AdminApp options ivtApp#ivtEJB.jar+META-INF/ejb-jar.xml
- Using Jython:
print AdminApp.options('ivtApp#ivtEJB.jar+META-INF/ejb-jar.xml')
- Using Jacl:
$AdminApp options c:/websphere/appserver/installableApps/ivtApp.ear updateapp
- Using Jython:
print AdminApp.options('c:/websphere/appserver/installableApps/ivtApp.ear', 'updateapp')
publishWSDL
Use the publishWSDL command to publish Web Services Description Language (WSDL) files for the application that is specified in the application name parameter to the file that is specified in the file name parameter.
Target object
None.Required parameters
- file name
- Specifies the file of interest.
- application name
- Specifies the application of interest
Optional parameters
- SOAP address prefixes
- Specifies the SOAP address prefixes to use.
Sample output
The publishWSDL command does not return output.
Examples
- Using Jacl:
$AdminApp publishWSDL JAXRPCHandlerServer c:/temp/a.zip
- Using Jython:
print AdminApp.publishWSDL('JAXRPCHandlerServer', 'c:/temp/a.zip')
- Using Jacl:
$AdminApp publishWSDL JAXRPCHandlersServer c:/temp/a.zip {{JAXRPCHandlersServerApp.war {{http http://localhost:9080}}}}
- Using Jython:
print AdminApp.publishWSDL('JAXRPCHandlersServer', 'c:/temp/a.zip', '[[JAXRPCHandlersServerApp.war [[http http://localhost:9080]]]]')
searchJNDIReferences
Use the searchJNDIReferences command to list applications that refer to the Java Naming and Directory Interface (JNDI) name on a specific node.
Target object
None.Required parameters
- node configuration ID
- Specifies the configuration ID for the node of interest.
Optional parameters
- options
- Specifies the options to use.
Sample output
WASX7410W: This operation may take a while depending on the number of applications installed in your system.
MyApp
MapResRefToEJB :ejb-jar-ic.jar : [eis/J2CCF1]
Examples
MyApp
has a JNDI name of eis/J2CCF1
:- Using Jacl:
$AdminApp searchJNDIReferences $node {-JNDIName eis/J2CCF1 -verbose}
- Using Jython:
print AdminApp.searchJNDIReferences(node, '[-JNDIName eis/J2CCF1 -verbose]')
taskInfo
Use the taskInfo command to provide information about a particular task option for an application file. Many task names changed between V5.x and V6.x for a similar or the exact same operation. You might need to update existing scripts if you are migrating from V5.x to V6.x.
Target object
None.Required parameters
- EAR file
- Specifies the EAR file of interest.
- task name
- Specifies the task for which to request the information.
Optional parameters
None.Sample output
MapWebModToVH: Selecting virtual hosts for web modules
Specify the virtual host where you want to install the web modules that are 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 three fields: "webModule," "uri," "virtualHost."
Of these fields, the following fields might 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
Examples
- Using Jacl:
$AdminApp taskInfo c:/websphere/appserver/installableApps/jmsample.ear MapWebModToVH
- Using Jython:
print AdminApp.taskInfo('c:/websphere/appserver/installableApps/jmsample.ear', 'MapWebModToVH')
uninstall
Use the uninstall command uninstall an existing application.
Target object
None.Required parameters
The application analysis report is deleted and not recoverable even if a configuration save is not performed.
- application name
- Specifies the name of the application to uninstall.
Optional parameters
- options
- Specifies the options for uninstall.
Sample 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.
Examples
- Using Jacl:
$AdminApp uninstall myApp
- Using Jython:
print AdminApp.uninstall('myApp')
update
Use the update command to update an application in non-interactive mode. This command supports the addition, removal, and update of application subcomponents or the entire application. Provide the application name, content type, and update options.
Target object
None.Required parameters
- application name
- Specifies the name of the application to update.
- content type
- Use the content type parameter to indicate if you want to update part of the application or the
entire application. The following list includes the valid content type values for the
update command:
app
- Indicates that you want to update the entire application. This option is the same as indicating the update option with the install command. With theapp
value as the content type, you must specify the operation option with update as the value. Provide the new enterprise archive (EAR) file using the contents option. You can also specify binding information and application options. By default, binding information for installed modules is merged with the binding information for updated modules. To change this default behavior, specify the update.ignore.old or the update.ignore.new options.file
- Indicates that you want to update a single file. You can add, remove, or update individual files at any scope within the deployed application. With thefile
value as the content type, you must perform operations on the file using theoperation
option. Depending on the type of operation, additional options are required. For file additions and updates, you must provide file content and the file URI relative to the root of the EAR file using the contents and contenturi options. For file deletion, you must provide the file URI relative to the root of the EAR file using the contenturi option which is the only required input. Any other options that you provide are ignored.modulefile
- Indicates that you want to update a module. You can add, remove, or update an individual application module. If you specify themodulefile
value as the content type, you must indicate the operation that you want to perform on the module using the operation option. Depending on the type of operation, further options are required. For installing new modules or updating existing modules in an application, you must indicate the file content and the file URI relative to the root of the EAR file using the contents and contenturi options. You can also specify binding information and application options that pertain to the new or updated modules. For module updates, the binding information for the installed module is merged with the binding information for the input module by default. To change the default behavior, specify the update.ignore.old or the update.ignore.new options. To delete a module, indicate the file URI relative to the root of the EAR file.Restriction: Generally, you cannot add or update a module if it depends on other classes outside the module, such as classes within an optional package or library. Client-side processing involves introspecting input module classes and those classes might not load successfully unless class dependencies also are resolved. You can add or update a module if you make the required classes available on a file system that is accessible through wsadmin scripting. Through wsadmin scripting, you can modify the com.ibm.ws.scripting.classpath property in the profile_root/properties/wsadmin.properties file to include those classes so that the class loader can resolve them.partialapp
- Indicates that you want to update a partial application. Using a subset of application components provided in a compressed .zip file format you can update, add, and delete files and modules. The compressed file is not a valid Java 2 platform, Enterprise Edition (J2EE) archive. Instead, it contains application artifacts in the same hierarchical structure as they display in an EAR file. For more information on how to construct the partial application compressed file, see the Java API section. If you indicate thepartialapp
value as the content type, use the contents option to specify the location of the compressed file. When a partial application is provided as an update input, binding information and application options cannot be specified and are ignored, if provided.
Optional parameters
- options
- There are many options available for the update command. For a list of each valid option for the update command, see Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands using wsadmin scripting.
When a full application update is performed, the application analysis report is deleted and not recoverable even if a configuration save is not performed.
Sample output
ADMA5078I: Update of myApp has started.
ADMA5058I: Application and module versions are validated with versions of deployment targets.
ADMA5009I: Extracting application archive to C:\was\WebSphere\AppServer\profiles\AppSrv01\wstemp\appmgmt\mbean\AppManagement_16926a55ce1_1\app_16926d99097\ext.
ADMA5064I: FileMergeTask completed successfully for myApp.
ADMA5005I: The application myApp is configured in the WebSphere Application Server repository.
ADMA5005I: The application myApp is configured in the WebSphere Application Server repository.
ADMA5005I: The application myApp is configured in the WebSphere Application Server repository.
ADMA5005I: The application myApp is configured in the WebSphere Application Server repository.
ADMA5113I: Activation plan created successfully.
ADMA5005I: The application myApp is configured in the WebSphere Application Server repository.
ADMA5011I: The cleanup of the temp directory for application myApp is complete.
ADMA5079I: Update of myApp has ended. The application or its web modules may require a restart when a save is performed.
Examples
- Using Jacl:
$AdminApp update myApp file {-operation add -contents c:/apps/myApp/customdb.xml -contenturi myApp.jar/META-INF/customdb.xml}
$AdminApp update myApp file {-operation add -contents c:/apps/myApp/customdb.xml -contenturi myApp.jar/META-INF/customdb.xml}
- Using Jython:
print AdminApp.update('myApp', 'file', '[-operation add -contents c:/apps/myApp/customdb.xml -contenturi myApp.jar/META-INF/customdb.xml]')
print AdminApp.update('myApp', 'file', '[-operation add -contents c:/apps/myApp/customdb.xml -contenturi myApp.jar/META-INF/customdb.xml]')
- Using Jython list:
print AdminApp.update('myApp', 'file', ['-operation', 'add', '-contents', 'c:/apps/myApp/customdb.xml', '-contenturi', 'myApp.jar/META-INF/customdb.xml']))
print AdminApp.update('myApp', 'file', ['-operation', 'add', '-contents', 'c:/apps/myApp/customdb.xml', '-contenturi', 'myApp.jar/META-INF/customdb.xml'])
updateAccessIDs
Use the updateAccessIDs command to update the access ID information for users
and groups that are assigned to various roles that are defined in the application. The system reads
the access IDs from the user registry and saves the IDs in the application bindings. This operation
improves runtime performance of the application. Use this command after installing an application or
after editing security role-specific information for an installed application. This method cannot be
invoked when the -conntype option for the wsadmin tool is set to NONE
. You must be
connected to a server to invoke this command.
Target object
None.Required parameters
- application name
- Specifies the name of the application of interest.
- bALL
- The bALL boolean parameter retrieves and saves all access IDs for users and groups in the
application bindings. Specify
false
to retrieve access IDs for users or groups that do not have an access ID in the application bindings.
Examples
- Using Jacl or true:
$AdminApp updateAccessIDs myapp true
- Using Jacl for false:
$AdminApp updateAccessIDs myapp false
- Using Jython for true:
print AdminApp.updateAccessIDs('myapp', 1)
- Using Jython for false:
print AdminApp.updateAccessIDs('myapp', 0)
updateInteractive
Use the updateInteractive command to add, remove, and update application subcomponents or an entire application. When you update an application module or an entire application using interactive mode, the steps that you use to configure binding information are similar to those that apply to the installInteractive command. If you update a file or a partial application, the steps that you use to configure the binding information are not available. In this case, the steps are the same as the ones you use with the update command.
Target object
None.Required parameters
- application name
- Specifies the name of the application to update.
- content type
- Use the content type parameter to indicate if you want to update part of the application or the
entire application. The following list includes the valid content type values for the
updateInteractive command:
app
- Indicates that you want to update the entire application. This option is the same as indicating the update option with the install command. With theapp
value as the content type, you must specify the operation option with update as the value. Provide the new enterprise archive (EAR) file using the contents option. You can also specify binding information and application options. By default, binding information for installed modules is merged with the binding information for updated modules. To change this default behavior, specify the update.ignore.old or the update.ignore.new options.file
- Indicates that you want to update a single file. You can add, remove, or update individual files at any scope within the deployed application. With thefile
value as the content type, you must perform operations on the file using theoperation
option. Depending on the type of operation, additional options are required. For file additions and updates, you must provide file content and the file URI relative to the root of the EAR file using the contents and contenturi options. For file deletion, you must provide the file URI relative to the root of the EAR file using the contenturi option which is the only required input. Any other options that you provide are ignored.modulefile
- Indicates that you want to update a module. You can add, remove, or update an individual application module. If you specify themodulefile
value as the content type, you must indicate the operation that you want to perform on the module using the operation option. Depending on the type of operation, further options are required. For installing new modules or updating existing modules in an application, you must indicate the file content and the file URI relative to the root of the EAR file using the contents and contenturi options. You can also specify binding information and application options that pertain to the new or updated modules. For module updates, the binding information for the installed module is merged with the binding information for the input module by default. To change the default behavior, specify the update.ignore.old or the update.ignore.new options. To delete a module, indicate the file URI relative to the root of the EAR file.Restriction: Generally, you cannot add or update a module if it depends on other classes outside the module, such as classes within an optional package or library. Client-side processing involves introspecting input module classes and those classes might not load successfully unless class dependencies also are resolved. You can add or update a module if you make the required classes available on a file system that is accessible through wsadmin scripting. Through wsadmin scripting, you can modify the com.ibm.ws.scripting.classpath property in the profile_root/properties/wsadmin.properties file to include those classes so that the class loader can resolve them.partialapp
- Indicates that you want to update a partial application. Using a subset of application components provided in a compressed .zip file format you can update, add, and delete files and modules. The compressed file is not a valid Java 2 platform, Enterprise Edition (J2EE) archive. Instead, it contains application artifacts in the same hierarchical structure as they display in an EAR file. For more information on how to construct the partial application compressed file, see the Java API section. If you indicate thepartialapp
value as the content type, use the contents option to specify the location of the compressed file. When a partial application is provided as an update input, binding information and application options cannot be specified and are ignored, if provided.
Optional parameters
- options
- There are many options available for the updateInteractive command. For a list of each valid option for the updateInteractive command, see Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands using wsadmin scripting.
When a full application update is performed, the application analysis report is deleted and not recoverable even if a configuration save is not performed.
Sample output
WASX7266I: A was.policy file exists for this application; would you like to display it?[No]
Task[1]: Specifying application options
Specify the various options that are available for your application.
Precompile JavaServer Pages files: [No]:
Deploy enterprise beans: [No]:
Deploy Web services: [No]:
Validate schema: [No]:
Task[3]: Clone Existing Work Classes.
Clone existing work classes from from an available application edition.
....Clone work class is disabled.
Task[4]: Selecting servers
Specify targets such as application servers or clusters of application servers where you want to install the modules
that are contained in your application. Modules can be installed on the same application server or dispersed among
several application servers. Also, specify the Web servers as targets that serve as routers for requests to this application.
The plug-in configuration file (plugin-cfg.xml) for each Web server is generated, based on the applications that are routed through.
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
Server: [WebSphere:cell=LAPTOP-6LGKFAPUNode03Cell,node=LAPTOP-6LGKFAPUNode05,server=server1]:
Task[6]: Configure JASPI authentication.
JASPI providers offer an alternative to JAAS pluggable authentication for web modules. By default, an application
inherits the JASPI settings defined in the WebSphere Application Server global or domain security configuration and
web modules inherit the application setting. However, you can override these defaults by using wsadmin or the administrative console.
Module: DefaultApplication
URI: META-INF/application.xml
Use JASPI: [Inherit]:
JASPI provider name: []:
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
Use JASPI: [Inherit]:
JASPI provider name: []:
Task[10]: Binding enterprise Bean to JNDI names
Each non-message-driven enterprise bean in your application or module must be bound to a Java Naming and Directory Interface (JNDI) name.
For beans in a pre-EJB 3.0 module, you have to use JNDI name for the bean to provide the binding. For beans in a EJB 3.0 module,
you can optionally provide binding through JNDI name for the bean or local/remote home JNDI names. If JNDI name for the bean is specified,
you cannot specify binding for its local/remote home and any business interface. If no JNDI name is specified for beans in a EJB 3.0 module,
runtime will provide a container default.
Module: Default Web Application
Bean: IncrementSSB
URI: DefaultWebApplication.war,WEB-INF/ejb-jar.xml
Target Resource JNDI Name: [null]:
Local Home JNDI Name: [null]:
Remote Home JNDI Name: [null]:
Task[12]: Binding enterprise Bean with business interface to JNDI names
Each enterprise bean with a business interface in a module must be bound to a Java Naming and Directory Interface (JNDI) name.
For any business interface that does not provide a JNDI name, if its bean does not provide a JNDI name, a default binding name is provided.
If its bean provides a JNDI name, then a default is provided on top of its bean JNDI name.
Module: Default Web Application
Bean: IncrementSSB
URI: DefaultWebApplication.war,WEB-INF/ejb-jar.xml
Business interface:
JNDI Name: []:
Task[13]: Mapping EJB references to enterprise beans
Each Enterprise JavaBeans (EJB) reference that is defined in your application must map to an enterprise bean.
Module: Default Web Application
Bean:
URI: DefaultWebApplication.war,WEB-INF/web.xml
Resource Reference: HitCount/inc
Class: com.ibm.defaultapplication.IncrementSSB
Target Resource JNDI Name: []:
Task[20]: Selecting virtual hosts for Web modules
Specify the virtual host for the Web modules that are contained in your application. You can install Web modules
on the same virtual host or disperse them among several hosts.
Web module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
Virtual host: [default_host]:
Task[21]: Specify the Context root of web module
Configure values for context roots in web modules.
Web module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
Context Root: [/]:
Task[31]: Specifying EJB deploy options
Specify the options to deploy enterprise beans. Select database type only when all of the modules are mapped
to the same database type. If some modules map to a different backend ID, set the database type blank so that
the Select current backend ID panel is displayed.
....The EJB deploy option is not enabled.
Task[33]: Assign shared libraries to application or each module
Specify shared libraries that the application or individual modules reference. These libraries must be
defined in the configuration at the appropriate scope.
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
Shared Libraries: []:
Task[34]: Assign asset or composition unit IDs as shared libraries to the application or each module
Specify asset or composition unit IDs as shared libraries that the application or individual modules reference.
If a composition unit ID is specified, it must be part of the business level application that this enterprise
application belongs to. If an asset ID is specified, a composition unit is created from the asset.
When editing an application, only composition unit IDs can be specified as shared libraries.
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
Asset or composition unit IDs: []:
Composition Unit names: []:
Match target: [Yes]:
Task[35]: Specifying JSP deploy options
Specify the options for JSP precompiler.
....The JSP deploy option is not enabled.
Task[36]: Specify JSP reload options for web module
Configure Servlet and JSP reload attributes in web modules.
Web module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
JSP enable class reloading: [Yes]:
JSP reload interval in seconds: [10]:
Task[38]: Set the metadata-complete attribute of the deployment descriptor for the module
The metadata-complete attribute defines whether the deployment descriptor for this module is complete.
Set the metadata-complete attribute to "true" to merge and persist annotation-based metadata with existing XML-based
deployment descriptor metedata to avoid scanning of annotation-based metadata each time the module is read.
If the attribute remains "false", then the annotation-based metadata is scanned each time the module is read and can impact performance.
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/ejb-jar.xml
metadata-complete attribute: [false]:
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
metadata-complete attribute: [false]:
Task[39]: Specify runtime provisioning components to be added or removed
Specify runtime components that should be added to or removed from the default runtime components that are
needed to run this application. This step is for advanced users and should only be used in those cases when
all the runtime components needed for the application cannot be obtained by inspecting the application.
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/ejb-jar.xml
Runtime Provisioning Components To Add: []:
Runtime Provisioning Components To Remove: []:
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
Runtime Provisioning Components To Add: []:
Runtime Provisioning Components To Remove: []:
Task[40]: Module Build ID
Display module build IDs.
Module: Default Web Application
URI: DefaultWebApplication.war,WEB-INF/web.xml
Build ID:
Task[41]: Copy WSDL files
Copy WSDL files
....This task does not require any user input
Task[42]: Specify options to deploy Webservices
Specify options to deploy Webservices
....WebServices Deploy option is not enabled.
ADMA5078I: Update of DefaultApplication has started.
ADMA5058I: Application and module versions are validated with versions of deployment targets.
ADMA5009I: Extracting application archive to C:\was9.0\cf111907.02\WebSphere\AppServer\profiles
\AppSrv02\wstemp\appmgmt\mbean\AppManagement_16926a55ce1_1\app_16926e99953\ext\DefaultWebApplication.war.
ADMA5064I: FileMergeTask completed successfully for DefaultApplication.
ADMA5005I: The application DefaultApplication is configured in the WebSphere Application Server repository.
ADMA5005I: The application DefaultApplication is configured in the WebSphere Application Server repository.
ADMA5005I: The application DefaultApplication is configured in the WebSphere Application Server repository.
ADMA5005I: The application DefaultApplication is configured in the WebSphere Application Server repository.
ADMA5113I: Activation plan created successfully.
ADMA5005I: The application DefaultApplication is configured in the WebSphere Application Server repository.
ADMA5011I: The cleanup of the temp directory for application DefaultApplication is complete.
ADMA5079I: Update of DefaultApplication has ended. The application or its web modules may require a restart when a save is performed.
Examples
- Using Jacl:
$AdminApp updateInteractive myApp modulefile {-operation update -contents c:/apps/myApp/DefaultWebApplication.war -contenturi DefaultWebApplication.war -nodeployejb}
$AdminApp updateInteractive myApp modulefile {-operation add -contents /apps/myApp/Increment.jar -contenturi Increment.jar -nodeployejb -BindJndiForEJBNonMessageBinding {{"Increment EJB module" Increment Increment.jar,META-INF/ejb-jar.xml Inc}}}
- Using Jython:
print AdminApp.updateInteractive('myApp', 'modulefile', '[-operation update -contents c:/apps/myApp/DefaultWebApplication.war -contenturi DefaultWebApplication.war -nodeployejb]')
print AdminApp.updateInteractive('myApp', 'modulefile', '[-operation add -contents /apps/myApp/Increment.jar -contenturi Increment.jar -nodeployejb -BindJndiForEJBNonMessageBinding [["Increment EJB module" Increment Increment.jar,META-INF/ejb-jar.xml Inc]]]')
- Using Jython list:
print AdminApp.updateInteractive('myApp', 'modulefile', ['-operation', 'update', '-contents', 'c:/apps/myApp/DefaultWebApplication.war', '-contenturi', 'DefaultWebApplication.war, '-nodeployejb'])
Previous to 9.0.0.11, DefaultApplication contained Increment.jar with an entity EJB. For 9.0.0.10 and earlier products, the Jython list example is as follows:bindJndiForEJBValue = [["Increment EJB module", "Increment","Increment.jar,META-INF/ejb-jar.xml", "Inc"]] print AdminApp.updateInteractive('myApp', 'modulefile', ['-operation', 'add', '-contents', 'c:/apps/myApp/Increment.jar', '-contenturi', 'Increment.jar', '-nodeployejb', '-BindJndiForEJBNonMessageBinding', bindJndiForEJBValue])
bindJndiForEJBValue = [["Increment EJB module", "Increment", "Increment.jar,META-INF/ejb-jar.xml", "Inc"]] print AdminApp.updateInteractive('myApp', 'modulefile', ['-operation', 'add', '-contents', '/apps/myApp/Increment.jar', '-contenturi', 'Increment.jar', '-nodeployejb', '-BindJndiForEJBNonMessageBinding', bindJndiForEJBValue])
view
Use the view command to view the task that is specified by the task name parameter for the application or module that is specified by the application name parameter. Use -tasknames as the option to get a list of valid task names for the application. Otherwise, specify one or more task names as the option.
Target object
None.Required parameters
- name
- Specifies the name of the application or module to view.
Optional parameters
- bALL
- The bALL boolean parameter retrieves and saves all access IDs for users and groups in the
application bindings. Specify
false
to retrieve access IDs for users or groups that do not have an access ID in the application bindings. - -buildVersion
- Specifies whether to display the build version of the application of interest.
Sample output
taskoptions
value for the task name
parameter:MapModulesToServers
MapWebModToVH
MapRolesToUsers
mapModulesToServers
task for
the task name
parameter:MapModulesToServers: Selecting Application Servers
Specify the application server where you want to install the modules that are contained in your
application. Modules can be installed 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
Examples
- Using Jacl:
$AdminApp view DefaultApplication {-tasknames}
- Using Jython:
print AdminApp.view('DefaultApplication', ['-tasknames'])
- Using Jacl:
$AdminApp view DefaultApplication {-MapModulesToServers}
- Using Jython:
print AdminApp.view('DefaultApplication', ['-MapModulesToServers'])
- Using Jacl:
$AdminApp view DefaultApplication {-AppDeploymentOptions}
- Using Jython:
print AdminApp.view('DefaultApplication', '-AppDeploymentOptions')
- Using Jacl:
$AdminApp view DefaultApplication {-buildVersion}
- Using Jython:
print AdminApp.view('DefaultApplication', '-buildVersion')