Installing enterprise application files with the console

Installing Java™ Platform, Enterprise Edition (Java EE) application files consists of placing assembled enterprise application, Web, enterprise bean (EJB), or other installable modules on a server or cluster configured to hold the files. Installed files that start and run properly are considered deployed.

Before you begin

Before installing enterprise application files, ensure that you are installing your application files onto a compatible deployment target. If the deployment target is not compatible, select a different target.

Optionally, determine whether the application that you are installing uses library files that other deployed applications also use. You can define a shared library for each of these shared files. Using shared libraries reduces the number of library file copies on your workstation or server.
Avoid trouble: During an Enterprise application deployment, it might be necessary to scan the application binary files for annotations that were introduced by Java EE 5 or later. An application might not deploy if it is compiled by using a Java SDK level that is higher than the Java SDK level of a deployment manager. The deployment manager needs to be either at the same Java SDK level or at a higher Java SDK level than the application.

About this task

To install new enterprise application files to a WebSphere® Application Server configuration, you can use the following options:

  • Administrative console
  • wsadmin scripts
  • Monitored directory deployment
  • Application properties files
  • Java MBean programs

The steps describe how to use the administrative console to install an application, EJB component, Session Initiation Protocol (SIP) archive (SAR), or web module.

Avoid trouble: After you start completing steps in the application installation wizard, click Cancel to exit if you decide not to install the application. Do not simply move to another administrative console page without first clicking Cancel on an application installation page.

