How the Database Table Mapping works

The following process describes what happens when a process running within the Business Process Component uses the Database Table Mapping service to retrieve a record in a database table when the auto-connect and auto-commit attributes are enabled. Note that the process omits many of the initialization and messaging steps that normally happens in a service. See How the services work for information on these steps.

  1. An activity in the process retrieves the name of the service requester from the ServiceRequesterIDs.properties resource bundle.
  2. The activity uses the resource bundle name to get a table mapping requester from the requester factory. The factory creates and configures the requester instance.
  3. The activity in the process invokes a method in the requester instance to retrieve a record.
  4. The requester accesses the formatter service to format the data for the retrieval request.
  5. The requester sends the retrieval request and its parameters to the service container using a WSIF message.
  6. The services container invokes the retrieve function in the table mapping service object.
  7. The table mapping service object creates an SQL statement using the contents of the WSIF message. Note that the service object obtains the datasource name from the application server's service definition file (dsesrvce.xml).
  8. The table mapping service object passes the SQL statement to the database through the data source and connection manager.
  9. The services container returns the response to the requester.
  10. The requester accesses the formatter service to unformat the response and sends the unformatted response to the activity.

The process for a single action EJB accessing the Database Table Mapping service is similar. The primary difference is that EJB must do the work of the activity mentioned in the above steps.