Administer data access applications
These administrative tasks consist primarily of configuring the objects, or resources, through which applications connect with a backend, and tuning those resources to handle the volume of connection requests.
- If the application contains web modules or EJB modules that require access to a backend, configure resources according to your type of enterprise information system (EIS):
- For a relational database, follow the steps outlined in the topic, Configuring a JDBC provider and data source. For a DB2 database, the topic, Configuring an application to use pureQuery is another option. IBM Optim PureQuery Runtime provides an alternative to JDBC as a way to access the DB2 database.
- For a non-relational database, or another type of EIS such as the Customer Information Control System (CICS ), configure a resource adapter and connection factories. The topic, Accessing data using Java EE Connector Architecture connectors, provides information on setting up these objects.
When specified the JNDI name for resources, adhere to the following requirements:
- Do not assign duplicate JNDI names across different resource types (such as data sources versus J2C connection factories or JMS connection factories).
- Do not assign duplicate JNDI names for multiple resources of the same type in the same scope.
gotcha
- Configure an authentication alias for the new web module resource or EJB module resource only if the application code, rather than WebSphere Application Server, authenticates connections with the backend. This security configuration is called component-managed authorization, and is indicated in the application deployment descriptor as res-auth = Application.
Container-managed authorization, which is designated as res-auth = Container, indicates that Application Server performs signon for backend connections. The container-managed authentication alias must be specified on the application resource reference. This task can be done during application assembly or deployment, along with mapping the resource reference to a data source or connection factory resource. After application deployment, however, we can alter the container-managed authentication alias using the administrative console. Click Applications > WebSphere enterprise applications > application_name, and select the link to the appropriate mapping page. For example, to alter the alias of an EJB module resource, you might click Map data sources for all 2.x CMP beans. For a web module resource, click Resource References.
Read the J2EE connector security topic for detailed reference on resource authentication.
- If the application contains a client module that requires data access, see the topic, Configuring data access for application clients. In this single configuration process, we can define authentication data for either component-managed or container-managed signon.
- Specify connection pool settings.
- Test a connection to the new data source. See the article, Test connection service, for information on the available methods for testing connections. This article also addresses important data source settings that can affect the accuracy of the test connection results.
- Set the JDBC trace service. The JDBC trace log information augments the JVM log data for data source failures.
To activate the trace using the administrative console, read the topic, Enable trace at server startup.. Specify WAS.database as the trace group and select com.ibm.ws.db2.logwriter as the trace string.
- Gather connection pool statistics by activating the JDBC connection pool counters or the J2C connection pool counters. Alternatively, we can use Performance Monitoring Infrastructure (PMI) method calls to gather connection statistics; see the topic, Connection and connection pool statistics.
- (dist)(zos) Tune the resources to manage connection volume. See the topic, Data access tuning parameters.
- (iseries) Tune the database to accommodate the connection volume. If we use DB2 UDB for iSeries , see the topic, DB2 Universal Database performance tips, as a starting point reference.
(zos)
Results
If the z/OS application connects to a z/OS version of DB2 that serves multiple platform versions of WAS, the z/OS application might incur an EC3 dump during run time. To resolve the problem, set the CMTSTAT parameter to INACTIVE when you plan to run distributed workloads.Avoid trouble: For DB2 Version 7.0 on a z/OS system, the default value for CMTSTAT is ACTIVE. For DB2 v8.5 on a z/OS system, the default setting is set to INACTIVE.gotcha Distributed workloads are generally large. The CMTSTAT=INACTIVE setting triggers DB2 to free up resources to counteract the drain that can be caused by large workloads. DB2 will deactivate threads after the threads successfully commit or roll back database tasks and release cursors.
If we set CMTSTAT=INACTIVE, we might need to adjust the CONDBAT and MAXDBAT parameters as well. Try the following combination of values to maximize the performance of DB2 and minimize suspended connection requests:
- Set MAXDBAT to a low number, like 100, which DB2 can support as active threads. MAXDBAT indicates the maximum number of threads that can remain active at the same time and continue running tasks in DB2.
- Set CONDBAT to a high number, like 5000. CONDBAT indicates the maximum number of connection request threads that the DB2 server can receive. When you set CMTSTAT to INACTIVE, DB2 will deactivate many threads after fulfilling the initial connection requests. When the number of threads that require further processing reaches the MAXDBAT setting, DB2 can queue other threads until it can handle them.
Subtopics
- Configure Java EE Connector connection factories in the administrative console
To access an enterprise information system (EIS), configure connection factories, which instantiate resource adapter classes for establishing and maintaining resource connections.
- Establishing custom finder SQL dynamic enhancement server-wide
Enable support for dynamic SQL enhancement of all custom finders, defined in all beans, by modifying the custom properties of the application server in the administrative console.
- Establishing custom finder SQL dynamic enhancement on a set of beans
We can enable support for all custom finders defined on beans by modifying the application server's custom properties through the administrative console.
- CMP connection factories collection
Use this page to view existing container managed persistence (CMP) connection factories settings.
- Configure resource adapters
We can view a list of installed and configured resource adapters in the administrative console. Also, we can use the administrative console to install new resource adapters, create additional configurations of installed resource adapters, or delete resource adapter configurations.
- Update a stand-alone resource adapter archive
Use the resource adapter archive (RAR) update wizard to update the stand-alone RAR files to a newer version. The application server uses the classes and other code that comprise a resource adapter archive to support the resource adapters configured.
- Mapping resource manager connection factory references to resource factories
We can use the administrative console to bind the resource manager connection factory references to one of the configured resource factories.
- Manage messages with message endpoints
Manage message delivery for message-driven beans (MDB) that are deployed as message endpoints. The message endpoints are managed beans (MBeans) for inbound resource adapters that are compliant with Java EE Connector Architecture (JCA) Version 1.5.
- Configure a JDBC provider and data source
For access to relational databases, applications use the JDBC drivers and data sources configured for the application server.
- Configure connection validation timeout
We can configure a timeout for connection validation by the JDBC driver through a data source custom property in the data source configuration panels.
- Resource references
Use this page to designate how the resource references of application modules map to the actual resources configured for the application.
- Mapping-configuration alias
This panel allows you to select a mapping configuration alias for the resource that you are configuring. This panel is only available when security domains are defined. Security domains allow you to isolate mapping configuration aliases between servers. The tree view is useful in determining the security domain to which an alias belongs, and the tree view can help you determine the servers that will be able to access each authentication alias. The tree view is tailored for each resource, so domains and aliases are hidden when we cannot use them. For example, a cell-scoped security domain will be hidden from the tree if all servers and clusters in the tree have defined their own security domain. If we are looking for an alias that is not visible in the tree, it is because the alias cannot be used by any servers that have visibility to this resource. In this case, define the alias at the global scope or in a different security domain that is visible to this resource.
- Select a J2C authentication alias
Use this page to select a Java 2 Connector (J2C) authentication alias for the resource that you are configuring. This page is available only when at least one security domain is defined and assigned a scope that is applicable to the resource that is being edited. Additionally, that security domain must contain at least one JAAS J2C Authentication alias. Security domains isolate J2C authentication aliases between servers.
- Considerations for isolated resource providers
There are some design considerations that you should be aware of when working with resource providers that we have specified to be isolated in their own class loaders.
- Performing platform-specific tasks for JDBC access
This article provides miscellaneous tips for platform-specific tasks for JDBC access.
- Implicitly set client information
If we track client information in the database, we can choose one of two ways to pass WebSphere Application Server client data on database connections.
- Enable client information tracing with the administrative console
Use either of the methods outlined in this task to enable the passing and tracing of client information about a database connection.
- About Apache Derby
The Apache Derby package bundled with the application server is backed by full IBM Quality Assurance (QA).
- Manage resources through JCA lifecycle management operations
We can manage the run-time status of the data source and connection factory resources to perform some data access administrative tasks without restarting the application server. This topic outlines the process for managing those resources through the administrative console.
Related concepts
Relational resource adapters and JCA JDBC providers Data sources Java EE connector security Connection pooling
Related tasks
Access data using Java EE Connector Architecture connectors Install a resource adapter archive Configure data access for application clients using the assembly tool and ACRCT Performing platform-specific tasks for JDBC access
(iseries) Configure data access security
Passing client information to a database Configure JDBC providers to use pureQuery to access DB2 Enable trace at server startup
Application scoped resources Data source minimum required settings, by vendor Database performance tuning (zos) DB2 tuning tips for z/OS
(iseries) DB2 Universal Database performance tips
(dist)(zos) Data access tuning parameters
J2C connection pool counters