Procedure

  1. Click Applications > New application > New Enterprise Application in the console navigation tree.
  2. On the first Preparing for application installation page:
    1. Specify the full path name of the source enterprise application file (.ear file otherwise known as an EAR file).

      The EAR file that you are installing can be either on the client machine (the machine that runs the web browser) or on the server machine (the machine to which the client is connected). If you specify an EAR file on the client machine, then the administrative console uploads the EAR file to the machine on which the console is running and proceeds with application installation.

      You can also specify a stand-alone web archive (WAR), SAR, or Java archive (JAR) file for installation.

      [IBM i]If the EAR file resides on the server machine, and the server is an IBM® i server, ensure that user profile QEJBSVR has *R authority to the EAR file and at least *X authority to all the directories in the path containing the EAR file.

      [Windows]trun_app_install_default.dita: If you attempt to install an application from a remote file system and the Java virtual machine (JVM) is registered as a Microsoft Windows service, the administrative console does not show a mapped network drive. In this scenario, the Windows service runs as a new log on session whose security identifier (SID) is different from the user session. Thus, the service cannot manipulate the mapped network drive, which is established by the login user. To install the application from a remote file system, you must use the WASService command to unregister the JVM from the Windows service. For more information, see the documentation about the WASService command.
    2. Click Next.
  3. On the second Preparing for application installation page:
    1. Select whether to view all installation options.
      Fast Path - Prompt only when additional information is required
      Displays the module mapping step as well as any steps that require you to specify needed information to install the application successfully.
      Detailed - Show all installation options and parameters
      Displays all installation options.
    2. Select whether to generate default bindings.

      Select Generate default bindings to have the product supply default values for incomplete Java Naming and Directory (JNDI) and other application bindings. The product does not change existing bindings.

      You do not need to specify JNDI values for EJB bean, local home, remote home, or business interfaces of EJB 3.x modules. The product assigns container default values during run time. Similarly, for any EJB reference within an EJB 3.x or a Web 2.4 or later module, you do not need to specify JNDI values because the product resolves the targets automatically during run time. Even when you select Generate default bindings, the product does not generate default values for those JNDI values but it does generate default values for other bindings such as virtual host.

      You can customize default values used in generating default bindings. Preparing for application installation binding settings describes available customization and provides sample bindings.

    3. Click Next.
      If security warnings are displayed, click Continue. The Install New Application pages are displayed. If you chose to generate default bindings, you can proceed to the Summary step. Example: Installing an EAR file using the default bindings provides sample steps.
  4. Specify values for installation options as needed.

    You can click on a step number to move directly to that page instead of clicking Next. The contents of the application or module that you are installing determines which pages are available.

    Table 1. Wizard page descriptions. The table describes each wizard page.
    Page Description
    Select installation options On the Select installation options page, provide values for the settings specific to the product. Default values are used if you do not specify a value.
    Map modules to servers On the Map modules to servers page, specify deployment targets where you want to install the modules contained in your application. Modules can be installed on the same deployment target or dispersed among several deployment targets. Each module must be mapped to a target server.

    On single-server products, a deployment target can be an application server or web server.

    On multiple-server products, a deployment target can be an application server, cluster of application servers or web server.

    Provide options to compile JSPs If the Precompile JavaServer Pages files setting is enabled on the Select installation options page and your application uses JavaServer Pages (JSP) files, then you can specify JSP compiler options on the Provide options to compile JSPs page.
    Provide JNDI names for beans On the Provide JNDI names for beans page, specify a JNDI name for each enterprise bean in every EJB 2.1 and earlier module. You must specify a JNDI name for every enterprise bean defined in the application. For example, for the EJB module MyBean.jar, specify MyBean.

    As to EJB 3.x modules, you can specify JNDI names, local home JNDI names, remote home JNDI names, or no JNDI names. If you do not specify a value, the product provides a default value.

    Bind EJB business On the Bind EJB business page, you can specify business interface JNDI names for EJB 3.x modules. If you specified a JNDI name for a bean on the Provide JNDI names for beans page, do not specify a business interface JNDI name on this page for the same bean. If you do not specify the JNDI name for a bean, you can optionally specify a business interface JNDI name. When you do not specify a business interface JNDI name, the product provides a container default. For a no-interface view, the business interface value is an empty string ("").
    Map default data sources for modules containing 1.x entity beans If your application uses EJB modules that contain Container Managed Persistence (CMP) beans that are based on the EJB 1.x specification, for Map default data sources for modules containing 1.x entity beans, specify a JNDI name for the default data source for the EJB modules. The default data source for the EJB modules is optional if data sources are specified for individual CMP beans.
    Map EJB references to beans On the Map EJB references to beans page, if your application defines EJB references, you can specify JNDI names for enterprise beans that represent the logical names specified in EJB references.

    If the EJB reference is from an EJB 3.x, or Web 2.4 or later module, the JNDI name is optional. For earlier modules, each EJB reference defined in the application must be bound to an EJB file.

    If Allow EJB reference targets to resolve automatically is enabled, the JNDI name is optional for all modules. The product provides a container default value or automatically resolves the EJB reference for incomplete bindings.

    Map resource references to resources If your application defines resource references, for Map resource references to resources, specify JNDI names for the resources that represent the logical names defined in resource references. You can optionally specify login configuration name and authentication properties for the resource. After specifying authentication properties, click OK to save the values and return to the mapping step. You can optionally specify extended data source properties to enable a data source that uses heterogeneous pooling to connect to a DB2® database. Each resource reference defined in the application must be bound to a resource defined in your WebSphere Application Server configuration before clicking Finish on the Summary page.
    Map virtual hosts for web modules If your application uses web modules, for Map virtual hosts for web modules, select a virtual host from the list to map to a web module defined in the application. The port number specified in the virtual host definition is used in the URL that is used to access artifacts such as servlets and JSP files in the web module. Each web module must have a virtual host to which it maps. Not specifying all needed virtual hosts will result in a validation error displaying after you click Finish on the Summary page.
    Map security roles to users or groups If the application has security roles defined in its deployment descriptor then, for Map security roles to users or groups, specify users and groups that are mapped to each of the security roles. Select Role to select all the roles or select individual roles. For each role, you can specify whether predefined users such as Everyone or All authenticated users are mapped to it. To select specific users or groups from the user registry:
    1. Select a role and click Lookup users or Lookup groups.
    2. On the Lookup users or groups page displayed, enter search criteria to extract a list of users or groups from the user registry.
    3. Select individual users or groups from the results displayed.
    4. Click OK to map the selected users or groups to the role selected on the Map security roles to users or groups page.
    Map RunAs roles to users If the application has Run As roles defined in its deployment descriptor, for Map RunAs roles to users, specify the Run As user name and password for every Run As role. Run As roles are used by enterprise beans that must run as a particular role while interacting with another enterprise bean. Select Role to select all the roles or select individual roles. After selecting a role, enter values for the user name, password, and verify password and click Apply.
    Ensure all unprotected 1.x methods have the correct level of protection If your application contains EJB 1.x CMP beans that do not have method permissions defined for some of the EJB methods, for Ensure all unprotected 1.x methods have the correct level of protection, specify if you want to leave such methods unprotected or assign protection with deny all access.
    Bind listeners for message-driven beans If your application contains message driven enterprise beans, for Bind listeners for message-driven beans, provide a listener port name or an activation specification JNDI name for every message driven bean.
    Map default data sources for modules containing 2.x entity beans If your application uses EJB modules that contain CMP beans that are based on the EJB 2.x specification, for Map default data sources for modules containing 2.x entity beans, specify a JNDI name for the default data source and the type of resource authorization to be used for the default data source for the EJB modules. You can optionally specify a login configuration name and authentication properties for the data source. When creating authentication properties, you must click OK to save the values and return to the mapping step. You can optionally specify extended data source properties to enable a data source that uses heterogeneous pooling to connect to a DB2 database. The default data source for EJB modules is optional if data sources are specified for individual CMP beans.
    Map data sources for all 2.x CMP beans If your application has CMP beans that are based on the EJB 2.x specification, on the Map data sources for all 2.x CMP beans page, for each of the 2.x CMP beans specify a JNDI name and the type of resource authorization for data sources to be used.

    You can optionally specify a login configuration name and authentication properties for the data source. When creating authentication properties, you must click OK to save the values and return to the mapping step. The data source attribute is optional for individual CMP beans if a default data source is specified for the EJB module that contains CMP beans. If a default data source for the EJB module and a data source for individual CMP beans are not specified, then a validation error is displayed after you click Finish and installation is canceled.

    Ensure all unprotected 2.x methods have the correct level of protection If your application contains EJB 2.x CMP beans that do not have method permissions defined in the deployment descriptors for some of the EJB methods, on the Ensure all unprotected 2.x methods have the correct level of protection page, specify whether you want to assign a specific role to the unprotected methods, add the methods to the exclude list, or mark them as deselected. Methods added to the exclude list are marked as uncallable. For methods marked deselected no authorization check is performed before their invocation.
    Provide options to perform the EJB Deploy

    [8.5.5.14 or later]The EJB deployment tool is deprecated.

    If the Deploy enterprise beans setting is enabled on the Select installation options page, then you can specify options for the EJB deployment tool on the Provide options to perform the EJB Deploy page. On this page, you can specify extra class paths, RMIC options, database types, and database schema names to be used while running the EJB deployment tool.

    You can specify the EJB deployment tool options on this page when installing or updating an application that contains EJB modules. The EJB deployment tool runs during installation of EJB 1.x or 2.x modules. The EJB deployment tool does not run during installation of EJB 3.x modules.

    Map shared libraries On the Shared library references and Shared library mapping pages, specify shared library files for your application or web modules to use. A defined shared library must exist to associate your application or module to the library file.
    Map shared library relationships On the Map shared library relationships page, specify relationship identifiers and composition unit names for shared libraries that modules in your enterprise application reference.

    When installing your enterprise application, the product creates a composition unit for each shared library relationship in the business-level application that you specified for Business-level application name on the Select installation options page.

    Provide JSP reloading options for web modules If your application uses web modules, for Provide JSP reloading options for web modules, configure the class reloading of JavaServer Pages (JSP) files.
    Map context roots for web modules If your application uses web modules that are defined in the application XML deployment descriptor, for Map context roots for web modules, specify a context root for each web module in the application.

    The product does not include web modules from annotations on this page.

    Initialize parameters for servlets If your application uses web modules that support Servlet 2.5, for Initialize parameters for servlets, specify or override initial parameters that are passed to the init method of web module servlet filters.

    This page shows servlets from the module XML deployment descriptor. Servlet deployment information from annotations is not available on this page.

    Map environment entries for EJB modules If your application uses EJB modules, for Map environment entries for EJB modules, configure the environment entries of EJB modules such as entity, session, or message driven beans.
    Map environment entries for client modules If you are deploying one or more application client modules, for Map environment entries for client modules, configure the environment entries of client modules that are deployed as JAR files. To view the Map environment entries for client modules page, select the Deploy client modules option on the Select installation options page.
    Map environment entries for web modules If your application uses web modules that support Servlet 2.5, for Map environment entries for web modules, configure the environment entries of web modules such as servlets and JSP files.
    Map environment entries for application level If your application defines one or more environment entries, for Map environment entries for application level, configure the environment entries of applications that are deployed as EAR files.
    Map resource environment entry references to resources If your application contains resource environment references, for Map resource environment entry references to resources, specify JNDI names of resources that map to the logical names defined in resource environment references. If each resource environment reference does not have a resource associated with it, after you click Finish a validation error is displayed.
    Correct use of system identity If your application defines Run-As Identity as System Identity, for Correct use of system identity, you can optionally change it to Run-As role and specify a user name and password for the Run As role specified. Selecting System Identity implies that the invocation is done using the WebSphere Application Server security server ID and should be used with caution as this ID has more privileges.
    Correct isolation levels for all resource references If your application has resource references that map to resources that have an Oracle database doing backend processing, for Correct isolation levels for all resource references, specify or correct the isolation level to be used for such resources when used by the application. Oracle databases support ReadCommitted and Serializable isolation levels only.
    Map JASPI Provider On the Map JASPI Provider page, if your application has web modules, you can specify values to override the JASPI settings from the global or domain security configuration. 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.
    Bind message destination references to administered objects If your application uses message driven beans, for Bind message destination references to administered objects, specify the JNDI name of the J2C administered object to bind the message destination reference to the message driven beans.

    If the message destination reference is from an EJB 3.0 or later module, then the JNDI name is optional and the run time provides a container default value.

    Attention: If multiple message destination references link to the same message destination, only one JNDI name is collected. When a message destination reference links to the same message destination as a message driven bean and the destination JNDI name has been collected already, the destination JNDI name for the message destination reference is not collected.
    Provide JNDI names for JCA objects If your application contains an embedded .rar file, for Provide JNDI names for JCA objects, specify the name and JNDI name of each JCA connection factory, administered object and activation specification.
    Bind J2C activationspecs to destination JNDI names If your application contains an embedded .rar file, its activationSpec property has the value Destination, and its introspected type is javax.jms.Destination, for Bind J2C activationspecs to destination JNDI names, specify the jndiName value for each activation bound to it.
    Select current backend ID If your application has EJB modules for which deployment code has been generated for multiple backend databases using an assembly tool, for Select current backend ID, specify the backend ID representing the backend database to be used when the EJB module runs.

    For information about backend databases, see topics on the EJB deployment tool.

    This step is not shown if the Deploy enterprise beans setting is enabled on the Select installation options page and if a database type other than None is specified on the Provide options to perform the EJB Deploy page.

    Metadata for modules If your application has EJB 3.x or Web 2.5 modules, you can lock deployment descriptors for one or more of the EJB 3.x or Web 2.5 modules. If you set the metadata-complete attribute to true and lock deployment descriptors, the product writes the complete module deployment descriptor, including deployment information from annotations, to XML format.
    Provide options to perform the web services deployment If the Deploy web services setting is enabled on the Select installation options page and your application uses web services, then you can specify wsdeploy command options on the Provide options to perform the web services deployment page. For information about this page, refer to descriptions of the wsdeploy -cp and -jardir options.
    Configure remote request dispatch properties If you are using a remote request dispatcher, you need to first configure it for use. Remote Request Dispatcher (RRD) is a pluggable extension to the web container that allows application frameworks, servlets, and JavaServer Pages to include content from outside of the currently running resource Java virtual machine (JVM) as part of the response sent to the client. Refer to Remote dispatcher property settings for information about where to configure these properties in the administration console.
    Display module build ID If the MANIFEST.MF file of a module in an enterprise application specifies a build identifier, this page shows the build identifier of the module.
  5. On the Summary page, verify the cell, node, and server onto which the application modules will install:
    1. Beside Cell/Node/Server, click Click here.
    2. Verify the settings.
    3. Return to the Summary page.
    4. Click Finish.

