Applications that use Container-Managed Persistence (CMP) beans normally
specify a single database to use with one CMP enterprise bean. All the CMP
enterprise bean instances of one type will read and write to one database
node, which will become the performance bottleneck. You could deploy the CMP
beans N times, once for each database. However, this is not very flexible
for the following reasons:
- Requires N copies of the code with N JNDI names, etc.
- Requires a deploy step when a database is added.
- It is not easy to manage.
WebSphere Extended Deployment has a feature that allows the application
to tell WebSphere which datasource to use before the transaction starts. When
a cluster member receives a request for a particular application partition,
then it communicates to the CMP runtime to use a specific data source for
the duration of the current transaction. This allows the directed transaction
pattern to be used with the application. Also, such applications can increase
their availability, and it allows the database tier to scale horizontally
on blade type environments. The applications can also take advantage of the
MAPPER table pattern to very flexibly manage data and move partitions around
to better manage the operational aspects of an application, such as how to
move a very busy partition to a lightly loaded database node for performance
reasons.
WebSphere Extended Deployment Version 6.0 supports DB2 UDB and Oracle with
the proxy datasource. The supported JDBC drivers are:
- DB2 legacy CLI-based JDBC drivers.
- DB2 Universal type 2 JDBC drivers.
- DB2 Universal type 4 JDBC drivers.
- Oracle 9i thin client JDBC drivers
Refer to the WebSphere Application Server Version 6.0.2 document for
supported JDBC driver levels. If you need support for other databases or JDBC
drivers, contact IBM support for more details. In WebSphere Extended Deployment
Version 6.0, a new Proxy DataSource model is offered. The Proxy DataSource
model introduced in WebSphere Extended Deployment Version 5.1 is renamed to
5.1
Proxy DataSource in Version 6.0 and is deprecated. Users are strongly
recommended to use the new Proxy DataSource in 6.0. As a result, the example
presented in this section will use only the 6.0 programming model.