Sun Java™ System Application Server Platform Edition 8 Administration Guide |
Chapter 7
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. When you create a connector connection pool, you 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. When you create a connector resource, you specify its JNDI name and the connection pool that it is associated with. Multiple connector resources may 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.
For more information, including
asadmin
examples, see the link to Getting Started With J2EE Connectors in the TBD link Further Info section.
Admin Console Tasks for Connector Connection PoolsGeneral Steps for Setting Up EIS Access
- Deploy (install) a connector. See Deploying a Connector Module.
- Create a connection pool for the connector. See Creating a Connector Connection Pool.
- Create a connector resource that is associated with the connection pool. See Creating a Connector Resource.
Creating a Connector Connection Pool
Before you create the pool, you must deploy the connector module (resource adapter) associated with the pool. The values that you specify for the new pool depend on the connector module that you have deployed.
To create a connector connection pool:
- In the tree component, expand 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, you’ll specify a type of
ConnectionFactory
, a program object that produces connections.- 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, you may retain the default values.
You can change these settings 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 enables you to change the pool settings and the addtional properties.
To access the Edit Connector Connection Pool page:
- In the tree component, expand 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 7-1.
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, you must first create a connector connection pool.
To create a connector resource:
- In the tree component, expand 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 that the new connector resource will belong to.
- By default, the resource is available (enabled) as soon as it is created. If you want the resource to be unavailable, deselect the Enabled checkbox.
- Click OK.
Equivalent
asadmin
command:create-connector-resource
Editing a Connector Resource
Deleting a Connector Resource
Equivalent
asadmin
command:delete-connector-resource
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, you add name-value property pairs in the Create or Edit Admin Ojbect Resource pages. When you created an administered object resource, you associate the administered object with a JNDI name.
The Application Server implements JMS by using resource adapter. For each JMS destination you create, the Application Server automatically creates an administered object resource.
To create an administered object resource:
- In the tree component, expand the Connectors node.
- Expand the Admin Object Resources node.
- On the Connector Resources page, click New.
- On the Admin Object Resources page, specify the settings:
- In the JNDI Name field, type a uniqe name that will identify 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.
- To configure the administered object with name-value property pairs, click Add Property.
- Click OK.
Equivalent
asadmin
command:create-admin-object
Editing an Administered Object Resource
- In the tree component, expand the Connectors node.
- Expand the Administered Object Resources node.
- Select the node for the administered object resource that you want to edit.
- On the Edit Administered Object Resources page, you can modify values you specified in Creating an Administered Object Resource.
- Click Save to apply the edits you have made.
Deleting an Administered Object Resource
Equivalent
asadmin
command:delete-admin-object