Configure J2CResourceAdapters

To configure J2C Resource Adapters

  1. Add an entry to install the resource Adapter:
    #---------------------------------------------------
    # Resource Adapter install variables and associated J2CConnectionFactory
    #---------------------------------------------------
    installResourceAdapter          =       "true"
  2. Specify a list of the nodes where the J2C RA is to be installed; the environment specific name, the rar file relative to the tar file and any rar installation options. In this and all further examples *Name_1 variables should reference the environment identifier, e.g. DevTst01.
    J2CResourceAdapterNodes_1       =       ["localhost"]
    J2CResourceAdapterName_1        =       "Platform Messaging Component SPI Resource Adapter1"
    J2CResourceAdapterFile_1        =       "j2ee/ra.rar"
    J2CResourceAdapterOptions_1     =       ["-rar.name", J2CResourceAdapterName_1, "-rar.desc", "IBMWebSphereAdapterforEmail",  "-rar.archivePath",  "${CONNECTOR_INSTALL_ROOT}/"]
  3. Specify the J2C Connection Factory details that will utilise the function provide by the above RA. Here we specify two associated Connection Factories.

    _1_1 specifies Resource Adapter 1, Connection Factory 1

    _1_2 specifies Resource Adapter 1, Connection Factory 2

    J2CConnectionFactoryName_1_1      =       "EmailConnectionFactory1"
    J2CConnectionFactoryJNDIName_1_1  =       "eis/emailConnectionFactory1"
    J2CConnectionFactoryClass_1_1     =       "javax.resource.cci.ConnectionFactory"
            
    J2CConnectionFactoryName_1_2      =       "EmailConnectionFactory12"
    J2CConnectionFactoryJNDIName_1_2  =       "eis/emailConnectionFactory12"
    J2CConnectionFactoryClass_1_2     =       "javax.resource.cci.ConnectionFactory"
  4. Specify the J2C Connection Factory custom property details that will utilise the function provided by the above RA. Here we specify two associated properties for Connection Factory 1 on RA 1 and two associated properties for Connection Factory 2 on RA 1 and

    1_1_1 specifies Resource Adapter 1, Connection Factory 1, Property 1

    1_1_2 specifies Resource Adapter 1, Connection Factory 1, Property 1

    1_2_1 specifies Resource Adapter 1, Connection Factory 2, Property 1

    1_2_2 specifies Resource Adapter 1, Connection Factory 2, Property 1

    J2CCFResourcePropertyName1_1_1 = "hosts"
    J2CCFResourcePropertyValue1_1_1 = "10.10.10.10"
    J2CCFResourcePropertyName1_1_2 = "envVariables"
    J2CCFResourcePropertyValue1_1_2 = "OFS_SOURCE=BROWSERTC"
            
    J2CCFResourcePropertyName1_2_1 = "hosts"
    J2CCFResourcePropertyValue1_2_1 = "10.10.10.10"
    J2CCFResourcePropertyName1_2_2 = "envVariables"
    J2CCFResourcePropertyValue1_2_2 = "OFS_SOURCE=BROWSERTC"
  5. Specify the J2C Activation Specification details; the AS name, JNDI reference and the MessageListener class. Here we specify two associated J2C activation Specifications.

    _1_1 specifies Resource Adapter 1, J2C Activation Specification 1

    _1_2 specifies Resource Adapter 1, J2C Activation Specification 2

    J2CActivationSpecName_1_1               =       "EmailConnectionFactoryActSpec1"
    J2CActivationSpecJNDIName_1_1   =       "eis/emailConnectionFactoryActSpec1"
    J2CActivationSpecListenerType_1_1       =       "com.ibm.wsspi.sib.ra.SibRaMessageListener"
            
    J2CActivationSpecName_1_2        =    "EmailConnectionFactoryActSpec12"
    J2CActivationSpecJNDIName_1_2    =    "eis/emailConnectionFactoryActSpec12"
    J2CActivationSpecListenerType_1_2    =    "com.ibm.wsspi.sib.ra.SibRaMessageListener"
  6. Specify any application specific connection pool settings, the rest will be defaulted by the profile_defaults.py: The following s[pecifies Max Connections for Resource Adapter 1, Connection Pool 1
    J2CCFConnectionPoolmaxConnections_1_1   =       5
  7. Specify any connection factory Resource properties that are required, anything unset will pick up the defaults as provided by the connection definition in the rar:
  8. Specify if you want to install this resource adapter at a cluster scope:
    # Specifies if the J2C resource adapter is going to be installed on the cluster.
    J2CResourceAdapterClusterScope_1                =               "true"
    # If you set this parameter to true, all of the J2C connection factory, J2C activation specification, and J2C administrative objects will be copied to the new J2C resource adapter (deep copy). If you set this parameter to false, the objects are not created (shallow copy). The default is false. 
    J2CResourceAdapterDeepCopyClusterScope_1        =               "false"
    # Indicates the name of the new J2C resource adapter. This parameter is required.
    J2CResourceAdapterNameClusterScope_1            =               "Resource Adapter X at Cluster Level"
    # Specifies the attributes to set for the J2C resource adapter.
    J2CResourceAdapterOptionsClusterScope_1         =               [["threadPoolAlias", "Default"], ["classpath", "${CONNECTOR_INSTALL_ROOT}/ra.rar"], ["name", J2CResourceAdapterNameClusterScope_1], ["isolatedClassLoader", "false"], ["nativepath", "${CONNECTOR_INSTALL_ROOT}/ra.rar"], ["description", "IBMWebSphereAdapterforEmail"]]
  9. Running a successful deployment should result in the following deploy log output:
            ---> Installing J2CResourceAdapterName_1 = TOCFT24ResourceAdapterDevTst01
            ---> Found existing J2CResourceAdapters
            ---> Removing J2CResourceAdapterName name:TOCFT24ResourceAdapterDevTst01
            WASX7397I: The following J2CResourceAdapter objects are removed: TOCFT24ResourceAdapterDevTst01(cells/was61DTa_A71Network/nodes/ltsbjvtstas17|resources.xml#J2CResourceAdapter_1289578334924)
            ---> Installing TOCFT24ResourceAdapterDevTst01 on node:ltsbjvtstas17
            ---> Setting variable CONFIG_ROOT ......
                 Variable CONFIG_ROOT set to: /usr/websphere6/was61DTa_A71/DeploymentManager/config
            ---> Distributing rar file
            ---> Done.
            ---> Done.
            ---> Found existing J2CActivationSpecs
            ---> Installing TOCFT24ActivationSpecDevTst01
            ---> Found existing J2CConnectionFactories
            ---> Installing TOCFT24ConnectionFactoryDevTst01 for node:ltsbjvtstas17
            ---> Installing JCA Connection Factory Resource Properties
            ---> Setting property: [hosts] to: [172.27.219.132]
            ---> Setting property: [ports] to: [20001]
            ---> Setting property: [envVariables] to: [OFS_SOURCE=BROWSERTC]
            ---> No more J2CConnectionFactory Resource Properties to install. Done.
            ---> Modifying J2C ConnectionPool settings ......
                 Modified.
            ---> No more Resource Adapters to install. Done.