Results

Several messages are displayed, indicating whether your application file is installing successfully.

If Validate input off/warn/fail on the Select installation options page is set to warn, the default, several validation warnings might be displayed. If the setting is fail, the validation warnings might cause errors.

If you receive an OutOfMemory error and the source application file does not install, your system might not have enough memory or your application might have too many modules in it to install successfully onto the server. In this case, check the SystemOut.log, or SystemErr.log, and the first failure data capture (FFDC) log files of the machines that are involved in the error to determine which Java processes on which system experienced the error. On the system that experienced the exception, try increasing the maximum Java heap size by 256 megabytes. For more information, see the documentation about tuning the IBM virtual machine for Java. After adjusting the maximum Java heap size, try installing the application file again. Depending on the amount of the memory required for installing this application, you might need to increase the maximum heap size more than one time. If you reach the maximum heap size supported for your JVM and the problem still occurs, try packaging your application again so that it has fewer modules.

[z/OS]To install the application, use the application installation wizard in a Firefox 1.5 or later browser or use the wsadmin tool.

[z/OS]On z/OS® operating systems, application files larger than 10 megabytes might not install. When the application server protocol_http_large_data_inbound_buffer custom property is set to zero (0), the default, you cannot install application files larger than 10 megabytes. Set protocol_http_large_data_inbound_buffer to a value larger than the application file size. For example, if the EAR file that you want to install is 15 megabytes in size, set protocol_http_large_data_inbound_buffer to 20 megabytes:
  1. Click Servers > Server Types > WebSphere application servers > server_name > Server infrastructure > Administration > Custom properties.
  2. Set the protocol_http_large_data_inbound_buffer application server custom property to 20000000.
  3. Stop and restart the application server.
  4. Try installing the EAR file again.

What to do next

After the application file installs successfully, do the following:

  1. Save the changes to your configuration.

    For example, click the Save link in the application installation messages.

    The application is registered with the administrative configuration and application files are copied to the target directory, which is app_server_root/installedApps/cell_name by default or the directory that you designate.

    For a single-server product, application files are copied to the destination directory when the changes are saved.

    For a multiple-server product, files are copied to remote nodes when the configuration on the deployment manager synchronizes with the configuration on individual nodes.

    If you clicked the Save link in the application installation messages, the Preparing for the application installation page displays again. Click Applications > Application Types > WebSphere enterprise applications to exit the page and to see your application in the list of installed applications.

  2. Start the application.
  3. Test the application. For example, point a web browser at the URL for the deployed application and examine the performance of the application. If necessary, edit the application configuration.