Program guide > (deprecated) Partitioning facility > Partitioning facility programming > Proxy DataSource development > Develop applications using proxy datasource support in WSAD


Deprecated feature: The partitioning facility (WPF) feature is deprecated. You can configure partitioning with WebSphere eXtreme Scale.


Create entity EJBs Account and AccountOwner


About this task

To simplify the sample, you use two entity beans: Account and AccountOwner. There is a one to many relationship between Account and AccountOwner.

  1. Use WebSphere Studio Application Developer (WSAD) V5.1, select File > New > Enterprise Bean to create a Container-managed persistence (CMP) enterprise bean. Although the steps are described using WebSphere Studio Application Developer, most steps should work using Rational Application Developer.

  2. Type ProxyDSAccountSampleEJB for the project name, then click Next.

  3. Configure the bean.

    1. Select the field Entity bean with container-managed persistence (CMP).

    2. Select CMP 2.0 Bean.

    3. Enter Account as the Bean name, and com.ibm.websphere.proxyds as the Default package.

  4. Click Next.

  5. Provide further configuration for the bean.

    1. Select local client view.

    2. Deselect remote client view.

  6. Create four CMP attribute fields.

    1. Create accountId. accountID is a String the key field.

    2. Create balance. balance is type Double.

    3. Create creationData. creationData is type java.sql.Timestamp.

    4. Create openBalance. openBalance is type Double.

  7. Click Finish.

  8. Repeat step six to create CMP EJB AccountOwner.

    1. Create ssn. ssn is type String and the key field.

    2. Create name. name is type String.

    3. Create address. address is type String.

    4. Create phone. phone is type String.

  9. You can create a one-to-many relationship between Account and AccountOwner.

    1. Click the Beans tab on the right panel.

    2. Select Account from the Beans list.

    3. Scroll down to the Relationships list, then click Add.

    4. Select Account and AccountOwner as the source EJB.

    5. Click Next.

    6. Select Many for the Multiplicity for role account, then check cascade delete for role account. Leave others as default.

    7. Click Finish.


Parent topic:

Develop applications using proxy datasource support in WSAD


Related concepts

Develop applications using proxy datasource support in WSAD


+

Search Tips   |   Advanced Search