Configuring your application to use EIM

Before you configure your applications to use EIM, you will need to import an external connector resource archive (RAR) file into your workspace.
  1. From the IDE, select File > Import.
  2. Select J2EE > RAR file and click Next.
  3. In the Connector Import dialog, click Browse and navigate to C:\Program Files\IBM\SDP70Shared\plugins\com.ibm.etools.iseries.webtools.ae_<ver>\lib, where C:\IBM\SDP70Shared is the shared resources directory as specified in Installation Manager, and <ver> is the latest build identifier.
  4. Two versions of the JCA connector are shipped with Rational® Developer for System i™, version 7.1:
    • JCA version 1.5 connector should be used for connecting to WebSphere® Application Server, version 6.0 or later.
    • JCA version 1.0 connector can be used for WebSphere Application Server, versions 5.1 and 6.0. This connector has also been updated.

    Select the eimIdTokenRA.rar file (for JCA version 1.0) or the eimIdTokenRA.JCA15.rar file (for JCA version 1.5) and click Open to add it to the Connector Import dialog.

  5. Select your EAR project from the list.
    Note: Four RAR files are provided. eimIdTokenRA.JCA15.rar (or eimIdTokenRA.rar for JCA version 1.0) encapsulates eim.jar and facilitates deployment. idTokenRA.rar and idTokenRA.JCA15.rar do not contain eim.jar, and require the user to add it and configure the Server classpath.
  6. Click Finish to import the RAR file.

    Now configure the resource adapter to use the EIM domain created previously.

  7. Activate the Navigator view. (If the Navigator view is not visible, you can display it by selecting Window > Show View > Other > General > Navigator.) Expand the EAR folder for your project. Expand the META-INF directory, and double-click the EAR Deployment Descriptor file (application.xml).
  8. At the bottom of the editor area, click the Deployment tab and expand the Authentication section.
  9. Click Add to configure JAAS authentication for the LDAP administrator. Enter the user ID and password for this administrator and click OK.
  10. Expand the External J2C Options section.
  11. Click Add next to J2C Resource Adapters. The Create Resource Adapter dialog is displayed with the resource adapter name eimIdTokenRA (or emIdTokenRA.JCA15) in the Resource Adapter Name field. Click OK to close the dialog.
  12. Click Add next to J2C Connection Factories. The Create Connection Factory dialog is displayed.

  13. Enter a name for the connection factory.
  14. Enter a JNDI name for this connection factory in the JNDI name field (for example, eis/idTokenRoot).
  15. Set Max connections to 10.
  16. All other values in this dialog should remain at their default settings. Click OK to close the dialog.
  17. Click the newly created connection factory in the J2C connection factories list, and click Config Property. The Modify Configuration Property dialog opens.
  18. Under Resource Properties, enter the appropriate information to configure the connection factory. Some default settings are suggested below:
    • KeyTimeoutSeconds: Specifies a value, in seconds, before the key times out. Set this value to 1200.
    • KeySize: Indicates the size of the key, in bytes. Set this value to 512.
    • LdapHostName: The host name or IP address of the remote System i.
    • LdapHostPort: The port that the LDAP service runs on. Set this value to 389.
    • SourceRegistryName: The name for the source registry.
    • EimDomainName: The EIM domain name.
    • ParentDomain: The fully-qualified domain name for the parent domain, in pair=value separated format. For example, if the domain name for your parent domain is torasbcc.torolab.ibm.com, then the ParentDomain value would be dc=torasbcc,dc=torolab,dc=ibm,dc=com.
    • TrustStoreName: The path to the trust store file.
    • TrustStorePassword: The password for the trust store file.
    • KeyStoreName: The path to the key store file.
    • KeyStorePassword: The password for the key store file.

    Additional information on these settings is available in the WebSphere Application Server for i5/OS® documentation.

  19. Save and close the server configuration.
  20. In the Servers view, right-click the test server and select Restart to start it.
Related concepts
Deployment descriptor

Configuring authentication settings for your WebFacing application

If you are using the WebFacing Tool, configure authentication settings in the Run Time properties for your project. See Setting authentication options for more information on setting authentication options for WebFacing applications.

  1. To open your WebFacing project properties, right-click the project in the WebFacing Projects view, and select Properties. The host name in the project settings is the system containing the target registry.
  2. Click the Authentication tab to view the authentication settings.
  3. Click the Use single signon radio button.
  4. For this example, check the Specify EIM resource reference field and enter idTokenRR.
    Note: The string idTokenRR can be any string. It is used when mapping this resource reference to the actual adapter name configured in WAS. This string is case sensitive.
  5. Click OK to finish.

Adding a resource reference to the Web Deployment Descriptor

Now update the Web Deployment Descriptor for WebFacing applications.

  1. In the Navigator view, expand the Web project folder and double-click the Web Deployment Descriptor (web.xml) file in the WebContent\WEB-INF folder.
  2. Click the References tab at the bottom of the editor area to configure the resource references.
  3. Click Add and select Resource reference to specify the resource reference for the application.
  4. Click Next.
  5. In this example, type idTokenRR for the resource reference, select javax.jms.ConnectionFactory in the Type field, and select Container from the Authentication list.
  6. Click Finish.
  7. Under WebSphere Bindings, enter eis/idTokenRoot for the JNDI name. This is the name you specified when configuring EIM.
  8. Save and close the Web Deployment Descriptor file.

Feedback