Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Deploy applications
Install enterprise application files with the console
Install 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 installing enterprise application files, ensure that you are installing the 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. We 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.
To install new enterprise application files to a WAS configuration, you can use the following options:
- Administrative console
- wsadmin scripts
- Monitored directory deployment
- Application properties files
- Java MBean programs
- Java programs that call Java EE DeploymentManager (JSR-88) methods
This topic describes how to use the administrative console to install an application, EJB component, SAR, or web module. 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
- Click Applications > New application > New Enterprise Application
- On the first Prepare for application installation page:
- 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.
We can also specify a stand-alone WAR, SAR, or JAR file for installation.
(Windows) Avoid trouble: 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, use the WASService command to unregister the JVM from the Windows service. See the documentation about the WASService command.
- Click Next.
- On the second Preparing for application installation page:
- 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.
- 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.
We can customize default values used in generating default bindings. Prepare for application installation binding settings describes available customization and provides sample bindings.
- 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.
- Specify values for installation options as needed.
We 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.
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 to install the modules contained in the 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 JSP files setting is enabled on the Select installation options page and the application uses 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. We 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 the 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 the 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 the 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. We 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. We 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 WAS configuration before clicking Finish on the Summary page. Map virtual hosts for web modules If the 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 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:
- Select a role and click Lookup users or Lookup groups.
- On the Lookup users or groups page displayed, enter search criteria to extract a list of users or groups from the user registry.
- Select individual users or groups from the results displayed.
- 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 the 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 to leave such methods unprotected or assign protection with deny all access. Bind listeners for message-driven beans If the 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 the 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. We can optionally specify a login configuration name and authentication properties for the data source. When creating authentication properties, click OK to save the values and return to the mapping step. We 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 the 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. We can optionally specify a login configuration name and authentication properties for the data source. When creating authentication properties, 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 the 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 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 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. We 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 the application or web modules to use. A defined shared library must exist to associate the 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 specified for Business-level application name on the Select installation options page.
Provide JSP reloading options for web modules If the application uses web modules, for Provide JSP reloading options for web modules, configure the class reloading of JSP files. Map context roots for web modules If the 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 the 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 the 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 the 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 the 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 the 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 the 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 WAS security server ID and should be used with caution as this ID has more privileges. Correct isolation levels for all resource references If the 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 the 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 WAS global or domain security configuration, and web modules inherit the application setting. Bind message destination references to administered objects If the 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.
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 the 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 the 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 the 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 the 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 the 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 JSP 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 identifer, this page shows the build identifier of the module. - On the Summary page, verify the cell, node, and server onto which the application modules will install:
- Beside Cell/Node/Server, click Click here.
- Verify the settings.
- Return to the Summary page.
- Click Finish.
Results
Several messages are displayed, indicating whether the 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, the system might not have enough memory or the application might have too many modules in it to install successfully onto the server. If lack of system memory is not the cause of the error, package the application again so the .ear file has fewer modules.
If lack of system memory and the number of modules are not the cause of the error, check the options you specified on the Java virtual machine page of the application server running the administrative console. You might increase the maximum heap size. Then, try installing the application file again.
What to do next
After the application file installs successfully, do the following:
- Save the changes to the 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 WAS_HOME/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 dmgr 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 the application in the list of installed applications.
- Start the application.
- 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.
Related
Prepare for application installation settings
Prepare for application installation binding settings
Select installation options settings
Enterprise (Java EE) applications
Installable enterprise module versions
Application bindings
Manage shared libraries
Example: Installing an EAR file using the default bindings
Example: Installing a web services sample with the console
Assembling applications
Get started with wsadmin scripting
Manage applications through programming
Install enterprise applications using wsadmin.sh
Install enterprise modules with JSR-88
Configure an administered object for a third-party JCA resource adapter
Task overview: Assembling applications using remote request dispatcher
Troubleshoot deployment
Extend DB2 data source definitions at the application level
Related
wsdeploy command
Extended data source properties
Remote dispatcher property settings(Windows) WASService command