[IBM i]

Automatically configuring the connection factory

You can use the cfgIdToken.jacl script to automatically configure the Java™ 2 Connector (J2C) authentication data, the resource adapter, and the connection factory.

Before you begin

Configure the eim.jar and jt400.jar files.

About this task

After you configure the eim.jar and the jt400.jar files, you can choose to manually or automatically configure the connection factory. If you choose to manually configure the connection factory, see Manually configuring the connection factory for more information.

Perform the following steps to create a connection factory named CF1 in the my_profile WebSphere® Application Server profile:

Procedure

  1. Make sure that your deployment manager is started.
  2. On the CL command line, enter QSH.
    This command starts the Qshell environment.
  3. Change to the app_server_root/bin directory and specify the following command:
    Note: The /QIBM/ProdData/OS400/security/eim directory contains two resource adapter archive files, idTokenRA.rar and idTokenRA.JCA15.rar. The resource adapter contained in idTokenRA.rar is implemented to the Java EE Connector Architecture (JCA) 1.0 specification, while the adapter in idTokenRA.JCA15.rar is implemented to the JCA 1.5 specification. The JCA 1.5 specification is included in the Java EE 1.4 specification.
    wsadmin -profileName my_profile -f /QIBM/ProdData/OS400/security/eim/cfgIdToken.jacl
      CF1 sys1.ibm.com 389 "Eim Domain 1" "Registry For my_profile" 
      -rarFile /QIBM/ProdData/OS400/security/eim/idTokenRA.JCA15.rar -authAlias myAlias1 
      -authUserName cn=administrator -authPassword pwd1 -nodeName SYS1_my_profile
    
    where:
    • my_profile is the name of the WebSphere Application Server profile.
    • /QIBM/ProdData/OS400/security/eim/cfgIdToken.jacl is the path name to the cfgIdToken.jacl script.
    • CF1 is the name of the connection factory.
    • sys1.ibm.com is the Lightweight Directory Access Protocol (LDAP) server host name for the Enterprise Identity Mapping (EIM) domain controller.
    • 389 is the LDAP server port.
    • Eim Domain 1 is the EIM domain name.
    • Registry For my_profile is the EIM source user registry.
    • /QIBM/ProdData/OS400/security/eim/idTokenRA.JCA15.rar is the path name to the idTokenRA.JCA15.rar file.
    • myAlias1 is the authentication alias name that is referenced by the connection factory when it authenticates to the EIM domain controller (LDAP server).
    • cn=administrator is the distinguished name that is associated with the authentication alias.
    • pwd1 is the password that is associated with the authentication alias.
    • SYS1_my_profile is the WebSphere Application Server node where the connection factory is created. Note that specifying -nodeName is required when the configuration contains more than one node.
    Notes®:
    • The previous sample displays on multiple lines for illustrative purposes only. Type the command on one continuous line.
    • Quote all argument values that contain embedded blanks.
    • If an external web server is configured, you must use the -nodeName parameter to specify the node within the cell where the connection factory is to be configured.

Results

You have automatically configured the connection factory.

What to do next

After performing the previous steps, you can deploy the EIM sample application into the WebSphere Application Server environment. The source code files that are used in the sample application can be used as a model for creating your own applications. See Deploying the Enterprise Identity Mapping sample application for more information.