Program guide > (deprecated) Partitioning facility > Partitioning facility programming > Proxy DataSource development
Deprecated feature: The partitioning facility (WPF) feature is deprecated. You can configure partitioning with WebSphere eXtreme Scale.
Develop applications using proxy datasource support in WSAD
The ProxyDSAccountSample application contains one application client module and one enterprise bean module. The enterprise bean module, ProxyDSAccountSampleEJB, has four enterprise beans:
- Account: container-managed persistence (CMP) enterprise bean.
- AccountOwner: CMP enterprise bean. One Account CMP enterprise bean has one or more AccountOwner enterprise beans.
- AccountTransaction: This is a façade session bean to access CMP enterprise beans. It is also a partitioned routable session bean (PRSB).
- AccountPartitionBean: This is a partitioned stateless session bean (PSSB).
Accounts and account owners are stored in two databases. One is located in the west coast, and the other located in the east coast. The database in the west coast has database name westtest, and the database in the east coast has database name easttest. All the accounts stored in the westtest have a prefix W, and all the accounts stored in the easttest have a prefix E.
When the façade AccountTransaction gets a request from the client to perform account operations, it examines the accountId. If the accountId starts with W, the database westtest will be used. If the accounted starts with E, the database easttest will be used.
In this scenario, a Java™ Platform, Enterprise Edition application is developed that uses proxy datasoure features in WebSphere Studio Application Developer (WSAD). Although this development scenario is described with WSAD, it applies when using Rational Application Developer (RAD) v6.0 as well. The purpose is to develop the ProxyDSAccountSample that is packaged with WebSphere eXtreme Scale. The ProxyDSAccountSample is contained in the <WAS_install_root>/installableApps/ProxyDSAccountSample.ear file. Before beginning, extract all the source codes from this EAR file. You will copy the source codes to complete the exercise.
- Create ProxyDSAccountSample project
- Create entity EJBs Account and AccountOwner
- Create PRSB AccountTransaction
- Create PSSB AccountPartitionBean
- Set the classpath
- Set the connection factory for the CMP EJBs
- Configure the resource references for the session bean
Parent topic:Partitioning facility programming
Partitioning facility programming
Create ProxyDSAccountSample project