Deploying data access applications

data access applications

Frequently, deploying data access applications involves more than installing your WAR or EAR file onto a server. Deployment can include tasks for configuring your application to use the data access resources of the server and overall run-time environment.

Before you begin

You can only deploy application code that is assembled into the appropriate modules. The topic Assembling data access applications provides guidelines for this process.

Perform the following steps if your application requires access to a relational database (RDB). If your 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 J2EE Connector Architecture resource adapters and Accessing data using J2EE Connector Architecture connectors.

  1. If your RDB configuration does not already exist:

    1. Create a database to hold the data.

    2. Create tables required by your application.

      If your application uses CMP entity beans to access the data

      You can create the tables using the data definition language (DDL) generated from the enterprise bean configuration. For more information, see Recreating database tables from the exported table data definition language .

      If your application uses BMP entity beans, or does not use entity beans

      You must use your database server interfaces to create the tables.
      You can also use the EJB to RDB Mapping wizard of an assembly tool to create your database tables for either type of entity bean. Select the top-down mapping option in the wizard. Keep in mind, however, that 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 you intend.

    3. Check Minimum required properties for vendor-specific data sources to see any database vendor requirements for connecting to an application server.

  2. If necessary, map your entity beans to the database tables through the meet-in-the-middle mapping option of an assembly tool. This step is necessary only if you did not create your 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 your application onto the application server. Consult Installing application files. When you install the application, you can alter data access settings that were made during application assembly, or set them for the first time if they were omitted from the assembly process. 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, or other resource objects, that provide database connectivity. For details on the concept of binding, see the Binding to a data source topic.

      Tip: After deployment, you can use the WebSphere Application Server administrative console to alter resource bindings. Click Applications > Enterprise Applications > application_name , and select the link to the appropriate mapping page. For example, if you want to alter the binding of an EJB module resource, you might click Map data sources for all 1.x CMP beans or Map data sources for all 2.x CMP beans . For a Web module resource, click Map resource references to resources .

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

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

  5. Save the changes to your 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.
Sub-topics
Version 6.0 Version 6.0.1 Version 6.0.2 Connector modules collection

Related concepts
Data sources
Resource adapter
Connection factory
J2EE Connector Architecture resource adapters
Looking up data sources with resource references for relational access
Binding to a data source

Related tasks
Accessing data using J2EE Connector Architecture connectors
Recreating database tables from the exported table data definition language
Creating or changing a resource reference
Mapping enterprise beans to database tables
Installing application files
Administering data access applications

Related reference
Vendor-specific data sources minimum required settings
Map resource references