Prepare for application installation binding settings


 

+

Search Tips   |   Advanced Search

 

To select whether to view all installation options and to change the existing bindings for you application or module during installation. We can chose to generate default bindings for any incomplete bindings in the application or module or to assign specific bindings during installation.

This page is the second Preparing for the application installation page.

To view this admin console page, click...

Applications | New application | New Enterprise Application

Specify the path for the application or module to install, and then click Next.

The console page might not display all of the binding options listed in this topic. The contents of the application or module that we are installing determines which options are displayed on the console page. Also, the Specify bindings to use option displays only when updating an installed application.

How do you want to install the application?

Whether to show only installation options that require you to supply information or to show all installation options.

Option Description
Fast Path - Prompt only when additional information is required Displays only those options that require the attention, based on the contents of the application or module. Use the fast path to install the application more because you do not need to examine all available installation options.
Detailed - Show all installation options and parameters Displays all available installation options.

Specify bindings to use

Whether to merge bindings when you update applications or to use new or existing bindings.

This setting is shown only when you update an installed application, and not when you install a new application.

Option Description
Merge new and existing bindings Keeps the existing binding values of the installed application and adds new binding values in the updated application for incomplete bindings. Use merge if the updated application has binding values that differ from values specified for the installed application. WAS ND v7.0 assigns binding values in the following order:

  1. Use existing binding values in the installed application.

  2. If the installed application does not have a binding value, use the new binding value.

  3. If both the installed application and the updated application do not have a binding value, use the default value. WAS ND v7.0 assigns a default value only if we select Generate default bindings.
Use new bindings Uses binding values in the updated application. Does not use existing binding values in the installed application.
Use existing bindings Uses existing binding values in the installed application. Does not use binding values in the updated application.

Generate default bindings

Whether to generate default bindings and mappings. To view this setting, expand Choose to generate default bindings and mappings. If we select Generate default bindings, then WAS completes any incomplete bindings in the application with default values. WAS ND v7.0 does not change existing bindings.

After you select Generate default bindings, we can advance directly to the Summary step and install the application if none of the steps have a red asterisk (*). A red asterisk denotes that the step has incomplete data and requires a valid value. On the Summary panel, verify the cell, node, and server on which the application is installed.

For transitioning users: You do not need to specify JNDI values for EJB bean, local home, remote home, or business interfaces of EJB 3.0 modules. WAS ND v7.0 assigns container default values during run time. Similarly, for any EJB reference within an EJB 3.0, Web 2.4, or Web 2.5 module, you do not need to specify JNDI values because WAS resolves the targets automatically during run time. Even when you select Generate default bindings, WAS does not generate default values for those JNDI values but it does generate default values for other bindings such as virtual host.

If we select Generate default bindings, WAS ND generates bindings as follows:

  • EJB JNDI names are generated in the form...

    prefix/ejb-name

    The default prefix is ejb, but can be overridden. The ejb-name is as specified in the deployment descriptors <ejb-name> tag or in its corresponding annotation for EJB 3.0 modules. WAS ND v7.0 does not generate default values for enterprise beans in an EJB 3.0 module because the run time provides container default values.

  • EJB references are bound if an <ejb-link> is found. Otherwise, if a unique enterprise bean is found with a matching home (or local home) interface as the referenced bean, the reference is resolved automatically.

    WAS ND v7.0 does not generate default values for EJB reference in an EJB 3.0, Web 2.4, or Web 2.5 module because the run time provides container default values or automatically resolves the target references.

  • Resource reference bindings are derived from the <res-ref-name> tag or its corresponding annotation for Java EE 5 modules.

    This action assumes that the name...

    java:comp/env name

    ...is the same as the resource global JNDI name.

  • Connection factory bindings for EJB 2.0 and EJB 2.1 JAR files are generated based on the JNDI name and authorization information provided.

    This action results in default connection factory settings for each EJB 2.0 and EJB 2.1 JAR file in the application being installed. No bean-level connection factory bindings are generated.

  • Data source bindings for EJB 1.1 JAR files are generated based on the JNDI name, data source user name password options.

    This action results in default data source settings for each JAR file. No bean-level data source bindings are generated.

  • For EJB 2.0 or later message-driven beans deployed as JCA 1.5-compliant resources, the JNDI names corresponding to activationSpec instances are generated in the form...

    eis/MDB_ejb-name

    Message destination references are bound if a <message-destination-link> is found, then the JNDI name is set to ejs/message-destination-linkName. Otherwise, the JNDI name is set to eis/message-destination-refName.

  • For EJB 2.0 or later message-driven beans deployed against listener ports, the listener ports are derived from the message-driven bean <ejb-name> tag with the string Port appended.

  • For .war files, the virtual host is set as default_host unless otherwise specified.

