+

Search Tips   |   Advanced Search

Configure new J2C resource adapters using wsadmin.sh

wsadmin tool to configure Java 2 Connector resource adapters with Resource Adapter Archive (RAR) files. A RAR file provides the classes and other code to support a resource adapter for access to a specific enterprise information system (EIS), such as the Customer Information Control System (CICS ). Configure resource adapters for an EIS only after installing the appropriate RAR file.

A RAR file, which is often called a Java Connector Architecture (JCA) connector, must comply with the JCA 1.5 and 1.6 Specification. For resource adapters to support JCA Version 1.6, there is added support for Java annotations in RAR modules. For more information on annotation support and metadata, see the topic, JCA 1.6 support for annotations in RAR modules.

Meet these requirements using a supported assembly tool (as described in the Assembly tools article) to assemble a collection of Java archive (JAR) files, other runnable components, utility classes, and so on, into a deployable RAR file. Then we are ready to install your RAR file in Application Server.

There are two ways to complete this task. This topic uses the AdminConfig object to install resource adapters. Alternatively, we can use the installJ2CResourceAdapter script in the AdminJ2C script library to install a J2C resource adapter in the configuration:

AdminJ2C.installJ2CResourceAdapter("myNode", "C:\temp\jca15cmd.rar", "J2CTest")

The scripting library provides a set of procedures to automate the most common administration functions. We can run each script procedure individually, or combine several procedures to quickly develop new scripts.


Tasks

  1. Launch the wsadmin script. See the topic Starting the wsadmin scripting client article for more information.
  2. Identify the configuration ID of the node to which the resource adapter is installed, as the following examples demonstrate:

    • Jacl:

      set node [$AdminConfig getid /Cell:mycell/Node:mynode/]
      
    • Jython:

      node = AdminConfig.getid('/Cell:mycell/Node:mynode/')
      print node
      

    Example output:

    mynode(cells/mycell/nodes/mynode|node.xml#Node_1)
    
    
    
    
    
  3. Identify the optional attributes.

    The J2CResourceAdapter object does not require specific arguments. Display the optional attributes for the J2CResourceAdapter object:

    • Jacl:

      $AdminConfig defaults J2CResourceAdapter
      
    • Jython:

      print AdminConfig.defaults('J2CResourceAdapter')
      

    The following displays the command output that displays each optional attribute and the data type for the attribute, and denotes the default attributes:

    Attribute                       Type                            Default
    name                            String
    description                     String
    classpath                       String
    nativepath                      String
    providerType                    String
    isolatedClassLoader             boolean                         false
    archivePath                     String
    threadPoolAlias                 String                          Default
    singleton                       boolean                         false
    hACapability                    ENUM                            RA_NO_HA
    isEnableHASupport               boolean                         false
    propertySet                     J2EEResourcePropertySet
    jaasLoginConfiguration          JAASConfigurationEntry
    deploymentDescriptor            Connector connectionDefTemplateProps      ConnectionDefTemplateProps
    activationSpecTemplateProps     ActivationSpecTemplateProps
    j2cAdminObjects                 J2CAdminObject
    adminObjectTemplateProps        AdminObjectTemplateProps
    j2cActivationSpec               J2CActivationSpec
    properties                      Property
    

  4. Set up the attributes of interest.

    Determine the attributes to configure for the J2C resource adapter. In the following examples, the commands set the RAR file path to the rarFile variable and the name and description configuration options to the option variable:

    • Jacl:

      (Dist)

      set rarFile c:/currentScript/cicseci.rar
      set option {-rar.name  RAR1 -rar.desc "New resource adapter"} 
      
      (ZOS) (iSeries)
      set rarFile /currentScript/cicseci.rar
      set option {-rar.name  RAR1 -rar.desc "New resource adapter"}
      
    • Jython:

      (Dist)

      rarFile = 'c:/currentScript/cicseci.rar'
      option  = '[-rar.name  RAR1 -rar.desc "New resource adapter"]'
      
      (ZOS)
      rarFile = '/currentScript/cicseci.rar'
      option  = '[-rar.name  RAR1 -rar.desc "New resource adapter"]'
      

  5. Create a resource adapter.

    Use the installResourceAdapter command for the AdminConfig object to install the resource adapter with the previously set configuration options, as the following examples demonstrate:

    • Jacl:

      $AdminConfig installResourceAdapter $rarFile mynode $option
      
    • Jython:

      AdminConfig.installResourceAdapter(rarFile, 'mynode', option)
      

    Example output:

    RAR1(cells/mycell/nodes/mynode|resources.xml#J2CResourceAdapter_1)
    

  6. Save the configuration changes. See the topic Saving configuration changes with the wsadmin tool for more information.
  7. In a network deployment environment only, synchronize the node. See the topic Synchronize nodes with the wsadmin tool for more information.


Related:

  • Relational resource adapters and JCA
  • JCA 1.6 support for annotations in RAR modules
  • Install a resource adapter archive
  • wsadmin AdminConfig
  • Synchronize nodes
  • Start the wsadmin scripting client
  • Save wsadmin configuration changes
  • J2C configuration scripts
  • Commands for the AdminConfig object