InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.0: About user assistance >
6.6.0.6: Installing applications with the application installer command line

6.6.0.6: Installing applications with the application installer command line

The application installer, otherwise known as "SEAppInstall," is a tool for installing an application into a server configuration file and preparing this application to run within an application server.

The application installer accomplishes the following:

  • Locates and resolves bindings for each module in the EAR file
  • Updates the server configuration file to reflect that the application is installed
  • Puts the .ear file and its contents into the required arrangement in the directories under WebSphere Application Server
  • Validates the configuration information in an EAR file and optionally, in the WebSphere Application Server

Invoking the SE application installer

To invoke the SE application installer:

  1. Open a command window.
  2. Change directory to product_installation_root/bin
  3. Run the tool by entering a command using the syntax and parameters described next.
  4. Optionally, view the current command line parameters for the tool by typing:
    SEAppInstall

Understanding SE application installer syntax and parameters

At the time of this writing, the tool displays the following information when invoked without parameters:

IBM WebSphere Application Server Release 4, AEs
J2EE Application Installation Tool, Version 1.0
Copyright IBM Corp., 1997-2001

Required Operation Missing: You must specify either -install, -uninstall,
-export, -list, -extractDDL, or -validate
Usage: Use one of the following commands

java com.ibm.websphere.install.se.SEApplicationInstaller
-install <ear file or directory>
[-configFile <server configuration file>]
[-expandDir <directory in which to expand ear>]
[-nodeName <name of node>]
[-serverName <name of server>]
[-ejbdeploy <TRUE | false>]
[-dbType <database type number>]
[-schemaName <table schema name>]
[-precompileJsp <TRUE | false>]
[-validate <app | server | both | NONE>]
[-denyAll <TRUE | false>]
[-interactive {TRUE | false}]
If you selected "-interactive false", you will not be asked any
questions and you will not be able to specify binding data

java com.ibm.websphere.install.se.SEApplicationInstaller
-uninstall <application name>
[-delete <true | false>]
[-configFile <server configuration file>]
[-nodeName <name of node>]
[-serverName <name of server>]

java com.ibm.websphere.install.se.SEApplicationInstaller
-export <application name>
[-configFile <server configuration file>]
-outputFile <name of the ear file to create>

java com.ibm.websphere.install.se.SEApplicationInstaller
-list <apps | wars | ejbjars | all>
[-configFile <server configuration file>]

java com.ibm.websphere.install.se.SEApplicationInstaller
-extractDDL <application name>
[-DDLPrefix <Prefix to apply to front of all DDL file names>]
[-configFile <server configuration file>]

java com.ibm.websphere.install.se.SEApplicationInstaller
-validate <app | server | both | NONE>
[-ear <ear file>]
[-configFile <server configuration file>]
If you specify "-validate app" or "-validate both", you must
include the "-ear" option. If you specify "-validate server"
or "-validate both", the "-configFile" option is optional.

You can also use the following syntax to execute the command:
"java -jar SEAppInstall.jar" instead of
"java com.ibm.websphere.install.se.SEApplicationInstaller"

Installing an application into a server

The -install option takes an EAR file, or expanded directory containing the EAR file contents and configures this file within a server configuration file specified via the optional -configFile parameter. If the -configFile parameter is not specified, the default is product_installation_root/config/server-cfg.xml.

The optional parameters for this file include:

  • -dbType: Applicable only during a deploy of a CMP EJB. This parameter forces the database type to use when generating the ddl.
  • -denyAll: If not specified, results in denied access to all unprotected methods, if security is enabled.
  • -ejbdeploy: If not specified, assumes that if the enterprise application EAR file contains one or more EJBs, these EJBs should be deployed during the installation.
  • -expandDir: If not specified, defaults to what is specified under the APP_INSTALL_ROOT PathMap entry within the specified server configuration file. If the -configFile is not specified, defaults to product_installation_root/installedApps
  • -interactive: If not specified, defaults to true. This option walks through the installing application and looks for binding information that needs specification, including JNDI names for EJBs, EJB-REFs, and RESOURCE-REFs. Binding information to map roles to users and groups for security purposes is also included.
  • -nodeName: If not specified, uses the node specified within the specified server configuration file. If no nodes, or if multiple nodes are found, an error is thrown.
  • -precompileJsp: If not specified, defaults to true.
  • -schemaName: Applicable only during a deploy of a CMP EJB. If specified, sets the database schema name to use with this application.
  • -serverName: If not specified, uses the server specified within the specified server configuration file. If no servers, or if multiple servers are found, an error is thrown.
  • -validate: If specified, Validates the configuration bindings and extensions in the server and the specified application. Possible values of -validate are:
    • app: Requires the -ear parameter. Specify the fully qualified path to the EAR file.
    • server
    • both: Requires the -ear parameter. Specify the fully qualified path to the EAR file.
    • NONE
    The default is no validation.

