Вы находитесь на странице: 1из 2

Data sources

Contents
Data sources
Installed applications use a data source to obtain connections to a relational database. A data source is analogous
to the Java Platform, Enterprise Edition (Java EE) Connector Architecture (JCA) connection factory, which
provides connectivity to other types of enterprise information systems (EIS).
A data source is associated with a JDBC provider, which supplies the driver implementation classes that are
required for JDBC connectivity with your specific vendor database. Application components transact directly with
the data source to obtain connection instances to your database. The connection pool that corresponds to each
data source provides connection management.
You can create multiple data sources with different settings, and associate them with the same JDBC provider. For
example, you might use multiple data sources to access different databases within the same vendor database
application. WebSphere

Application Server requires JDBC providers to implement one or both of the following
data source interfaces, which are defined by Sun Microsystems. These interfaces enable the application to run in
a single-phase or two-phase transaction protocol.
ConnectionPoolDataSource - a data source that supports application participation in local and global
transactions, excepting two-phase commit transactions. When a connection pool data source is involved in
a global transaction, transaction recovery is not provided by the transaction manager. The application is
responsible for providing the backup recovery process if multiple resource managers are involved.
Note: A connection pool data source does support two-phase commit transactions in these cases:
the data source is making use of Last participant support. Last participant support enables a single
one-phase commit resource to participate in a global transaction with one or more two-phase
commit resources.
the JDBC provider is DB2

for z/OS

Local JDBC provider (RRS).


For more information, consult the article, Using one-phase and two-phase commit resources in the same
transaction.
XADataSource - a data source that supports application participation in any single-phase or two-phase
transaction environment. When this data source is involved in a global transaction, the product transaction
manager provides transaction recovery.
Prior to version 5.0 of the application server, the function of data access was provided by a single connection
manager (CM) architecture. This connection manager architecture remains available to support Java 2 Platform,
Enterprise Edition (J2EE) 1.2 applications, but another connection manager architecture is provided, based on the
JCA architecture supporting the J2EE 1.3 application style, J2EE 1.4 and Java EE applications.
These architectures are represented by two types of data sources. To choose the right data source, administrators
must understand the nature of their applications, EJB modules, and enterprise beans.
Data source (WebSphere Application Server V4) - This data source runs under the original CM
architecture. Applications using this data source behave as if they were running in Version 4.0.
Data source - This data source uses the JCA standard architecture to provide support for J2EE version 1.3
and 1.4, as well as Java EE applications. It runs under the JCA connection manager and the relational
resource adapter.
Choice of data source
J2EE 1.2 application - all EJB 1.1 enterprise beans, JDBC applications, or Servlet 2.2 components must
use the 4.0 data source.
Data sources http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/advanced/print.jsp?topic...
1 of 2 3/9/2014 10:12 AM
J2EE 1.3 (and subsequent releases) application -
EJB 1.1 module - all EJB 1.x beans must use the 4.0 data source.
EJB 2.0 (and subsequent releases) module - enterprise beans that include container-managed
persistence (CMP) Version 1.x, 2.0, and beyond must use the new data source.
JDBC applications and Servlet 2.3+ components - must use the new data source.
Related concepts
Relational resource adapters and JCA
JDBC providers
Related tasks
Accessing data from application clients
Configuring a JDBC provider using the administrative console
Configuring a data source using the administrative console
Configuring a JDBC provider using wsadmin
Creating and configuring a JDBC provider and data source using the JMX API
Configuring data access for application clients using the assembly tool and ACRCT
Creating or changing a resource reference using the assembly tool
Assembling data access applications using the assembly tool
Deploying data access applications
Developing data access applications
Migrating applications to use data sources of the current Java EE Connector Architecture (JCA)
Configuring a JDBC provider and data source
Concept topic
Terms and conditions for information centers | Feedback
Last updated: Feb 6, 2014 3:12:08 AM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v700osgijpa&product=was-nd-mp&topic=datasor
File name: cdat_datasor.html
Data sources http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/advanced/print.jsp?topic...
2 of 2 3/9/2014 10:12 AM

Вам также может понравиться