Sun Java System Application Server Enterprise Edition 8.1 Administration Guide 2005Q1 |
Chapter 11
Connector ResourcesThis chapter explains how to configure connectors, which are used to access enterprise information systems (EISs). This chapter contains the following sections:
About ConnectorsConnector Modules, Connection Pools, and Resources
Also called a resource adapter, a connector module is a J2EE component that enables applications to interact with enterprise information systems (EISs). EIS software includes various types of systems: enterprise resource planning (ERP), mainframe transaction processing, and non-relational databases, among others. Like other J2EE modules, to install a connector module you deploy it.
A connector connection pool is a group of reusable connections for a particular EIS. To create a connector connection pool, specify the connector module (resource adapter) that is associated with the pool.
A connector resource is a program object that provides an application with a connection to an EIS. To create a connector resource, specify its JNDI name and its associated connection pool. Multiple connector resources can specify a single connection pool. The application locates the resource by looking up its JNDI name. (For more information on JNDI, see the section JNDI Names and Resources.) The JNDI name of a connector resource for an EIS is usually in the
java:comp/env/
eis-specificsubcontext.
The Application Server implements JMS by using a connector module (resource adapter). See the section, The Relationship Between JMS Resources and Connector Resources.
Admin Console Tasks for Connector Connection PoolsGeneral Steps for Setting Up EIS Access
Creating a Connector Connection Pool
Before creating the pool, deploy the connector module (resource adapter) associated with the pool. The values that are specified for the new pool depend on the connector module that is deployed.
To create a connector connection pool:
- In the tree component, expand the Resource node and then the Connectors node.
- Select the Connector Connection Pools node.
- On the Connector Connection Pools page, click New.
- On the first Create Connector Connection Pool page, specify the following settings:
- Click Next.
- On the second Create Connector Connection Pool page, select a value from the Connection Definition combo box.
The choices in the combo box depend on the resource adapter. Typically, a type of
ConnectionFactory
is specified, a factory instance to get a connection to the EIS.- Click Next.
- On the third and last Create Connector Connection Pool page, perform these tasks:
- In the General Settings section verify that the values are correct.
- For the fields in the Pool Settings section, the default values can be retained.
These settings can be changed at a later time. See Editing a Connector Connection Pool.
- In the Additonal Properties table, add any required properties.
In the previous Create Connector Connection Pool page, you selected a class in the Connection Definition combo box. If this class is in the server’s classpath, then the Additional Properties table displays default properties.
- Click Finish.
Equivalent
asadmin
command:create-connector-connection-pool
Editing a Connector Connection Pool
The Edit Connector Connection Pool page provides the means to change the pool settings and the additional properties.
To access the Edit Connector Connection Pool page:
- In the tree component, expand the Resources node and then the Connectors node.
- Expand the Connector Connection Pools node.
- Select the node for the pool you want to edit.
- On the Edit Connector Connection Pool page, you can change settings that control the number of connections in the pool. See Table 11-1.
- In the Additional Properties table, specify name-value pairs. The properties specified depend on the resource adapter used by this pool. The name-value pairs specified by the deployer using this table can be used to override the default values for the properties defined by the resource-adapter vendor.
- On the Security Maps tabbed pane, create or modify a security map for the connection pool. See "About Security Maps" for information on how to create a security map.
- Click Save.
Deleting a Connector Connection Pool
Equivalent
asadmin
command:delete-connector-connection-pool
Admin Console Tasks for Connector ResourcesCreating a Connector Resource
A connector resource (data source) provides applications with a connection to an EIS. Before creating a connector resource, first create a connector connection pool.
To create a connector resource:
- In the tree component, expand the Resources node and then the Connectors node.
- Expand the Connector Resources node.
- On the Connector Resources page, click New.
- On the Create Connector Resources page, specify the resource’s settings:
- In the JNDI Name field, type a uniqe name, for example:
eis/myERP
. Don’t forget the forward slash.- From the Pool Name combo box, choose the connection pool to which the the new connector resource belongs.
- By default, the resource is available (enabled) as soon as it is created. To change the resource to be unavailable, select the Disable on All Targets radio button.
- In the Targets section of the page, select the domain, cluster, or server instances where the connector resource will reside, from the Available field and click Add. If you do not want to deploy the connector resource to one of the domains, clusters, or server instances listed in the Selected field, select it from the field and click Remove.
- Click OK.
Equivalent
asadmin
command:create-connector-resource
Editing a Connector Resource
- In the tree component, expand the Resources node and then the Connectors node.
- Expand the Connector Resources node.
- Select the node for the connector resource that you want to edit.
- On the Edit Connector Resources page, you can select a different connection pool from the Pool Name menu.
- On the Targets tabbed pane, you can edit the targets on which the connector resource is deployed by clicking Manage Targets. See Creating a Connector Resource for more information on targets.
- Click Save to apply the edits.
Deleting a Connector Resource
Equivalent
asadmin
command:delete-connector-resource
Configuring a Connector Service
Use the Connector Service screen to configure the connector container for all resource adapters deployed to this cluster or server instance.
To configure the connector container:
- Select Configurations from the tree.
- Select the instance to configure:
- Select the Connector Service node.
- Specify the shutdown timeout in seconds in the Shutdown Timeout field. Enter an integer representing the number of seconds that the application server waits to allow the
ResourceAdapter.stop
method of the connector module’s instance to complete. Resource adapters that take longer than the specified shutdown timeout are ignored by the application server and the shutdown procedure continues. The default shutdown timeout is 30 seconds. Click Load Defaults to select the default shutdown timeout for the resource adapters deployed to this cluster or server instance.
Admin Console Tasks for Administered Object ResourcesCreating an Administered Object Resource
Packaged within a resource adapter (connector module), an administered object provides specialized functionality for an application. For example, an administered object might provide access to a parser that is specific to the resource adapter and its associated EIS. The object can be administered; that is, it can be configured by an adminisitrator. To configure the object, add name-value property pairs in the Create or Edit Admin Ojbect Resource pages. When creating an administered object resource, associate the administered object to a JNDI name.
The Application Server implements JMS by using resource adapter. For each JMS destination created, the Application Server automatically creates an administered object resource.
To create an administered object resource:
- In the tree component, expand the Resources node and then the Connectors node.
- Expand the Admin Object Resources node.
- On the Admin Object Resources page, click New.
- On the Admin Object Resources page, specify the following settings:
- In the JNDI Name field, type a uniqe name that identifies the resource.
- In the Resource Type field, enter the Java type for the resource.
- From the Resource Adapter combo box, select the resource adapter that contains the administered object.
- Select or deselect the checkbox to enable or disable the resource.
- Click Next.
- On the second Create Admin Object Resource page, the following tasks can be performed.
- To configure the administered object with name-value property pairs, click Add Property.
- In the Targets section of the page, select the domain, cluster, or server instances where the administered object will reside, from the Available field and click Add. To undeploy the administered object to one of the domains, clusters, or server instances listed in the Selected field, select it from the field and click Remove.
- Click Finish.
Equivalent
asadmin
command:create-admin-object
Editing an Administered Object Resource
- In the tree component, expand the Resource node and then the Connectors node.
- Expand the Administered Object Resources node.
- Select the node for the administered object resource to be edited.
- On the Edit Administered Object Resources page, modify values specified in Creating an Administered Object Resource.
- On the Targets tabbed pane, edit the targets on which the administered object is deployed by clicking Manage Targets. See Creating an Administered Object Resource for more information on targets.
- Click Save to apply the edits.
Deleting an Administered Object Resource
Equivalent
asadmin
command:delete-admin-object