Sun logo      Previous      Contents      Next     

Sun Java System Application Server Platform Edition 8.1 2005Q1 Administration Guide

Chapter 7
Connector Resources

This chapter explains how to configure connectors, which are used to access enterprise information systems (EISs). This chapter contains the following sections:


About Connectors

Connector 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-specific subcontext.

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 Pools

General Steps for Setting Up EIS Access

  1. Deploy (install) a connector. See Deploying a Connector Module.
  2. Create a connection pool for the connector. See Creating a Connector Connection Pool.
  3. Create a connector resource that is associated with the connection pool. See Creating a Connector Resource.

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:

  1. In the tree component, expand the Resource node and then the Connectors node.
  2. Select the Connector Connection Pools node.
  3. On the Connector Connection Pools page, click New.
  4. On the first Create Connector Connection Pool page, specify the following settings:
    1. In the Name field, enter a logical name for the pool.
    2. Specify this name when creating a connector resource.

    3. Select an entry from the Resource Adapter combo box.
    4. The combo box displays a list of deployed resource adapters (connector modules).

  5. Click Next.
  6. On the second Create Connector Connection Pool page, select a value from the Connection Definition combo box.
  7. 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.

  8. Click Next.
  9. On the third and last Create Connector Connection Pool page, perform these tasks:
    1. In the General Settings section verify that the values are correct.
    2. For the fields in the Pool Settings section, the default values can be retained.
    3. These settings can be changed at a later time. See Editing a Connector Connection Pool.

    4. In the Additonal Properties table, add any required properties.
    5. 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.

  10. 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:

  1. In the tree component, expand the Resources node and then the Connectors node.
  2. Expand the Connector Connection Pools node.
  3. Select the node for the pool you want to edit.
  4. On the Edit Connector Connection Pool page, you can change settings that control the number of connections in the pool. See Table 7-1.
  5. Table 7-1  Pool Settings for a Connector Connection Pool

    Parameter

    Description

    Initial and Minimum Pool Size

    The minimum number of connections in the pool. This value also determines the number of connections placed in the pool when the pool is first created or when application server starts.

    Maximum Pool Size

    The maximum number of connections in the pool.

    Pool Resize Quantity

    When the pool shrinks toward the minimum pool size it is resized in batches. This value determines the number of connections in the batch. Making this value too large will delay connection recycling; making it too small will be less efficient.

    Idle Timeout

    The maximum time in seconds that a connection can remain idle in the pool. After this time expires, the connection will be removed from the pool.

    Max Wait Time

    The amount of time the application that has requested a connection will wait before getting a connection timeout. Because the default wait time is long, the application might appear to hang indefinitely.

    On Any Failure

    If you select the checkbox labelled Close All Connections, if a single connection fails, then the application server will close all connections in the pool and then re-establish them. If you do not select the checkbox, then individual connections will be re-established only when they are used.

    Transaction Support

    Use the Transaction Support list to select the type of transaction support for the connection pool. The chossen transaction support overrides the transaction support attribute in the resource adapter associated with this connection pool in a downward compatible way. In other words, it can support a lower transaction level than that specified in the resource adapter or the same transaction level as that specified in resource adapter, but it cannot specify a higher level.

    The transaction support options include the following.

    The None selection from the Transaction Support menu indicates that the resource adapter does not support resource manager local or JTA transactions and does not implement XAResource or LocalTransaction interfaces.

    Local transaction support means that the resource adapter supports local transactions by implementing the LocalTransaction interface. Local transactions are managed internal to a resource manager and involve no external transaction managers.

    XA transaction support means that the resource adapter supports resource manager local and JTA transactions by implementing the LocalTransaction and XAResource interfaces. XA transactions are controlled and coordinated by a transaction manager external to a resource manager. Local transactions are managed internal to a resource manager and involve no external transaction managers.

  6. 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.
  7. 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.
  8. Click Save.

Deleting a Connector Connection Pool

  1. In the tree component, expand the Resources node and then the Connectors node.
  2. Select the Connector Connection Pools node.
  3. On the Connector Connector Connection Pools page, select the checkbox for the pool to be deleted.
  4. Click Delete.

Equivalent asadmin command: delete-connector-connection-pool


Admin Console Tasks for Connector Resources

Creating 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:

  1. In the tree component, expand the Resources node and then the Connectors node.
  2. Expand the Connector Resources node.
  3. On the Connector Resources page, click New.
  4. On the Create Connector Resources page, specify the resource’s settings:
    1. In the JNDI Name field, type a uniqe name, for example: eis/myERP. Don’t forget the forward slash.
    2. From the Pool Name combo box, choose the connection pool to which the the new connector resource belongs.
    3. 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.
  5. Click OK.

Equivalent asadmin command: create-connector-resource

Editing a Connector Resource

  1. In the tree component, expand the Resources node and then the Connectors node.
  2. Expand the Connector Resources node.
  3. Select the node for the connector resource that you want to edit.
  4. On the Edit Connector Resources page, you can select a different connection pool from the Pool Name menu.
  5. Click Save to apply the edits.

Deleting a Connector Resource

  1. In the tree component, expand the Resources node and then the Connectors node.
  2. Select the Connector Resources node.
  3. On the Connector Resources page, select the checkbox for the resource to be deleted.
  4. Click Delete.

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:

  1. Select Configurations from the tree.
  2. Select the Connector Service node.
  3. 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 Resources

Creating 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:

  1. In the tree component, expand the Resources node and then the Connectors node.
  2. Expand the Admin Object Resources node.
  3. On the Admin Object Resources page, click New.
  4. On the Admin Object Resources page, specify the following settings:
    1. In the JNDI Name field, type a uniqe name that identifies the resource.
    2. In the Resource Type field, enter the Java type for the resource.
    3. From the Resource Adapter combo box, select the resource adapter that contains the administered object.
    4. Select or deselect the checkbox to enable or disable the resource.
    5. Click Next.
  5. On the second Create Admin Object Resource page, the following tasks can be performed.
    1. To configure the administered object with name-value property pairs, click Add Property.
  6. Click Finish.

Equivalent asadmin command: create-admin-object

Editing an Administered Object Resource

  1. In the tree component, expand the Resource node and then the Connectors node.
  2. Expand the Administered Object Resources node.
  3. Select the node for the administered object resource to be edited.
  4. On the Edit Administered Object Resources page, modify values specified in Creating an Administered Object Resource.
  5. Click Save to apply the edits.

Deleting an Administered Object Resource

  1. In the tree component, expand the Resources node and then the Connectors node.
  2. Select the Administered Object Resources node.
  3. On the Administered Object Resources page, select the checkbox for the resource to be deleted.
  4. Click Delete.

Equivalent asadmin command: delete-admin-object



Previous      Contents      Next     


Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.