Defining a connection factory for a type-2 IMS Universal Database resource adapter on WebSphere Application Server for z/OS

The DataSource facility is a factory for connections to a physical data source, or database. A data source is registered with a naming service based on the Java™ Naming and Directory (JNDI) API. DataSource objects have properties that pertain to the actual data source that an application needs to access.

Requirement: You must use the DataSource facility, which replaces the DriverManager facility, because the DriverManager facility is not supported by the Java EE Connection Architecture Specification.

To install the data source for your application:

Procedure

  1. In the left frame of the WebSphere Application Server for z/OS administrative console, click Resources > Resource Adapters > Resource Adapters.
    A list of resource adapters is displayed.
  2. Click the name of the IMS Universal Database resource adapter that you chose when you installed the adapter.
    A configuration dialog is displayed.
  3. Under Additional Properties, click J2C connection factories.
  4. Click New.
    A configuration dialog is displayed.
  5. Under General Properties, type the following information:
    • Name: the name for the connection factory, for example, PhonebookCF.
    • JNDI Name: the JNDI name for the connection factory that is unique within this server, for example, PhonebookCF.
  6. Click OK.
    The new connection factory is listed in the table of resources that you can administer.
  7. Click the name of the data source that you just installed.
  8. Under Additional Properties, click Custom Properties.
    The properties are listed in a table.
  9. Specify values defined by your installation for each of the following properties by clicking the property name and, in the configuration pane that opens, specifying the value for the property in the Value field. After specifying the value for a property, click OK to return to the list of properties.
    DatastoreName
    Enter bytes 4-7 of the DRA startup table module name (usually the IMS system ID). For more information about the DRA startup table, see Installing a type-2 IMS Universal Database resource adapter on WebSphere Application Server for z/OS.
    DriverType
    Set the driverType to either of the following values:
    2
    Specifies a local transaction model in which a unit of work is scoped to a particular connection. Multiple connections can have independent units of work associated with each.

    Application programs can issue local commit and rollback calls through either the JDBC Connection interface or the CCI LocalTransaction interface.

    DriverType=2 does not support the UserTransaction interface.

    Container-managed bean methods require the following properties in the EJB Deployment Descriptor:
    • In the Bean tab, specify the following properties under the LocalTransaction heading:
      • Boundary: BeanMethod
      • Resolver: ContainerAtBoundary
      • Unresolved action: Rollback
    • In the Assembly tab, set the transaction scope to NotSupported.
    2_CTX

    Specifies a global scope transaction model in which a unit of work can span multiple bean methods.

    Application programs can use the UserTransaction interface for explicit commit and rollback calls.

    Application programs cannot issue local commit and rollback calls through either the JDBC Connection interface or the CCI LocalTransaction interface.

    When 2_CTX is specified, use the default properties of the EJB Deployment Descriptor.

    DatabaseName
    Enter the location of the database metadata representing the target IMS database. You can specify this property in one of the following ways:
    • The name of the PSB that is used to access the target database. This option is only available if your IMS system uses the IMS catalog.
    • The fully qualified name of the Java metadata class generated by the IMS Enterprise Suite Explorer for Development. The URL must be prefixed with class:// (for example, class://com.foo.BMP255DatabaseView).
  10. In the messages box, click Save.
    The save page is displayed.
  11. Click Save to update the master repository with your changes.
  12. Restart the server.