The default strategy suffices for most applications or at least for most bindings in most applications. However, if we experience errors...

  • Control the global JNDI names of one or more EJB files.

  • Control data source bindings for CMP beans. That is, we have multiple data sources and need more than one global data source.

  • Map resource references to global resource JNDI names that are different from the java:comp/env name.

In such cases, we can change the behavior with an XML document, which is a custom strategy. Use the Specific bindings file setting to specify a custom strategy and see the setting description in this help file for examples.

Override existing bindings

Whether generated bindings are to replace existing bindings.

The default is to not override existing bindings. Select Override existing bindings to have generated bindings replace existing bindings.

Override existing bindings is similar to the -defaultbinding.force scripting option.

Specific bindings file

Bindings file that overrides the default binding.

Specific bindings file is similar to the -defaultbinding.strategy.file scripting option.

Change the behavior of the default binding with an XML document, which is a custom strategy. Custom strategies extend the default strategy so you only need to customize those areas where the default strategy is insufficient. Thus, you only need to describe how you want to change the bindings generated by the default strategy; you do not have to define bindings for the entire application.

Use the following examples to override various aspects of the default bindings generator:

Controlling an EJB JNDI name...

<?xml version="1.0"?>
<!DOCTYPE dfltbndngs SYSTEM "dfltbndngs.dtd">
<dfltbndngs>
  <module-bindings>
    <ejb-jar-binding>
      <jar-name>helloEjb.jar</jar-name>
      <ejb-bindings>
        <ejb-binding>
         <ejb-name>HelloEjb</ejb-name>
         <jndi-name>com/acme/ejb/HelloHome</jndi-name>
        </ejb-binding>
      </ejb-bindings>
    </ejb-jar-binding>
  </module-bindings>
</dfltbndngs>

Remember: Verify the setting for <ejb-name> matches the ejb-name entry in the EJB JAR deployment descriptor. Here the setting is...

<ejb-name>HelloEjb</ejb-name>

Set the connection factory binding for an EJB JAR file

<!DOCTYPE dfltbndngs SYSTEM "dfltbndngs.dtd">
<dfltbndngs>
  <module-bindings>
    <ejb-jar-binding>
      <jar-name>yourEjb20.jar</jar-name>
      <connection-factory>
        <jndi-name>eis/jdbc/YourData_CMP</jndi-name>
        <res-auth>Container</res-auth>
      </connection-factory>
    </ejb-jar-binding>
  </module-bindings>
</dfltbndngs>

Set the connection factory binding for an EJB file

<?xml version="1.0">
<!DOCTYPE dfltbndngs SYSTEM "dfltbndngs.dtd">
<dfltbndngs>
  <module-bindings>
    <ejb-jar-binding>
      <jar-name>yourEjb20.jar</jar-name>
      <ejb-bindings>
        <ejb-binding>
          <ejb-name>YourCmp20</ejb-name>
          <connection-factory>
           <jndi-name>eis/jdbc/YourData_CMP</jndi-name>
           <res-auth>PerConnFact</res-auth>
          </connection-factory>
        </ejb-binding>
      </ejb-bindings>
    </ejb-jar-binding>
 </module-bindings>
</dfltbndngs>

Restriction: Verify the setting for <ejb-name> matches the ejb-name tag in the deployment descriptor. Here the setting is <ejb-name>YourCmp20</ejb-name>.

Set the message destination reference JNDI for a specific enterprise bean. This example shows an XML extract in a custom strategy file for setting message-destination-refs for a specific enterprise bean.

<?xml version="1.0">
 <!DOCTYPE dfltbndngs SYSTEM "dfltbndngs.dtd">
 <dfltbndngs>
  <module-bindings>
   <ejb-jar-binding>
    <jar-name>yourEjb21.jar</jar-name>
    <ejb-bindings>
     <ejb-binding>
      <ejb-name>YourSession21</ejb-name> 
      <message-destination-ref-bindings>
       <message-destination-ref-binding>
        <message-destination-ref-name>jdbc/MyDataSrc</message-destination-ref-name>
        <jndi-name>eis/somAO</jndi-name>
       </message-destination-ref-binding>
      </message-destination-ref-bindings>
     </ejb-binding>
    </ejb-bindings>
   </ejb-jar-binding>
  </module-bindings>
 </dfltbndngs>

Restriction: Verify the setting for <ejb-name> matches the ejb-name tag in the deployment descriptor. Here the setting is <ejb-name>YourSession21</ejb-name>. Also ensure that the setting for <message-destination-ref-name> matches the message-destination-ref-name tag in the deployment descriptor. Here the setting is <message-destination-ref-name>jdbc/MyDataSrc</message-destination-ref-name>.

This example shows code for overriding a resource reference binding from a WAR file. Use similar code to override a resource reference binding from an EJB JAR file or a Java EE client JAR file...

