Use the wsadmin tool to configure 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 you install the appropriate RAR file.
Before you begin
A RAR file, which is often called a J2EE Connector Architecture
(JCA) connector, must comply with the JCA Specification. Meet these requirements
by 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 you are ready
to install your RAR file in Application Server.
Procedure
- Launch the wsadmin
scripting tool.
- Identify the configuration ID of the node to which the resource
adapter is installed, as the following examples demonstrate:
Using Jacl:
set node [$AdminConfig getid /Cell:mycell/Node:mynode/]
Using Jython:
node = AdminConfig.getid('/Cell:mycell/Node:mynode/')
print node
Example output:
mynode(cells/mycell/nodes/mynode|node.xml#Node_1)
- Identify the optional attributes.
The J2CResourceAdapter
object does not require specific arguments. Use the following command to display
the optional attributes for the J2CResourceAdapter object:
Using Jacl:
$AdminConfig defaults J2CResourceAdapter
Using 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
name String
description String
classpath String
nativepath String
providerType String
archivePath String
threadPoolAlias String
propertySet J2EEResourcePropertySet
jaasLoginConfiguration JAASConfigurationEntry
deploymentDescriptor Connector
connectionDefTemplateProps ConnectionDefTemplateProps
activationSpecTemplateProps ActivationSpecTemplateProps
j2cAdminObjects J2CAdminObject
adminObjectTemplateProps AdminObjectTemplateProps
j2cActivationSpec J2CActivationSpec
- 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:
Using Jacl:
set rarFile /currentScript/cicseci.rar
set option {-rar.name RAR1 -rar.desc "New resource adapter"}
Using Jython:
rarFile = '/currentScript/cicseci.rar'
option = '[-rar.name RAR1 -rar.desc "New resource adapter"]'
- 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:
Using Jacl:
$AdminConfig installResourceAdapter $rarFile mynode $option
Using Jython:
AdminConfig.installResourceAdapter(rarFile, 'mynode', option)
Example output:
RAR1(cells/mycell/nodes/mynode|resources.xml#J2CResourceAdapter_1)
- Save the configuration changes.
Use the following Jython command to save your configuration changes:
AdminConfig.save()
- In
a network deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more
information.