+

Search Tips   |   Advanced Search

Deploy data access (EJB) applications

Deploying a data access application includes more than installing the web application archive (WAR) or EAR file onto a server. Deployment can include tasks for configuring the application to use the data access resources of the server and overall runtime environment.

We can deploy only application code that is assembled into the appropriate modules.

Perform the following steps if the application requires access to a relational database (RDB). When the application requires access to a different type of enterprise information system (EIS), such as an object-oriented database or the Customer Information Control System (CICS ), consult the topics, Relational resource adapters and JCA, and Accessing data using JCA connectors.


Tasks

  1. If our RDB configuration does not exist, do the following steps:

    1. Create a database to hold the data.

    2. Create tables required by the application.

      The EJB to RDB Mapping wizard of an assembly tool is also used to create the database tables for either type of entity bean. Select the top-down mapping option in the wizard. However, this option does not give you direct control in naming the RDB elements or choosing column types. Additionally, because the top-down process is automatic, it might not provide mappings to reflect the precise relationships that we intend.

    3. Check the data source minimum required settings by vendor.

  2. Optional: Map entity beans to the database tables through the meet-in-the-middle mapping option of an assembly tool.

    Complete this step only if we did not create the database schema through the top-down mapping option, did not generate your mapping relationships through bottom-up mapping, or did not generate mappings during the application assembly process.

  3. Install the application onto the application server.

    When we install the application, we can alter data access settings that were made during application assembly, or, if they were omitted from the assembly process, set them for the first time. These settings include resource bindings and resource authentication aliases, which are addressed in the following substeps:

    1. Bind application resource references to the data sources

      After deployment, we can use the WAS administrative console to alter resource bindings.

      For example, for a web module resource

        Applications > Application Types > Webphere enterprise applications > application_name > Resource references

    2. Define authentication alias data for resources that must be authenticated with the backend through container-managed authorization. In this security configuration, WAS performs EIS signon for data source or connection factory connections. Consult the topic, J2EE connector security for detailed reference on resource authentication.

  4. Start the deployed application files using the administrative console, the wsadmin scripting tool startApplication command, or our own Java program.

  5. Save the changes to the administrative configuration.
  6. Test the application. For example, point a web browser at the URL for a deployed application and examine the performance of the application.


IBM i DB considerations

When we deploy an application that uses a DB2 UDB for IBM i back-end database, we might find the following exception in the SystemOut.log file:

This type of error indicates that we deployed an application with container-managed persistence (CMP) enterprise beans that were originally configured to access a DB2 database on Windows, Linux, or a supported UNIX system. Using the administrative console, uninstall the affected CMP applications, then reinstall the applications with the new database setting. Remember to select Deploy enterprise beans; on the EJB deploy panel, select the appropriate version of our DB2 UDB for IBM i database.


Subtopics


Related:

  • Data sources
  • Data source lookups for enterprise beans and web modules
  • Relational resource adapters and JCA
  • Resource reference benefits
  • Java EE connector security
  • Use High Performance Extensible Logging to troubleshoot applications
  • Create or change a resource reference
  • Install enterprise application files
  • Assemble applications
  • Administer data access applications
  • Assemble data access (EJB) applications
  • Accessing data using Java EE Connector Architecture connectors
  • Recreating database tables from the exported table data definition language
  • Data source minimum required settings, by vendor
  • Resource references
  • Rational Application Developer documentation