WebSphere Extended Deployment, Version 6.0.x
             Operating Systems: AIX, HP-UX, Linux, Solaris, Windows


Configure the resource references for the session bean

About this task

The session bean creates the resource references for the datasources, which the Container-Managed Persistence (CMP) enterprise bean uses through the proxy datasource, then specifies the datasource used in the transactions.

The CMP EJB will use two DB2 datasources, one to access west coast database westtest, and the other to access east coast database easttest. Therefore, we need to create two datasource references for the session bean AccountTransaction.

Procedure

  1. Select AccountTransaction from the beans list on the References tab of the EJB deployment descriptor.
  2. Click Add....
  3. Select Resource reference from the panel and then click Next.
    1. Define the Name as jdbc/myDS1.
    2. Define the Type as javax.sql.Datasource.
    3. Define the Authentication as Container.
    4. Define the Sharing scope as Shareable.
    5. Click Finish.
  4. Repeat the previous step to create a resource reference jdbc/myDS2.
  5. Repeat the previous step to create a resource reference jdbc/proxyds.

Results

Now, you have created two resource references for the session bean AccountTransaction.

What to do next

On the references panel, set the WebSphere binding for jdbc/myDS1 to jdbc/WestDS, set the WebSphere binding for jdbc/myDS2 to jdbc/EastDS, and set the WebSphere binding for jdbc/proxyds to jdbc/dsSampleDSProxy.



Related concepts
Developing applications using proxy datasource support in WSAD
Task topic    

Terms of Use | Feedback

Last updated: Nov 30, 2007 4:03:08 PM EST
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r0/index.jsp?topic=/com.ibm.websphere.xd.doc/info/WPF51/twpfconfiguresessionbeanrefs.html