The process of installing an application updates the server configuration file with the application, and installs the EJB JARs within the EJB container and the WARs within the Web Container. The installation process also expands the application under the expandDir location. The expanded directory is named the same as the installed application, but in directory format. There is also binding information under the appropriate META-INF and WEB-INF directories, within the appropriate modules of the application. For example (on a single line):

seappinstall -install c:\exportedApps\sampleApp.ear
-configFile c:\websphere\appserver\config\server-cfg.xml
-interactive false

This command installs the sampleApp.ear file into the appropriate server configuration file.

Uninstalling an application from a server

The -uninstall option takes an EAR file and removes it within a server config file, specified via the optional -configFile parameter. Note that the location of the installed application in the expanded directory is not removed and contains two optional parameters, unless you specify the -delete true option:

  • -delete: If a value of true is specified, the application is removed from the directory in which it was expanded during installation.
  • -nodeName: If not specified, uses the node identified within the specified server configuration file. If no nodes, or if multiple nodes are found, an error is thrown.
  • -serverName: If not specified, uses the server identified within the specified server configuration file. If no server, or if multiple servers are found, an error is thrown.

The process of uninstalling an application updates the server configuration file removing the application. This process removes the module references on the EJB and Web Containers. For example (on a single line):

seappinstall -uninstall sampleApp
-configFile c:\websphere\appserver\config\server-cfg.xml
uninstalls the sampleApp application from the appropriate server configuration file.

Exporting an installed application containing configuration information

The parameters for seappinstall include:

  • -export: Takes an installed application within a server config file specified via the optional -configFile parameter and exports it to the location specified by the -outputFile parameter. This option is useful since the exported jar contains the binding information that the application uses within the server configuration. For example (on a single line):
    seappinstall -export sampleApp
    -configFile c:\websphere\appserver\config\server-cfg.xml
    -outputFile c:\exportedApps\sampleApp.ear
    
    exports the installed sampleApp application and collapses the application files into the EAR file specified by the outputFile parameter.
  • -extractDDL: Extracts all table definitions for any CMP EJBs in the specified installed application. Optional parameters are -configFile and -DDLPrefix. -DDLPrefix specifies an optional prefix to prepend to all DDL file names. The output files are written to the current directory. For example:
    seappinstall -extractDDL sampleApp
    generates the DDL file sampleApp.ear_Increment.jar_Table.ddl in the bin directory.
  • -list: Lists the installed entities as specified by the -list parameter. Possible values for -list are:
    • apps
    • wars
    • ejbjars
    • all
    The optional parameter, -configFile, specifies the server configuration file against which the list request is issued. For example:
    seappinstall -list all
    lists all the applications, all the Web modules, and all the EJB modules installed in the specified server configuration.

Validating configuration information

The -validation option validates the bindings and extensions in an enterprise application (EAR) and, optionally, the configuration in the application server configuration file.

It is not required that this application already be installed, or in its expanded form. The -configFile parameter is optional. If not specified, the product_installation_root/config/server-cfg.xml server configuration file is used.

For example:

seappinstall -validate both
-ear c:\websphere\appserver\installableApps\sampleApp.ear
Go to previous article: Starting and stopping Application Assembly Tool Go to next article: Launching Java application clients in the J2EE application client container

 

 
Go to previous article: Starting and stopping Application Assembly Tool Go to next article: Launching Java application clients in the J2EE application client container