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.
Tasks
- 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. If we are using 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 we specify 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.
- 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, we 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 our 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, Enabling 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.
- 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)
If our 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 we plan to run distributed workloads.
For DB2 Version 7.0 on a z/OS system, the default value for CMTSTAT is ACTIVE. For DB2 v9.0 on a z/OS system, the default setting is set to INACTIVE. 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 AXDBAT 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 your DB2 server can receive. When we 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 default resources
Use the administrative console or wsadmin commands to configure bindings for Java EE default resources.- 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.- Establish 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.- Establish 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
View existing container managed persistence (CMP) connection factories settings.- CMP connection factory settings
View the settings of a connection factory used by a container-managed persistence (CMP) bean to access any database server. Because the connection factory is created and managed automatically, the settings of the connection factory cannot be modified.- 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 that we configure.- Mapping resource manager connection factory references to resource factories
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) 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.- 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 we are configuring. This panel is only available when security domains are defined. Security domains allow us 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
Select a Java 2 Connector (J2C) authentication alias for the resource that we 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 being used 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 we 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 WAS 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 that is 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 our 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.- Configure Java EE default resources
Use the administrative console or wsadmin commands to configure bindings for Java EE default resources.- 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.- Establish 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.- Establish 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
View existing container managed persistence (CMP) connection factories settings.- CMP connection factory settings
View the settings of a connection factory used by a container-managed persistence (CMP) bean to access any database server. Because the connection factory is created and managed automatically, the settings of the connection factory cannot be modified.- 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 that we configure.- Mapping resource manager connection factory references to resource factories
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) 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.- 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 we are configuring. This panel is only available when security domains are defined. Security domains allow us 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
Select a Java 2 Connector (J2C) authentication alias for the resource that we 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 being used 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 we 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 WAS 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 that is 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 our 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:
Relational resource adapters and JCA JDBC providers Data sources Java EE connector security Connection pooling Accessing data using Java EE Connector Architecture connectors Install a resource adapter archive Configure data access for application clients using the assembly tool and ACRCT Perform 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 DB2 tuning parameters (ZOS) DB2 tuning tips for z/OS (iSeries) DB2 Universal Database performance tips Data access tuning parameters J2C connection pool counters