Adding resource adapters and connection factories to a WebSphere Application Server v6.0

Resource adapters are sets of related classes that let an application access a resource such as data, or an application on a remote server, often called an Enterprise Information System (EIS). When working with J2EE Connector (J2C) resource adaptors, formerly known as J2EE Connector Architecture (JCA), you have to add an instance of the J2C connection factory and configure its properties.

The connection factory provides connections to the EIS on demand. You specify all the information needed by the resource adapter to connect to the particular instance of the EIS. You also specify the JNDI lookup name under which the new connection factory instance will be available to components. With this lookup name, the components can quickly make a connection to the EIS.  You can add resource adapters and connection factories on WebSphere® Enhanced EAR editor. The WebSphere Enhanced EAR editor is the Deployment page in the Application Deployment Descriptor editor.

Prerequisite steps:
  • Create an enterprise application and target the server to WebSphere Application Server v6.0.
  • Create or import a connector project set at J2C (formerly known as JCA) v1.0 in your workspace.
    Restriction: You can not add connector projects set at J2C v1.5 using the Deployment page of the WebSphere Enhanced EAR editor.

Steps for this task:

To add a connection factory to a WebSphere Application Server v6.0 server, complete the following steps:
  1. Switch to the J2EE perspective.
  2. In the Project Explorer view, expand the Enterprise Applications folder.
  3. Under the enterprise application project folder for which you want to add your resource adaptors and connection factories, double-click the Deployment Descriptor to open the Application Deployment Descriptor editor.
  4. Before adding or removing J2EE modules, using the Module page in the Application Deployment Descriptor editor, first click the Deployment tab to activate the functions in the deployment page. Then add or remove your modules from the Module page. You need to complete this task for each Application Deployment Descriptor editor session that you want to add or remove modules from the Module page.
  5. Add the connector project to your enterprise application.
    1. Select the Module tab at the bottom of the editor.
    2. In the Module section, click the Add button. The Add Module wizard opens.
    3. Under the Projects Found list, select the connector project you want to add to the server and click the Finish button.
  6. Select the Deployment tab at the bottom of the Application Deployment Descriptor editor.
  7. Expand the J2C Options section. Under the J2C Resource Adapter list table, you may find additional connector projects. These additional connector projects are supplied from the WebSphere Application Server. You can safely ignore these default connector projects.
  8. Click the Add button beside the J2C Resource Adapters list table.
    Tip: If the Add button is not enabled, you need to add your connector project to your enterprise application, as described in the previous step.
  9. Create a resource adaptor.
    1. In the Create Resource Adapter wizard, select the name of your J2EE resource adapter that you want to create from the Resource Adapter name drop-down list.
    2. In the Native path field, specify a list of paths which forms the location for the resource provider native libraries.
    3. Click OK.
  10. Create a J2C Connection Factory.
    1. To add a J2C connection factory to your previously created resource adaptor, you need to select your resource adapter under the J2C Resource Adapters table, and click the Add button beside the J2C Connection Factories table. The Create Connection Factory wizard opens.
    2. In the Create Connection Factory dialog box, enter a name, a JNDI name for the connection factory and any other values you want for the connection factory. Click OK.
    Field Description
    Name Specify the name of the J2C connection factory
    JNDI name Specifies the JNDI name of this connection factory. For example the name might be eis/myECIConnection.
    Description (Optional) Specifies a text description of this connection factory.
    Minimum connections (Optional) Specifies the minimum number of physical connections to be maintained.
    Maximum connections (Optional) Specifies the maximum number of physical connections that can be created.
    Connection timeout (Optional) Specifies the interval, in seconds, after which a connection request times out and an exception is thrown.
    Reap time (Optional) Specifies the interval, in seconds, between runs of the pool maintenance thread.
    Unused timeout (Optional) Specifies the interval, in seconds, after which an unused or idle connection is discarded. Set the Unused Timeout value higher than the Reap Time value for optimal performance.
    Aged timeout (Optional) Specifies the interval in seconds before a physical connection is discarded. Set the Aged Timeout value higher than the Reap Time value for optimal performance.
    Purge Policy (Optional) Specifies how to purge connections when a stale connection or fatal connection error is detected.
    Container-managed authentication alias (Optional) References an authentication data entry in the JAAS configuration that is to be used for applications with authentication that is managed by the container.
    Component-managed authentication alias (Optional) References an authentication data entry in the JAAS Configuration that is to be used for applications with authentication that is managed by the application.
    Mapping configuration alias (Optional) Specify the alias used for the mapping configuration.
  11. In the Resource Properties table enter the connection properties. For instance, for CICS® you may enter the URL of your EIS transaction gateway, the name of your EIS server and any other required properties in the Value fields.
  12. Close the editor and click Yes to save the changes.
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.