<?xml version="1.0"?>
<!DOCTYPE dfltbndngs SYSTEM "dfltbndngs.dtd">
<dfltbndngs>
  <module-bindings>
    <war-binding>
      <jar-name>hello.war</jar-name>
      <resource-ref-bindings>
        <resource-ref-binding>
          <resource-ref-name>jdbc/MyDataSrc</resource-ref-name>
          <jndi-name>war/override/dataSource</jndi-name>
        </resource-ref-binding>
      </resource-ref-bindings>
    </war-binding>
  </module-bindings>
</dfltbndngs>

Restriction: Verify the setting for <resource-ref-name> matches the resource-ref tag in the deployment descriptor. In the previous example, the setting is <resource-ref-name>jdbc/MyDataSrc</resource-ref-name>.

This example shows an XML extract in a custom strategy file for overriding the JMS activationSpec JNDI name for an EJB 2.0 or later message-driven bean deployed as a JCA 1.5-compliant resource.

<?xml version="1.0"?>
 <!DOCTYPE dfltbndngs SYSTEM "dfltbndngs.dtd">
  <dfltbndngs>
  <module-bindings>
   <ejb-jar-binding>
     <jar-name>YourEjbJar.jar</jar-name>
     <ejb-bindings>
      <ejb-binding>
        <ejb-name>YourMDB</ejb-name>
        <activationspec-jndi-name>activationSpecJNDI</activationspec-jndi-name>
      </ejb-binding>
     </ejb-bindings>
   </ejb-jar-binding>
  </module-bindings>
 </dfltbndngs>

This example shows an XML extract in a custom strategy file for overriding the JMS listener port name for an EJB 2.0 or later message-driven bean deployed against a listener port.

<?xml version="1.0"?>
<!DOCTYPE dfltbndngs SYSTEM "dfltbndngs.dtd">
<dfltbndngs>
  <module-bindings>
    <ejb-jar-binding>
      <jar-name>YourEjbJar.jar</jar-name>
      <ejb-bindings>
        <ejb-binding>
          <ejb-name>YourMDB</ejb-name>
          <listener-port>yourMdbListPort</listener-port>
        </ejb-binding>
      </ejb-bindings>
    </ejb-jar-binding>
  </module-bindings>
</dfltbndngs>

This example shows code for overriding an EJB reference binding from an EJB JAR file. Use similar code to override an EJB reference binding from a WAR file or an EJB file.

<?xml version="1.0"?>
<!DOCTYPE dfltbndngs SYSTEM "dfltbndngs.dtd">
<dfltbndngs>
  <module-bindings>
    <ejb-jar-binding>
      <jar-name>YourEjbJar.jar</jar-name>
      <ejb-ref-bindings>
        <ejb-ref-binding>
          <ejb-ref-name>YourEjb</ejb-ref-name>
          <jndi-name>YourEjb/JNDI</jndi-name>
        </ejb-ref-binding>
      </ejb-ref-bindings>
    </ejb-jar-binding>
  </module-bindings>
</dfltbndngs>

Specify unique prefix for beans

String that WAS applies to the beginning of generated enterprise bean JNDI names. The prefix must be unique within the cell or node.

The default is to not specify a unique prefix for beans.

Specify unique prefix for beans is similar to the scripting option -defaultbinding.ejbjndi.prefix.

Default bindings for EJB 1.1 CMP beans

Default data source JNDI name and other bindings for container-managed persistence (CMP) 1.1 beans.

The default is to not use default bindings for EJB 1.1 CMP beans.

If we select Default bindings for EJB 1.1 CMP beans, specify the JNDI name for the default data source to be used with the CMP 1.1 beans. Also specify the user name and password for this default data source.

Default bindings for EJB 1.1 CMP beans is similar to the scripting option -defaultbinding.datasource.jndi.

Default connection factory bindings

Default connection factory JNDI name.

The default is to not use default connection factory bindings. Select Default connection factory bindings to specify bindings for connection factories.

If we select Default connection factory bindings, specify the JNDI name for the default connection factory to be used. Also specify whether the resource authorization is for the application or container-wide.

Default connection factory bindings is similar to the scripting option -defaultbinding.cf.jndi.

Use default virtual host name for Web and SIP modules

Virtual host for the Web module (WAR file) or Session Initiation Protocol (SIP) module (SAR file).

The default is to not use default virtual host name for Web or SIP modules. If we select Use default virtual host name for Web and SIP modules, specify a default host name.

Use default virtual host name for Web and SIP modules is similar to the scripting option -defaultbinding.virtual.host.





Related concepts


Application bindings
Enterprise (Java EE) applications

 

Related tasks

Example: Installing an EAR file using the default bindings
Install enterprise application files with the console

 

Related information

Preparing for application installation settings